empirical bayesian routing for ai coding agents
replaces synthetic benchmarks with real-world test suite verification. helps claude, codex, and cursor choose the optimal model for every refactor, debug, and architecture task.
how you actually use kangarouter with claude & codex
if you build daily with claude code, claude desktop, chatgpt codex, or cursor, here is the exact 3-step loop:
add to claude config
add kangarouter as an mcp server in claude_desktop_config.json:
"mcpServers": {
"kangarouter": {
"command": "npx",
"args": ["-y", "kangarouter", "mcp"]
}
}
ask claude to route
type to claude as you normally would:
claude calls kangarouter_get_prior in the background.
get real win-rates
claude checks real test-pass data across 700+ verified runs:
terminal 1-liner
run in your project root before launching codex:
npx kangarouter connect
saves credentials safely in local environment.
automatic risk detection
codex inspects the diff scope and derives the task shape key:
instant fallback routing
if codex hits a quota limit or stalls, kangarouter seamlessly escalates to the highest-confidence fallback lane without losing worktree context.
semantic worktree locks
when claude and codex run simultaneously on different tasks, kangarouter prevents them from overwriting each other's files.
test-driven verification
tasks are only marked successful when your test suite passes (`npm test` / `pytest`). failed runs trigger automatic rollback.
earn credits for runs
every verified test-pass submits an anonymized digest (zero code / zero prompts) and awards +5 credits to your account.
live network intelligence state
aggregated empirical performance from independent contributing clusters
empirical prior resolver
inspect real candidate distributions for any task shape
connect your agent fleet in 60 seconds
works out-of-the-box with codex, claude code, cursor, aider, and custom python agents
run directly inside any workspace:
npx kangarouter connect
install standard python package:
pip install kangarouter