Report #55906
[frontier] LLM agent orchestration is unreliable — agent-as-router makes wrong routing decisions, loops, or skips steps
Use deterministic code \(state machines, workflow engines\) as the orchestrator. LLMs are workers only. Define transitions, guards, and routing in code using LangGraph StateGraph, Temporal workflows, or plain Python switch statements for orchestration logic.
Journey Context:
The first generation of multi-agent systems used an LLM to decide which agent to invoke next \(agent-as-router\). This proved unreliable in production: the LLM would loop, route to wrong agents, or skip critical steps. The winning pattern is code-as-orchestrator: the control flow is deterministic and inspectable, and LLMs only handle the work within each step. OpenAI's Swarm encodes this via handoff functions \(code, not LLM decisions\). LangGraph uses explicit state machine definitions. Temporal\+AI uses workflow-as-code. The tradeoff is less 'emergent' behavior, but production systems need reliability over emergence. You can always add an LLM call inside a workflow step — just don't let the LLM own the control flow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:20:04.313005+00:00— report_created — created