← Work · Case 02
AI Control Tower: delegation behind a gate
Premium agents keep the reasoning. Bulk work goes to cheaper models, only after an exact approval.
StatusIn development
TypeMCP server
RoleConcept, design and build, with AI agents
01 · Problem
Problem
Large documents and datasets burn expensive agent tokens on work a cheaper model can do. Handing jobs to other providers usually means silent fallbacks, exposed keys and no record of what ran where.
02 · Approach
Approach
An MCP server with six tools. The agent plans a job; the tower answers with provider, pinned model, privacy class, limits, an informational estimate and the reason for the routing, plus an exact approval phrase. Nothing runs until a human types it.
03 · Architecture
Architecture
04 · Guarantees
Guarantees
- 01No live call is made while planning.
- 02The named provider is locked. An error never triggers a fallback.
- 03Keys stay in the OS keychain, never in the chat.
- 04A file changed after planning needs a new plan and a new approval.
- 05Partial, failed or cancelled jobs are never presented as complete.
05 · Stack & decisions
Stack & decisions
| TypeScript | Strict contracts between the agent, the tools and each provider. |
|---|---|
| MCP | Any coding agent can use the six tools without custom glue. |
| Gemini · DeepSeek · Groq · Grok | Adapters behind one provider-neutral contract, each with contract tests. |
| OS keychain | Keys are read at call time and never pass through a prompt. |
| Job ledger | Every job is recorded locally and can resume from its checkpoints. |
06 · Proof
Proof
- ai_provider_statuschecks locally that credentials exist; never shows keys
- ai_plan_jobnon-executing plan: provider and model pinned, finite limits,
- and an exact approval phrase
- ai_submit_jobruns only if the phrase matches exactly
- ai_job_statusreads local state
- ai_get_resultnormalised results with provenance; partial is not complete
- ai_cancel_jobstops future work, keeps what was already created
- privacy classes
- publicexplicit or automatic routing
- privateonly after the provider data policy is assessed for that job
- sensitiveprovider must be named; stop if retention or region is unknown
- a cost estimate of "unknown" means unverified. never free.
Excerpt from the real system, translated and sanitized: no names, identifiers or data.