Skip to main content

Workforce Intelligence & Reasoning Engine — framework-agnostic governance layer for autonomous enterprise AI agents

Project description


PyPI Python 3.11+ Tests License: MIT Frameworks

The first framework-agnostic governance layer for autonomous enterprise AI agents.
Loop protection · Tamper-proof audit · HITL · SLA enforcement · SOC-2/HIPAA presets · Live dashboard


The Problem

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

LangGraph  → "very low-level, focused entirely on agent orchestration"  (their words)
AutoGen    → Studio "not meant to be used in a production environment"   (their docs)
CrewAI     → no idempotency guard — payments fire twice on task retry    (production bug)
AWS Bedrock → audit logging disabled by default                          (verified)
MS Foundry  → SLA enforcement: ❌  (117 adversarially-verified claims)

WIRE fixes every gap. Without replacing your framework.


Install

pip install wire-ai                       # core + in-memory idempotency
pip install wire-ai[langgraph]            # + LangGraph adapter
pip install wire-ai[crewai]              # + CrewAI adapter
pip install wire-ai[autogen]             # + AutoGen adapter
pip install wire-ai[openai]              # + OpenAI Agents SDK adapter
pip install wire-ai[foundry]             # + Microsoft Foundry adapter
pip install wire-ai[web]                 # + FastAPI web dashboard
pip install wire-ai[slack]               # + Slack HITL routing
pip install wire-ai[semantic]            # + SBERT semantic HIRE matching
pip install wire-ai[redis]               # + Redis durable idempotency
pip install wire-ai[postgres]            # + Postgres audit + idempotency
pip install wire-ai[all]                 # everything

30-second demo

import wire

# 1. Describe the workforce in plain language
workforce = wire.hire("""
    Monitor AWS costs every hour.
    Detect anomalies over $500.
    Open a Jira P1 if budget exceeded.
    Escalate to #ops-channel if no human responds in 30 minutes.
""")

# See what was assembled — readable by non-engineers
print(workforce.describe())
# WorkforceGraph
#   Intent : Monitor AWS costs every hour...
#   Roles  : 4  ·  Source: rule (confidence 87%)
#
#   ├─ cost_monitor      (monitoring)  SLA: max 120s, max $0.05  risk=low
#   ├─ anomaly_detector  (monitoring)  SLA: max 60s              risk=medium
#   ├─ ticket_creator    (execution)   [idempotent]              risk=medium
#   └─ human_escalator   (governance)  SLA: max 1800s            risk=high

# 2. Deploy on any framework with full governance
governed = wire.deploy(
    my_langgraph_graph,            # or CrewAI, AutoGen, OpenAI, Foundry
    backend="langgraph",
    max_iterations=50,             # LoopGuard: halt before runaway
    max_cost_usd=1.0,              # Budget: hard $1 ceiling
    hourly_budget_usd=0.25,        # Budget: $0.25/hour rolling
    audit_path="wire-audit.jsonl", # AuditChain: tamper-proof log
)

# 3. Subscribe to events
@governed.on(wire.EventKind.LOOP_BREACH)
async def alert(event):
    print(f"🚨 Loop breach: {event.data['iterations']} iterations")

# 4. Run
result = await governed.ainvoke({"messages": [...]})

# 5. Verify audit integrity
count = wire.AuditChain.verify("wire-audit.jsonl")
# ✓ 47 entries · chain intact · no tampering detected

Live Dashboard

wire dashboard --port 8080 --audit wire-audit.jsonl
# Opens http://localhost:8080 — live workforce status for engineers and executives

Terminal preview (asciinema recording — run asciinema play locally)

WIRE Workforce Dashboard                          [live · 14:32:07]
══════════════════════════════════════════════════════════════════════
Workforce: aws-cost-monitor          Backend: langgraph
Budget: $0.23/$1.00 today  [█████████████░░░░░░░] 23%

ROLE              STATUS      CONFIDENCE  COST     SLA    LAST ACT
cost_monitor      ● running   94%         $0.04    ✓ ok   14:31:52
anomaly_detector  ● running   87%         $0.11    ✓ ok   14:32:01
ticket_creator    ○ idle      —           $0.06    ✓ ok   14:28:33
human_escalator   ⏸ waiting   —           —        ⚠ 28m  14:31:59

