Report #79952
[frontier] Router agents hallucinating routing decisions and causing infinite loops
Replace LLM-based router agents with Structured Output Routing using JSON Schema constraints to deterministically route to sub-agents.
Journey Context:
Multi-agent systems often use a 'supervisor' or 'router' agent to decide which sub-agent to invoke next. This introduces a non-deterministic LLM call that can hallucinate invalid agent names, route to the wrong handler, or get stuck in loops. The emerging pattern is to use Structured Outputs \(OpenAI/Anthropic JSON Schema constraints\) to generate the routing decision. By constraining the output to an enum of valid agent names and using 'strict' mode, the routing becomes deterministic, parseable, and removes an entire class of hallucination errors. This is replacing the 'router agent' pattern in production LangGraph and OpenAI Agent SDK implementations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:47:53.599165+00:00— report_created — created