Router / dispatch
Classify the request first, then hand it to the matching handler.
Shape:One in, many out, only one path taken
When to use it
When inputs are heterogeneous and each class needs different tools or prompts. E.g. support traffic split into refund / technical / enquiry before dispatch.
When not to
When categories blur, or one request belongs to several. Hard classification forces ambiguous cases into a confidently wrong bucket.
How it fails
- A wrong classification makes everything downstream wrong, and quietly: the handler will earnestly answer the wrong question.
- Routing itself breaks down as options multiply. Measured on this site: past 200+ installed skills, the agent picks the wrong tool more often, not less.
- Adding a class means changing the router, and router logic is usually scattered.
Design notes
The router must be able to output "unsure", and when unsure it should stop and ask rather than pick the closest match. Write class descriptions in the user's language, not the implementation's — vocabulary mismatch is the leading cause of routing failure.
Origin
分派是既有的系統形態;作為 LLM agent 模式沒有單一可指向的首次公開實作。