Metadata-Version: 2.4
Name: wire-ai
Version: 0.4.0
Summary: Workforce Intelligence & Reasoning Engine — framework-agnostic governance layer for autonomous enterprise AI agents
Project-URL: Homepage, https://github.com/naveenkumarbaskaran/wire-ai
Project-URL: Repository, https://github.com/naveenkumarbaskaran/wire-ai
Project-URL: Issues, https://github.com/naveenkumarbaskaran/wire-ai/issues
Author-email: Naveen Kumar Baskaran <naveen.kumar.baskaran@sap.com>
License: MIT
Keywords: a2a,agents,ai,autogen,crewai,enterprise,governance,langgraph,llm,mcp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.20
Requires-Dist: anthropic>=0.30
Requires-Dist: anyio>=4.4
Requires-Dist: httpx>=0.27
Requires-Dist: opentelemetry-api>=1.25
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.25
Requires-Dist: opentelemetry-sdk>=1.25
Requires-Dist: orjson>=3.10
Requires-Dist: prometheus-client>=0.20
Requires-Dist: pydantic>=2.7
Requires-Dist: rich>=13.7
Requires-Dist: sqlmodel>=0.0.19
Requires-Dist: structlog>=24.2
Requires-Dist: tenacity>=8.3
Requires-Dist: tiktoken>=0.7
Requires-Dist: typer>=0.12
Requires-Dist: xxhash>=3.4
Provides-Extra: all
Requires-Dist: asyncpg>=0.29; extra == 'all'
Requires-Dist: crewai>=0.80; extra == 'all'
Requires-Dist: hiredis>=2.3; extra == 'all'
Requires-Dist: langchain-core>=0.2; extra == 'all'
Requires-Dist: langgraph>=0.2; extra == 'all'
Requires-Dist: openai-agents>=0.1; extra == 'all'
Requires-Dist: openai>=1.35; extra == 'all'
Requires-Dist: psycopg[binary]>=3.1; extra == 'all'
Requires-Dist: pyautogen>=0.4; extra == 'all'
Requires-Dist: redis>=5.0; extra == 'all'
Requires-Dist: slack-sdk>=3.30; extra == 'all'
Requires-Dist: textual>=0.75; extra == 'all'
Provides-Extra: autogen
Requires-Dist: pyautogen>=0.4; extra == 'autogen'
Provides-Extra: crewai
Requires-Dist: crewai>=0.80; extra == 'crewai'
Provides-Extra: dashboard
Requires-Dist: textual>=0.75; extra == 'dashboard'
Provides-Extra: dev
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: time-machine>=2.14; extra == 'dev'
Provides-Extra: langgraph
Requires-Dist: langchain-core>=0.2; extra == 'langgraph'
Requires-Dist: langgraph>=0.2; extra == 'langgraph'
Provides-Extra: openai
Requires-Dist: openai-agents>=0.1; extra == 'openai'
Requires-Dist: openai>=1.35; extra == 'openai'
Provides-Extra: postgres
Requires-Dist: asyncpg>=0.29; extra == 'postgres'
Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
Provides-Extra: redis
Requires-Dist: hiredis>=2.3; extra == 'redis'
Requires-Dist: redis>=5.0; extra == 'redis'
Provides-Extra: slack
Requires-Dist: slack-sdk>=3.30; extra == 'slack'
Description-Content-Type: text/markdown

# WIRE — Workforce Intelligence & Reasoning Engine

**Framework-agnostic governance layer for autonomous enterprise AI agents.**

> *"Describe the work. WIRE hires the workforce."*

