Frequently asked questions.

Detecting and preventing agent coordination failures across CrewAI, LangGraph, OMA, agentic RAG, and any Python agent framework.

How do I detect when my AI agents are stuck in an infinite loop?

Agents in CrewAI, LangGraph, and similar frameworks can get stuck in cyclic delegation, where two or more agents keep handing work back and forth without making progress. Standard tracing tools show you the timeline after the fact, when the bill arrives. AgentSonar detects the loop in real time, the moment the cycle forms. You can also opt into Prevent Mode to automatically stop the loop before it racks up token costs.

Why are my CrewAI agents looping forever?

In CrewAI's hierarchical mode, a manager agent that's never satisfied with a worker's output can keep reassigning the same task indefinitely. This often happens when the agent's prompt is ambiguous or the success criteria isn't well defined. AgentSonar catches this pattern, called repetitive_delegation, when the same agent-to-agent edge fires more than 5 times in a window.

How can I stop my LangGraph agents from running forever?

LangGraph's recursion_limit catches infinite loops, but only after they've already happened, usually after 25 or more iterations. AgentSonar catches the cycle on rotation 5 by default (configurable), giving you both real-time alerts and an opt-in PreventError that stops the graph before the next LLM call.

How much do runaway AI agents cost?

A reviewer-writer loop running overnight can burn $50 to $500 in API calls. One public incident reported a $47,000 bill caused by two agents stuck in an infinite conversation loop for 11 days, with weekly costs climbing from $127 to $18,400 before anyone noticed. The exact pattern AgentSonar's cyclic_delegation detector catches in real time, on rotation 5 by default.

What is agent coordination failure?

When agents work, whether one agent with tools or many agents talking to each other, they can fail in ways that don't produce errors or stack traces. Common patterns include cyclic delegation (loops), repetitive delegation (the same tool called repeatedly), resource exhaustion (one node doing too much, too fast), and groundless responses (the agent answers without consulting any tool). These silent failures don't crash anything; they just burn tokens or quietly mislead users. AgentSonar detects them at the graph level across CrewAI, LangGraph, OMA, and any Python agent framework.

Does AgentSonar work for single-agent systems and agentic RAG?

Yes. The substrate is the same. A single agent with tools is a graph (agent node, tool nodes, edges between them). Agentic RAG is a graph (agent, retrieval tools, vector stores). MCP setups are graphs (agent, MCP servers, tools). Cycles, rate anomalies, and repetitive patterns surface the same way regardless of how many agents are in the picture. Same SDK install, same detection.

Does AgentSonar work with the OpenAI Agents SDK?

A native OpenAI Agents SDK adapter is in development, ETA a few weeks. Today, the generic Python adapter (monitor_orchestrator) works with any agent framework including the OpenAI Agents SDK, by accepting explicit delegation events. Two lines of code to wire it up.

How is AgentSonar different from LangSmith, Helicone, or Langfuse?

LangSmith, Helicone, Langfuse, and similar tools trace per-call generation. They answer "what did the model say?" AgentSonar answers "how is the system behaving as a graph?" The two layers compose: generation tracing for prompt and token detail, AgentSonar for cycles, rate spikes, repetition, and ungrounded responses. Use both. They sit at different layers of the stack.

Does AgentSonar collect any data from my machine?

Starting in 0.4.0, AgentSonar sends one anonymous session-start event per run: install ID (random UUID), version, Python version, OS, and adapter name. Never agent names, prompts, log content, or paths. You can disable any time with AGENTSONAR_TELEMETRY=off, DO_NOT_TRACK=1, or config={"telemetry": False}. Full details and the exact wire format at /telemetry.