Dynamically directing a user request to the most appropriate specialized agent, model, or processing path based on the semantic intent and complexity of the query. A "Router" classifies the input and delegates execution to a downstream handler optimized for that specific task.
A broken pipeline is given to you. Diagnose the bugs — missing components, wrong order, unnecessary blocks — and fix it.
Write the actual system prompt for an agent in this pattern. Your prompt is tested against real scenarios and graded by AI.
The pipeline works but it's expensive. Swap models, toggle optimizations, and hit cost/quality/latency targets.
Need a refresher? Read the Routing pattern guide →