# Show HN: AgentTrafficCop – Stop AI agents from looping and burning money

> Source: <https://agenttrafficcop.com>
> Published: 2026-11-02 14:43:09+00:00

AgentTrafficCop is a runtime circuit breaker for multi-agent systems. It validates every handoff, fingerprints every payload, and trips before a loop empties your API budget.

Every handoff validated against a strict Pydantic v2 contract before it reaches the next agent. Malformed payloads are rejected at the door.

SHA-256 fingerprinting on every payload. Identical repeats and A↔B ping-pongs trip the breaker. Step counters catch the rest.

When thresholds breach, the response carries structured diagnostics. Your orchestrator decides: halt, alert, or escalate.

``` python
your_orchestrator.py

from agenttrafficcop import Guard, LoopDetected

guard = Guard(url="https://api.agenttrafficcop.com", api_key="your-key")

try:
    result = await guard.check(
        session_id="run-42",
        sender="coder",
        recipient="reviewer",
        payload={"diff": "fix typo"},
    )
    print("approved at step", result.step)
except LoopDetected as e:
    print("loop caught:", e.error_code)
```

Runs as a standalone FastAPI service. Works with LangGraph, CrewAI, AutoGen, or raw asyncio. The SDK ships a LangGraph adapter — wrap any node in one line.

The middleware and SDK are open source and self-hostable today. Managed tiers are coming soon.
