Star on GitHub ★
Framework Adapters · Zero Vendor Lock-in

Agent Framework Integrations

AgentAssert operates as an independent, sidecar validation layer. You do not need to rewrite your agent workflows; wrap your existing LangGraph, CrewAI, AutoGen, or OpenAI agents in under four lines of code.

Interactive Code Switcher LangGraph · CrewAI · AutoGen · OpenAI

Wrap Any Agent in 4 Lines of Code

Select your orchestrator below to inspect exact Python syntax, decorators, and middleware interceptors.

Framework Adapters · 4 Lines to Runtime Enforcement
Zero Vendor Lock-in · Compatible with any LLM
StateGraph Middleware Python 3.10+ · pip install agentassert-abc
from langgraph.graph import StateGraph, END
from agentassert_abc import Contract, Monitor

# 1. Load contract specification
contract = Contract.from_yaml("financial-advisor.yaml")

# 2. Decorate node or wrap StateGraph
workflow = StateGraph(AgentState)
workflow.add_node("financial_agent", Monitor(contract).wrap(my_agent_node))

# 3. Compile guarded state graph
app = workflow.compile()
# Invariant evaluation: < 4.2ms per node execution
Integration Latency: < 10 ms inline
View Runnable Examples on GitHub ↗