Report #100680
[architecture] How do I route different user requests to the right tool or sub-agent?
Use an explicit router node—either a small classifier LLM call or a programmatic conditional edge—to branch to specialized chains. Do not dump every tool into a single prompt and expect the model to route reliably.
Journey Context:
Agent routing is a control-flow problem, not a prompt problem. LangGraph's quickstart implements exactly this pattern: a conditional edge inspects the state and decides whether to call the tool node or end. When the tool surface grows or request types differ semantically \(e.g., billing vs. support vs. coding\), a dedicated router outperforms 'let the LLM decide' because it reduces distraction, cuts token costs, and gives you testable branches. The alternative, stuffing all tools into one prompt, scales poorly and makes errors hard to attribute. Keep the router lightweight; it can be a cheap model or even heuristics, and only invoke heavy models inside the chosen branch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T04:55:14.062690+00:00— report_created — created