Cookbook / Routing
Route intent without surrendering control
Compare a single selected branch with a branch that leads into an explicit follow-up sequence.Sequential and parallel shapes
- semantic_router_parallel_example.py — independent legal destinations.
- semantic_router_sequential_example.py — route once, then follow an explicit deterministic chain.
- Fallback is an ordinary candidate and runs only when ranked first.
GitHub
Parallel routing source
Inspect independent semantic destinations.
GitHubSequential routing source
Inspect routing followed by an explicit deterministic chain.
Runbash
python cookbook/fsm/semantic_router_parallel_example.py
python cookbook/fsm/semantic_router_sequential_example.py