HITL QUEUE (1 pending)
  [#001] Approve Jira P1 creation — $847 anomaly detected
  → approve / reject / modify    [expires in 2m]

RECENT EVENTS
  14:32:01  anomaly_detector  FLAGGED cost spike +$847 (us-east-1)
  14:31:59  human_escalator   HITL requested → slack:#ops-channel
  14:28:33  ticket_creator    P2 created INC-4821 (idempotent skip ×1)
══════════════════════════════════════════════════════════════════════

To record your own: asciinema rec wire-demo.cast then run wire dashboard


What WIRE Adds

Primitive What it does Problem it solves
LoopGuard Halts at N iterations or $X cost Runaway agents exhausting API quota
AuditChain SHA-256 hash-linked tamper-proof log Mutable/unsigned logs — compliance blocker
Budget Hard hourly/daily/total cost ceilings Surprise API bills
HITLGate First-class human approval with Slack routing HITL re-implemented per project
IdempotencyGuard Content-addressed dedup (Memory/SQLite/Redis/Postgres) Payments/tickets firing twice on retry
SLATracker Response time + cost + confidence enforcement No SLA primitive in any framework or cloud
PolicyEnforcer Read-only roles cannot write No authority scope enforcement
wire.hire() Plain-language → workforce assembly Engineering required to configure agents
WorkforceDashboard Live terminal + web UI Black-box agents, no visibility
DriftDetector Cross-session behavioural drift alerts Silent behaviour changes after context compression
TimeTravel Replay any past run from audit chain No post-hoc debugging in any framework
CompliancePreset SOC-2 / HIPAA / GDPR / NIST AI RMF in one line Manual compliance configuration
RBACPolicy Who can deploy, approve, audit No access control on agent operations
TenantRegistry Isolated namespaces per team/org Multi-tenant agent governance

Adapters

Same wire.deploy() API across all five frameworks:

# LangGraph
wire.deploy(compiled_graph,    backend="langgraph")

# CrewAI — fixes the documented double-fire bug on task retry
wire.deploy(crew,              backend="crewai")

# AutoGen — replaces unstable UserProxyAgent HITL blocking
wire.deploy({"a": agent, "p": proxy}, backend="autogen")

# OpenAI Agents SDK
wire.deploy(agent,             backend="openai")

# Microsoft Foundry — adds SLA + audit + idempotency Foundry lacks natively
wire.deploy(
    {"endpoint": "https://...", "agent_id": "asst_...", "credential": cred},
    backend="foundry",
)

Durable Idempotency

Works across restarts and distributed deployments:

from wire.core.idempotency_backends import SQLiteBackend, RedisBackend, PostgresBackend

# Survives restarts — single node
guard = wire.IdempotencyGuard(backend=SQLiteBackend("wire-idempotency.db"))

# Distributed — multi-process, multi-node, TTL expiry
guard = wire.IdempotencyGuard(backend=RedisBackend("redis://localhost:6379"))

# Enterprise — multi-tenant, SQL query, row-level security
guard = wire.IdempotencyGuard(backend=PostgresBackend(dsn="postgresql://...", tenant_id="team-a"))

HITL — Slack Routing

gate = wire.HITLGate(
    channel="slack:#ops-approvals",    # posts to Slack, waits for button click
    slack_token="xoxb-...",            # or set SLACK_BOT_TOKEN env var
    timeout_minutes=30,
    timeout_action=wire.TimeoutAction.ESCALATE,
)

# In your agent:
decision = await gate.request(
    run_id=run_id,
    message="Approve Jira P1 for $847 AWS anomaly?",
    context={"amount": 847, "region": "us-east-1"},
    risk=wire.Risk.HIGH,
)

Slack receives a rich Block Kit message with approve/reject/modify buttons. WIRE polls for the response and returns the decision with full audit trail.


HIRE — Semantic Matching

Three-stage pipeline, no LLM cost on the happy path:

1. Rule-based   (keyword matching — fast, free, deterministic)
2. Semantic     (SBERT cosine similarity — if sentence-transformers installed)
3. LLM fallback (Claude haiku — only when confidence < threshold)
# Synchronous — rule-based only, zero cost
workforce = wire.hire("monitor our AWS costs and open Jira on breach")

# Async — full three-stage pipeline
workforce = await wire.hire_async(
    "watch for unusual spend patterns in our cloud infrastructure",
    use_semantic=True,   # SBERT tier (pip install wire-ai[semantic])
    force_llm=False,
)

Enterprise

from wire.enterprise.compliance import CompliancePreset
from wire.enterprise.rbac import RBACPolicy, Actor, Permission
from wire.enterprise.multitenancy import Tenant, TenantRegistry
from wire.enterprise.blueprints import AgentBlueprint, BlueprintRegistry

# SOC-2 preset — auto-configures retention, encryption, HITL requirements
wire.deploy(graph, backend="langgraph",
            compliance=CompliancePreset.SOC2)

# RBAC — engineers deploy, managers approve, security reads audit
policy = RBACPolicy.default()
actor  = Actor(id="eng@company.com", groups=["wire-engineers"])
policy.require(actor, Permission.DEPLOY)   # passes
policy.require(actor, Permission.APPROVE_HITL)  # → PermissionDeniedError

# Multi-tenancy — isolated per team
registry = TenantRegistry()
registry.register(Tenant(id="team-vayu", name="Team Vayu", budget_daily_usd=10.0))

# Foundry agent identity blueprints
blueprints = BlueprintRegistry()
blueprints.register(AgentBlueprint(
    id="cost-monitor-v1",
    name="AWS Cost Monitor Agent",
    allowed_roles=["wire-engineers"],
    compliance_preset="soc2",
))

Plugins

from wire.plugins.agentlens_plugin import AgentLensPlugin
from wire.plugins.tokmon_plugin import TokmonPlugin

registry = wire.get_plugin_registry()
registry.register(AgentLensPlugin(api_url="http://localhost:8080"))
registry.register(TokmonPlugin(session_name="prod-run", budget_usd=5.0))

# All adapters emit automatically — zero code changes in agent logic

Compliance Presets

Preset Retention HITL Required For Min Confidence Data Restriction
SOC2 365 days HIGH, CRITICAL 75%
HIPAA 6 years MEDIUM+ 90% US only · PHI prohibited
GDPR 3 years HIGH, CRITICAL 80% EU only · PII prohibited
NIST_AI 2 years HIGH, CRITICAL 80%
wire.CompliancePreset.SOC2.summary()
# Compliance Preset: SOC-2 Type II
#   Audit retention  : 365 days
#   Encrypt at rest  : True
#   HITL required for: high, critical
#   Min confidence   : 75%

Repo Structure

wire-ai/
├── src/wire/
│   ├── __init__.py            ← all public exports
│   ├── deploy.py              ← wire.deploy() entry point
│   ├── hire_api.py            ← wire.hire() / wire.hire_async()
│   │
│   ├── core/                  ← Sprint 1–2 governance primitives
│   │   ├── audit.py           ← AuditChain (SHA-256 hash-linked)
│   │   ├── budget.py          ← Budget (hourly/daily/total ceilings)
│   │   ├── guard.py           ← LoopGuard (iteration + cost limits)
│   │   ├── hitl.py            ← HITLGate (CLI + Slack + email)
│   │   ├── idempotency.py     ← IdempotencyGuard (pluggable backends)
│   │   ├── idempotency_backends.py  ← Memory / SQLite / Redis / Postgres
│   │   ├── policy.py          ← PolicyEnforcer (authority scope)
│   │   └── sla.py             ← SLATracker (response/cost/confidence)
│   │
│   ├── hire/                  ← Sprint 3 HIRE engine
│   │   ├── parser.py          ← 3-stage: rule → semantic → LLM
│   │   ├── semantic.py        ← SBERT cosine similarity matching
│   │   ├── templates.py       ← 20 built-in role templates
│   │   └── workforce.py       ← WorkforceGraph + describe() + to_yaml()
│   │
│   ├── adapters/              ← Sprint 5 + v1.1 framework adapters
│   │   ├── langgraph.py       ← LangGraph CompiledGraph wrapper
│   │   ├── crewai.py          ← CrewAI Crew wrapper (fixes double-fire)
│   │   ├── autogen.py         ← AutoGen team wrapper (fixes HITL blocking)
│   │   ├── openai.py          ← OpenAI Agents SDK wrapper
│   │   └── foundry.py         ← Microsoft Foundry AgentsClient wrapper
│   │
│   ├── channels/              ← HITL routing channels
│   │   └── slack.py           ← Slack Block Kit + polling
│   │
│   ├── visibility/            ← Sprint 4 observability
│   │   ├── dashboard.py       ← Live terminal UI (Rich/Live)
│   │   ├── web_dashboard.py   ← FastAPI + SSE web dashboard
│   │   ├── drift.py           ← DriftDetector (cross-session)
│   │   ├── ledger.py          ← CostLedger (per-role/run/model)
│   │   └── replay.py          ← TimeTravel (audit chain replay)
│   │
│   ├── enterprise/            ← Sprint 6 enterprise tier
│   │   ├── compliance.py      ← SOC-2 / HIPAA / GDPR / NIST AI RMF
│   │   ├── rbac.py            ← RBACPolicy + Actor + Permission
│   │   ├── multitenancy.py    ← TenantRegistry + Tenant
│   │   ├── backends.py        ← S3 + Postgres audit backends
│   │   └── blueprints.py      ← Foundry agent identity blueprints
│   │
│   └── plugins/               ← Plugin connectors
│       ├── agentlens_plugin.py  ← AgentLens runtime profiling
│       └── tokmon_plugin.py     ← Tokmon token/cost tracking
│
├── tests/                     ← 409 tests, 6 skipped
├── examples/                  ← Sprint 1–5 usage examples
└── pyproject.toml             ← optional extras per feature

Setup

Prerequisites

  • Python 3.11+
  • An agent framework (LangGraph, CrewAI, AutoGen, OpenAI, or Foundry)

Quick start

# 1. Install
pip install wire-ai

# For your specific framework:
pip install wire-ai[langgraph]   # LangGraph
pip install wire-ai[crewai]      # CrewAI
pip install wire-ai[autogen]     # AutoGen
pip install wire-ai[openai]      # OpenAI Agents SDK
pip install wire-ai[foundry]     # Microsoft Foundry

# 2. Wrap your existing agent (5 lines)
import wire

workforce = wire.deploy(
    your_existing_graph_or_crew,
    backend="langgraph",           # or "crewai", "autogen", "openai", "foundry"
    max_iterations=50,
    max_cost_usd=1.0,
)
result = await workforce.ainvoke({"messages": [...]})

# 3. Verify your first audit chain
wire audit wire-audit.jsonl
# ✓ 12 entries · chain intact

# 4. Start the web dashboard
wire dashboard
# → http://localhost:8080

For the full enterprise stack

pip install "wire-ai[all]"

# Optional extras:
pip install "wire-ai[semantic]"   # SBERT semantic HIRE (needs torch)
pip install "wire-ai[redis]"      # Distributed idempotency
pip install "wire-ai[postgres]"   # Enterprise audit backends
pip install "wire-ai[slack]"      # Slack HITL routing
pip install "wire-ai[web]"        # Web dashboard

Environment variables

SLACK_BOT_TOKEN=xoxb-...          # Slack HITL routing
ANTHROPIC_API_KEY=sk-ant-...      # HIRE engine LLM fallback
AWS_DEFAULT_REGION=us-east-1      # S3 audit backend

Development setup

git clone https://github.com/naveenkumarbaskaran/wire-ai
cd wire-ai
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/                     # 409 passed, 6 skipped

CLI

wire version                             # v1.2.0
wire status                              # installed adapters + plugin status
wire audit [path]                        # verify audit chain integrity
wire replay --run-id <id> [path]         # replay a past workforce run
wire dashboard [--port 8080] [--audit]   # start web dashboard

Competitive Position

Research basis: 2 parallel deep-research passes · 212 adversarially-verified claims · 214 agent calls

LangGraph CrewAI AutoGen AWS Bedrock MS Foundry WIRE
Framework-agnostic
Plain-language HIRE
SLA enforcement
Tamper-proof audit Partial
HITL first-class Partial Unstable
Loop containment
Idempotency guard
Live dashboard Partial Partial
SOC-2/HIPAA presets
RBAC

SLA enforcement is absent from every cloud platform as of 2026 — confirmed 3-0 adversarial vote across AWS Bedrock, Google Vertex AI, and Microsoft Foundry.


Built by

Naveen Kumar Baskaran@naveenkumarbaskaran

WIRE assembles the governance layer from across the entire ecosystem: agentlens · tokmon · AgentGuard · agent-gateway · TokenShield · context-budget


MIT License · PyPI · Issues

The most governance-complete agent framework layer in the ecosystem.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wire_ai-1.3.0.tar.gz (115.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wire_ai-1.3.0-py3-none-any.whl (106.2 kB view details)

Uploaded Python 3

File details

Details for the file wire_ai-1.3.0.tar.gz.

File metadata

  • Download URL: wire_ai-1.3.0.tar.gz
  • Upload date:
  • Size: 115.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for wire_ai-1.3.0.tar.gz
Algorithm Hash digest
SHA256 80938013c096e5c772141126e1b639e964eaae1a65ae68b01e9567a5afb4f0d5
MD5 978f3a4fc10eec9b6df2d355392a3c20
BLAKE2b-256 0651e1205012e0a7256195a7ad1e91fbc7af0dba036ec4044a956e0dc655f1e7

See more details on using hashes here.

File details

Details for the file wire_ai-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: wire_ai-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 106.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for wire_ai-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9fed1edb3a23a584d42cf42948ec560cab65fd704cc1102a0334bd781b20048
MD5 c0f0dd352a9cd653c682aa464334e728
BLAKE2b-256 ee82633cbd5fb7aee80aeb8a721c71c595ba3b02989238b8876c05f1e1df5d50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page