Agentic Tool OrchestratorAgents · 2026Code ↗
Showing an agent fewer tools made it better.
With every tool in context, each call carried 37K tokens of schemas the model mostly didn't need. Routing first and scoping the catalog cut that to 20K, and gave the model a short list it could actually choose from.
- Project
- Personal project
- Timeline
- 2026
- Stack
- Python, FastAPI, OpenAI API
- Status
- Shipped
- 20K
- schema tokens per call (−46%)
- 191
- tools across 7 services
- 80
- tests
- 8
- live end-to-end scenarios
191 tools, one confused model.
The agent could act on GitHub, Google Calendar, Linear, Gmail, Drive, Slack and Perplexity. Together that's 191 tool schemas, and GitHub alone is 86.
Putting all of them in context cost about 37K tokens of schemas on every call, and the model kept reaching for near-miss tools. It wasn't short of ability. It was drowning in options.
Route first, then act.
Stage one is a cheap router that names the services a request needs. Stage two is the tool loop, which only sees those services' tools. Press Run, or click any step.
Routergpt-4.1-mini
A small model returns the services this request needs, as strict JSON. It is told to favour recall over precision, and if it fails it fails open to every service.
Click any step for details · Run walks a request through each step
Try the router.
Pick a request and watch the catalog shrink to what it needs. Then simulate a miss: the agent asks for the missing service and carries on.
tools in context
GitHub86
Calendar29
Linear25
Gmail20
Drive20
Slack10
Perplexity1
Tool counts are exact, from the repo. The routes are examples of what the router picks for each request.
Guardrails, so it fails politely.
An agent loop with real side effects needs hard stops. These are the ones that earned their place.
- Budgets10 LLM turns, 30 tool calls and a 60-second soft budget per request.
- Repeat-failure stopTwo identical failures in a row end the run instead of looping on a broken call.
- 80 testsIncluding 8 live end-to-end scenarios, so routing changes can't quietly regress.