[![PyPI](https://img.shields.io/pypi/v/wire-ai)](https://pypi.org/project/wire-ai)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue)](https://www.python.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-green)](LICENSE)
[![Tests](https://github.com/naveenkumarbaskaran/wire-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/naveenkumarbaskaran/wire-ai/actions)

---

## The Problem

Every major agent framework ships without the five things enterprises actually need:

| Gap | LangGraph | CrewAI | AutoGen |
|-----|-----------|--------|---------|
| Loop protection | ❌ | ❌ | ❌ |
| Tamper-proof audit | ❌ | ❌ | ❌ |
| Hard cost ceilings | ❌ | ❌ | ❌ |
| HITL as first-class primitive | Partial | ❌ | Unstable |
| Live workforce visibility | ❌ | ❌ | ❌ |

WIRE adds all of them — without replacing your existing framework.

---

## Install

```bash
pip install wire-ai                  # core
pip install wire-ai[langgraph]       # + LangGraph adapter
pip install wire-ai[crewai]          # + CrewAI adapter  (Sprint 5)
pip install wire-ai[autogen]         # + AutoGen adapter (Sprint 5)
pip install wire-ai[all]             # everything
```

---

## Sprint 1 — 5 lines, full governance

```python
import wire

# Your existing LangGraph graph — unchanged
from langgraph.graph import StateGraph
graph = StateGraph(...).compile()

# Wrap with WIRE
workforce = wire.deploy(
    graph,
    backend="langgraph",
    max_iterations=30,       # LoopGuard: halt before runaway
    max_cost_usd=0.50,       # Budget: hard $0.50 ceiling
    hourly_budget_usd=0.10,  # Budget: $0.10/hour rolling
    audit_path="audit.jsonl" # AuditChain: tamper-proof log
)

# Run — same API as graph.ainvoke()
result = await workforce.ainvoke({"messages": [...]})

# Verify audit integrity
wire.AuditChain.verify("audit.jsonl")
# ✓ 12 entries · chain intact
```

---

## What You Get

### LoopGuard
Halts runaway agent loops before they exhaust your API quota. Configurable iteration and cost limits. Raises `LoopBreachError` with full context.

```python
# Fires when iterations > 30 OR cost > $0.50
workforce = wire.deploy(graph, max_iterations=30, max_cost_usd=0.50)
```

### AuditChain
Every agent action, node execution, and tool call is recorded in a tamper-proof SHA-256 hash-linked log. Verify integrity at any time.

```python
wire.AuditChain.verify("audit.jsonl")
# Raises AuditChainError with entry index if tampered

# Replay any past run
wire replay --run-id run_20260612_abc123
```

### Budget
Hard cost ceilings with rolling hourly and daily windows. Never get a surprise bill.

```python
budget = wire.Budget(hourly=0.50, daily=5.00)
# BudgetBreachError fires before the ceiling is exceeded
```

### EventBus
Typed events for every runtime moment. Subscribe handlers for alerting, logging, or custom business logic.

```python
@workforce.on(wire.EventKind.LOOP_BREACH)
async def alert(event):
    await slack.send(f"Loop breach in {event.run_id}!")
```

---

## CLI

```bash
wire version                          # v0.1.0
wire status                           # installed adapters
wire audit audit.jsonl                # verify chain integrity
wire replay --run-id abc123           # replay a past run
```

---

## Sprint Roadmap

| Sprint | Ships | Status |
|--------|-------|--------|
| **S1 — MVP** | `deploy()` + `LoopGuard` + `AuditChain` + `Budget` | ✅ **v0.1.0** |
| **S2 — Governance** | `HITLGate` + `IdempotencyGuard` + `SLATracker` | 🔜 v0.2.0 |
| **S3 — HIRE** | `wire.hire("...")` + 20 role templates | 🔜 v0.3.0 |
| **S4 — Visibility** | Live dashboard + Slack HITL + time-travel replay | 🔜 v0.4.0 |
| **S5 — Multi-Framework** | CrewAI + AutoGen + OpenAI adapters | 🔜 v0.5.0 |
| **S6 — Enterprise** | SOC-2 presets + SSO + RBAC + web dashboard | 🔜 v1.0.0 |

---

## Architecture

```
┌──────────────────────────────────────────────────────┐
│  HIRE LAYER     intent → role matching → workforce   │
├──────────────────────────────────────────────────────┤
│  RUNTIME LAYER  LoopGuard · HITLGate · SLATracker    │
│                 IdempotencyGuard · Budget · State     │
├──────────────────────────────────────────────────────┤
│  VISIBILITY     Dashboard · AuditChain · CostLedger  │
│                 TimeTravel · DriftDetector            │
├──────────────────────────────────────────────────────┤
│  ADAPTERS       LangGraph · CrewAI · AutoGen · OpenAI│
└──────────────────────────────────────────────────────┘
```

---

## Why WIRE?

Built from 95 adversarially-verified research claims across 24 sources:

- **LangGraph** self-describes as "very low-level" — no governance primitives
- **AutoGen** Studio is "not meant for production" — their own README
- **CrewAI** has no idempotency guard — payments and emails can fire twice on retry
- **No framework** ships a tamper-proof audit chain, built-in workforce visibility, or HITL routing

WIRE fills every gap. Framework-agnostic. Enterprise-ready from day 1.

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). MIT licensed.

---

*Built by [Naveen Kumar Baskaran](https://github.com/naveenkumarbaskaran)*
