AgentAssert Type-C
LIVEZero-Code Behavioral Contracts for AI Agents
AgentAssert Type-C enforces formal behavioral contracts on any AI agent without modifying a single line of agent code. A lightweight HTTP proxy sits between your agent and your LLM provider — intercepting every request and response, evaluating it against your YAML contract, and returning a structured violation response when a contract is breached. 7 operators cover the full contract surface: cost ceiling, latency SLA, tool allowlist, topic boundary, PII filter, repetition guard, and message sequence integrity. JSD-based semantic drift detection catches prompt injection and goal drift. The Θ reliability scorer gives (p,δ,k)-satisfaction guarantees — math, not marketing. 213 tests, 100% coverage on core, MIT license.
Features
Zero Code Changes
Point one env var at the proxy. Your existing agent code is completely unchanged. Works with any language, any framework.
7 Formal Operators
cost_ceiling, latency_sla, allowed_tools, topic_boundary, pii_filter, repetition_guard, message_sequence — covering cost, latency, safety, and behavioral integrity.
JSD Drift Detection
Jensen-Shannon Divergence measures semantic drift from defined topic boundaries. Catches prompt injection and goal drift before your agent acts on them.
Θ Reliability Scorer
(p,δ,k)-satisfaction guarantee: 'With probability ≥ p, at least k operators pass, with confidence δ.' Formal math, not vibes.
Multi-Provider Support
Works with Anthropic, OpenAI, Azure OpenAI, and any OpenAI-compatible endpoint. Provider-agnostic by design.
Claude Code Hook Adapter
pip install agentassert-typec-claude-code enforces contracts at the Claude Code hook layer — before the HTTP request is even made.
All IDE Support
Works with Claude Code, Antigravity, Cursor, Windsurf, Cline, and any tool that speaks HTTP to an LLM provider.
Use Cases
Research Paper
AgentAssert: Behavioral Contracts for AI Agent Compliance
Varun Pratap Bhardwaj, 2026
Read on arXiv→