Dev.to
6/17/2026

Beyond the Agentic Loop, in TypeScript: building a shopping agent with the Orchestrator pattern
Short summary
The Orchestrator pattern separates multi-agent routing from execution using three fixed steps: Route (LLM decides agents), Execute (code runs them parallel or sequential), Synthesize (LLM formats results). This eliminates traditional agentic loops' unpredictability (3-9+ calls per query) and non-determinism. Includes full TypeScript implementation with shopping-agent example covering catalog search, inventory, pricing, reviews, and order placement.
- •Three-step pattern: Route → Execute → Synthesize eliminates unpredictable LLM call counts
- •Deterministic execution with fixed shape: two LLM calls regardless of how many agents run
- •Complete TypeScript shopping-agent implementation with parallel and sequential execution modes
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



