Router
A router is a component that directs an incoming request or task to a destination or processing path according to routing criteria.
Rearchitecting LLMs
A request router is a component that directs incoming requests to an appropriate processing queue or model configuration.
- How it is used
- Directs requests to adapter queues or fallback APIs and assigns token-level computation to mixture-of-experts specialists.
- How deep it goes
- Develops routing from linear projections through training, top-k selection, inspection, and deployment trade-offs.
- Examples
- Uses clinical extraction and general-knowledge prompts to inspect expert weights, alongside a confidence-gated API fallback.
- What you can do after
- Builds and evaluates a trainable MoE router, including top-k inference and token-level routing inspection.
Context Engineering
A routing agent analyzes an incoming query and directs it to a specialized retrieval tool or knowledge store.
- How it is used
- Routes requests to specialized agents or retrieval destinations as part of context orchestration.
- How deep it goes
- Explains state-based classification and conditional graph branches, then recommends confidence thresholds and explicit fallbacks for production.
- Examples
- Uses a customer support workflow with sales, technical support, and general agents.
- What you can do after
- Apply it via LangGraph to dispatch support questions through conditional branches.
Also covered in
- Agent Design PatternsIn early access (MEAP)
- Vanilla WebIn early access (MEAP)
- Effective Conversational AI
- Microservices Patterns, Second EditionIn early access (MEAP)
- Build a Multi-Agent System (from Scratch)In early access (MEAP)
- Designing AI AgentsIn early access (MEAP)
- Financial AI in Practice
- AI Agents in Action, Second Edition
What to know first
- subagentA subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority.
- context windowA context window is a bounded span of sequence elements or contextual information that a model or processing operation can consider together.
- retrieval-augmented generationRetrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- promptA prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
Related concepts
- subagentuses · A subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority.
- mixture of expertspart of · A mixture-of-experts model is a neural-network architecture with specialized subnetworks and a routing mechanism that selects or combines experts for each input.
- small language modeluses · A small language model is a comparatively compact language model with limited parameters or capacity and typically lower computational and storage requirements than larger models.
Questions about router
What is router?
A router is a component that directs an incoming request or task to a destination or processing path according to routing criteria.
Which Manning books explain router?
Rearchitecting LLMs and Context Engineering.
What should I know before learning router?
Manning books that teach router usually introduce subagent, context window, retrieval-augmented generation and prompt first.
What kinds of router are there?
Kinds of router include ensemble router, multi-layered router and proximity router.
What is router part of?
Router is part of mixture of experts. A mixture-of-experts model is a neural-network architecture with specialized subnetworks and a routing mechanism that selects or combines experts for each input.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

