Skip to main content

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

Project description

WIRE — Workforce Intelligence & Reasoning Engine

PyPI version Python License

Tests Downloads Status

LangGraph CrewAI AutoGen OpenAI Foundry



agentic-ai #1 this week enterprise-agents llm-governance autonomous-enterprise


The first framework-agnostic governance layer for autonomous enterprise AI agents.

Loop protection · Tamper-proof audit · HITL · SLA enforcement · SOC-2/HIPAA/GDPR · Live dashboard

pip install wire-ai

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
WIRE terminal demo — hire, audit, replay

The GIF above shows: HIRE assembling a workforce from plain language → wire audit verifying the tamper-proof chain → wire replay rewinding a past run step-by-step.

Record your own: asciinema rec wire-demo.cast then bash demo.sh


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


Apache 2.0 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.7.3.tar.gz (606.8 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.7.3-py3-none-any.whl (140.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wire_ai-1.7.3.tar.gz
  • Upload date:
  • Size: 606.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wire_ai-1.7.3.tar.gz
Algorithm Hash digest
SHA256 3d89feb89f520b8e9e789852e9a9afe43f69e362f2e31c84f738d979163a1a1d
MD5 0fbd338970b0e8066a6d3c1c3a4e8bac
BLAKE2b-256 991f7e964f5cb532011e17d13decf171e524c260df37b1a35b69368840ca18f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wire_ai-1.7.3-py3-none-any.whl
  • Upload date:
  • Size: 140.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wire_ai-1.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 454b4c01f801718c6bf4c63747682a33745f3b61a64bef369b89c9b5a04225ae
MD5 a7ce92873832b63d134cd2c3e343d407
BLAKE2b-256 7cd9e808b0c7a3891e81b1a6ea949651b4f09e64dfa7eb326a62e0b042b03c52

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