closed beta · LangGraph, CrewAI & Claude Code supported · Book a Demo →
Home How It Works Frameworks Reports Claude Code FinOps FAQ GitHub Discord
01 // observe

Your agents run.
agentSonar listens.

Two lines wire agentSonar into your existing setup. It instruments delegation calls between agents without touching prompts, API keys, or any LLM call directly. Nothing leaves your machine.

LangGraph · one line
from agentsonar import monitor

graph = monitor(your_graph.compile())
# that's it. run your graph as normal.

No prompt changes

agentSonar instruments the delegation layer, not LLM calls. Your prompts are untouched.

No remote service

Everything runs in-process. No data leaves your machine unless you opt into telemetry.

No API keys required

agentSonar observes your agent graph directly. It doesn't need credentials.

Any framework

Native adapters for LangGraph and CrewAI. Custom Python or Node for everything else.

02 // detect

Pattern engine watches
the shape of traffic.

agentSonar doesn't watch individual spans — it models the graph of agent-to-agent delegations and spots pathological patterns that look perfectly healthy span by span.

what the engine tracks internally
// builds a directed graph of delegation events
researcher → writer    // edge weight: 1
writer     → reviewer  // edge weight: 1
reviewer   → researcher // edge weight: 1  ← closes a cycle

// cycle detector fires on rotation 1
// WARNING threshold:  5 rotations  (configurable)
// CRITICAL threshold: 15 rotations (configurable)

Silent loops

Agents cycling work in a circle. Fires when a directed cycle closes and repeats past threshold.

Repeated calls

The same agent called with the same task multiple times. Fires when repetitions exceed threshold.

Traffic spikes

A burst of agent-to-agent calls wildly outside the session's baseline rate.

Redundant work

Same tool, same args, same result — called repeatedly with nothing new ever coming back.

Stuck tool calls

A tool call starts and never returns. The agent waits indefinitely, blocking the pipeline.

Subagent explosion

Runaway fan-out spawns far more subagents than expected. Token bill multiplies silently.

Failed-tool retry storms

Hammers the same failing endpoint repeatedly instead of stopping or routing around it.

Context-window cliff

Session filling toward the context limit — where quality degrades or the run fails entirely.

Configurable thresholds

Every threshold is overridable. loop_threshold=3 for tighter production guardrails.

03 // alert

Three signals.
No dashboards required.

The moment a threshold trips, agentSonar writes to three places simultaneously. All of it lands on disk. None of it requires a network connection.

stderr · live during the run
[SONAR 14:32:01] session started (id: 43b4782630244f8d)
[SONAR 14:32:03] cycle found: researcher→writer→reviewer
[SONAR 14:32:09] ⚠  WARNING  cycle · 5 rotations · 3,600 tokens
[SONAR 14:32:18] 🚨 CRITICAL cycle · 15 rotations · 11,400 tokens

Real-time stderr stream

Alerts fire as the failure forms. Pipe to your logging stack or read live in your terminal.

Live JSONL timeline

Every event flushed on write. tail -f timeline.jsonl while agents run.

Standalone HTML report

Written on shutdown. No external CSS, JS, or network. Email it or attach to a ticket.

Stable failure IDs

Consistent IDs per pattern across runs. Correlate today's loop with last Tuesday's.

04 // prevent

Opt in once.
Stop it before it hits your bill.

Detection tells you what happened. Prevent Mode (opt-in) raises a typed PreventError the moment a failure crosses its trip threshold — before the next LLM call. Your code catches it, you decide what to do.

Python · Prevent Mode
from agentsonar import monitor_orchestrator, PreventError

sonar = monitor_orchestrator(config={
    "prevent": {"cyclic_delegation": True}
})

try:
    while True:
        sonar.delegation("researcher", "writer")
        # ... agents run ...
except PreventError as e:
    print(f"Stopped: {e.reason}")
    print(f"Loop: {' → '.join(e.cycle_path)}")

Typed exception

PreventError carries the cycle path, rotation count, and tokens burned. Catch and log exactly what happened.

Off by default

One config key opt-in. Detection always runs. Prevent only activates when you ask for it.

Available today

LangGraph, Custom Python, Custom Node, OMA sidecar. CrewAI Prevent Mode coming soon.

Per-failure-type control

Enable Prevent for loops only, or enable per-type. Repeated calls and spike auto-stop on the way.

What's in active development.

None of these are shipped yet. Called out so you know where the project is headed.

coming soon

More framework adapters

OpenAI Agents SDK, Anthropic Claude Agent SDK, AutoGen. Native adapters, same two-line wire-in.

coming soon

Cost-Avoided Ledger

Per-customer, per-tool dollar attribution. The CFO-facing dashboard that shows what agentSonar saved.

coming soon

React dashboard

Web UI on top of the JSONL timeline. Real-time view of every agent session.