loading
loading
A lightweight dispatcher that reads an incoming request and sends it to the right model, tool, or agent.
A router classifies the input — by intent, difficulty, or domain — then forwards it to the best handler instead of running everything through one expensive path. It's the core of cost control and multi-agent setups: cheap/simple queries go to a small model, hard ones to a big one, billing questions to the billing agent. Example: a support bot routes 'reset my password' to a scripted tool but escalates 'my charge is wrong' to a reasoning agent with database access.
Plainly
Think of Router as a simple recipe for doing the work better. A lightweight dispatcher that reads an incoming request and sends it to the right model, tool, or agent.
In practice
Use it when you need a repeatable method instead of guessing from vibes. In practice, define the owner, input, output, and failure mode before you rely on it.