03/Flow Routing
Router Types
The seven router types and when to use each.
Each router is a "decision unit" that picks one of its outgoing edges. There are two paradigms: condition-based branching (content, semantic, rule) and best-pick / split (score, weighted, canary).
| Router | Looks at | Decision | Example use |
|---|---|---|---|
| Content | Message meaning (LLM) | Branch by category | Topic-based expert model |
| Semantic | Message meaning (embedding) | Nearest category | Cheap/fast topic routing |
| Rule | Request features | First matching rule (if-then) | By size/vision/plan |
| Score | Node metrics | Best (min) score | Fastest/cheapest/idle |
| Weighted | Weights | Weighted random | Load spreading |
| Canary | Percent + trace | A/B split + arm tag | Gradual rollout |
| Round Robin | Counter | Cycle in order | Even distribution |
Routers compose: one branch of a content router can lead to a score router, which leads to members. The power of the graph is this composability.
Entry
routerSemanticgreeting / code
Chat model
routerScoremetric: cost
Cheap coder
Coder B