AboutWorkProjectsNotes
PT

say hi

 © 2026

  • Agentic Tool OrchestratorPersonal project
    • The problem
    • What I built
    • Try the router.
    • Guardrails, so it fails politely.
  • Industry Layoff TrackerTeam project
  • Kalshi paper-trading agentPersonal project
  • ClockinSolo project
  • TB detection researchCo-author

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
37K →
20K
schema tokens per call (−46%)
191
tools across 7 services
80
tests
8
live end-to-end scenarios
01

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.

02

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.

idle
stage 1 · routingRequestRoutergpt-4.1-miniScoped catalogrouted services onlyTool loopscoped toolsAnswerEscape hatchrequest more toolsCircuit breakersturn + call budgets

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

03

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 context55of 191

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.

04

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.
next projectIndustry Layoff Tracker · Measuring the mood of layoff season.