Skip to main content

Cross-framework AI agent observability and reliability shim

Project description

Conduit

"LangSmith tells you what your agent did. Conduit tells you what went wrong, why, and fixes it — across any framework you already use."

Conduit is a cross-framework AI agent observability and reliability shim. It intercepts tool calls via OpenTelemetry, validates schemas, detects loops, and injects recovery context — all in < 5ms, without modifying your agent code.

Quick Start (< 5 minutes)

pip install conduit

LangGraph (2 lines)

from conduit.shim.adapters.langgraph import install_for_langgraph
install_for_langgraph()

# Your existing LangGraph code — unchanged
graph = StateGraph(State)
# ...

OpenAI Agents SDK (2 lines)

from conduit.shim.adapters.openai_sdk import install_for_openai_sdk
install_for_openai_sdk()

# Your existing agent code — unchanged
agent = Agent(name="...", tools=[...])

Start the dashboard

conduit dashboard
# → http://127.0.0.1:7432

What Conduit Does

Problem Conduit's solution
Tool called with wrong param types Schema validator auto-corrects "10"10 before execution
Agent loops on the same failed call Loop detector fires at N=3, injects replan context
Tool times out repeatedly Failure classifier + recovery engine retries with backoff
Schema drifted since agent was written Drift detection + conduit schema update to fix
No visibility into agent failures Dashboard with live failure feed + prescriptive recommendations

CLI

conduit dashboard                          # Start web dashboard
conduit stream                             # Live failure stream in terminal
conduit recommend                          # Print current recommendations

conduit schema list                        # List registered schemas
conduit schema validate search_web \
  --params '{"query":"test","max_results":"10"}'   # Validate params
conduit schema update search_web --from-drift      # Accept observed drift
conduit schema discover email_send                 # Infer schema from call history
conduit fix --recommendation UPDATE_SCHEMA_search_web

Register a Schema

from conduit.registry.store import SchemaRegistry

registry = SchemaRegistry("./conduit.db")
registry.register(
    tool_id="search_web",
    schema={
        "type": "object",
        "properties": {
            "query": {"type": "string"},
            "max_results": {"type": "integer", "minimum": 1, "maximum": 100},
        },
        "required": ["query", "max_results"],
    },
    version="1.0.0",
)

Ingest MCP Manifests

from conduit.registry.mcp import ingest_mcp_manifest, discover_mcp_servers

# From a file
ingest_mcp_manifest(registry, "/path/to/mcp_server.json")

# Auto-discover from CLAUDE_MCP_SERVERS env var
discover_mcp_servers(registry)

Configuration (conduit.yaml)

shim:
  timeout_ms: 5          # Pass-through if intelligence plane takes > 5ms
  fallback: pass_through

validation:
  hard_gate: false       # true = block invalid calls; false = log and pass
  auto_correct: true     # Auto-fix type mismatches, field renames

detection:
  loop_threshold: 3      # N identical calls = loop detected
  loop_window: 10

recovery:
  enabled: true
  max_retries: 2

registry:
  db_path: ./conduit.db

Key Invariants

  1. Never raises into agent code — all hooks are try/except
  2. Never blocks — passes through if intelligence plane exceeds timeout_ms
  3. Privacy by default — no param values logged without CONDUIT_LOG_PAYLOADS=true
  4. Loop detector is per-task — parallel agents never interfere
  5. Recovery is idempotent — same failure never injected twice

Architecture

Agent (LangGraph / OpenAI SDK / CrewAI)
    │
    ▼ tool calls
[Conduit ConduitProcessor]  ← OTel SpanProcessor
    │ pre-hook: SchemaValidator (< 3ms)
    │ post-hook: ToolFailureDetector + AgentLoopDetector + RecoveryEngine
    ▼
OTel Collector → SQLite (conduit.db)
    ▼
Dashboard (localhost:7432) — prescriptive recommendations

REST API

GET  /api/v1/health
GET  /api/v1/failures
GET  /api/v1/failures/{event_id}
GET  /api/v1/failures/stream          # SSE
GET  /api/v1/recommendations
GET  /api/v1/tools
GET  /api/v1/tools/{tool_id}
GET  /api/v1/schemas
GET  /api/v1/schemas/{tool_id}
POST /api/v1/schemas/{tool_id}/accept_drift
GET  /api/v1/analytics/failure_rate
GET  /api/v1/analytics/recovery_rate

License

MIT — core shim, adapters, schema validator, loop detector.

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

conduit_ai_agents-0.1.0.tar.gz (47.1 kB view details)

Uploaded Source

Built Distribution

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

conduit_ai_agents-0.1.0-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file conduit_ai_agents-0.1.0.tar.gz.

File metadata

  • Download URL: conduit_ai_agents-0.1.0.tar.gz
  • Upload date:
  • Size: 47.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for conduit_ai_agents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18944b267eb2cb8941c39201f8e358df5f8dc490578994c5d94aa9ade0b783ca
MD5 4d763e962f3e768652fa8f1fa5e6b194
BLAKE2b-256 2676475c1c1afa9f67aa3b3b5970653039af8bd7de501477dc04472b29ab0e4f

See more details on using hashes here.

File details

Details for the file conduit_ai_agents-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for conduit_ai_agents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30e267663c3f86b63537efb499ad63a329a4d2a9495ee196bccdf84f6f4a865c
MD5 588435548b40d1615871e813de3f0490
BLAKE2b-256 2ee17d16e9aecf7afb1ad8ce9f65644e8bd4ed7238d352958d950e3c9dc9c0c4

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