Product
The compiler for agents.
AgentCompile is an SDK around your agent's model client. It learns the jobs your agent repeats from your agent's own history, proves each one on that history, and runs them compiled. Everything else goes to your agent, unchanged.
Your agent calls its model client, which the AgentCompile SDK wraps. A known job runs compiled, and the reply goes back to your agent without calling your model. Anything new, unclear or unusual goes on to your model provider, unchanged. If AgentCompile has any problem, or a step takes too long, the call goes straight to your model.
How it works
01
Learn
It learns the jobs your agent repeats from your agent's own history. There is no task list to write.
02
Prove
Each job goes live only after it gets your past conversations right. You see how each one did before anything changes.
03
Run compiled
Known jobs run without calling your agent's model. Anything new, unclear or unusual goes to your agent, unchanged.
What you get
One line to add
Install the SDK and wrap the client your agent already uses. Your loop, your model and your prompts stay as they are.
Your agent is always the fallback
Anything new, unclear or unusual goes to your agent, with the whole conversation so far.
Nothing irreversible without a yes
A compiled job asks before it changes anything, and waits for your customer's explicit yes.
It fails open
If AgentCompile is slow, unreachable or has any problem, the call goes straight to your model.
Watch before it acts
With mode set to shadow, AgentCompile decides what it would do while your model keeps answering everything.
A trail on your machine
Every call is logged locally with the route it took, so you can read each decision yourself.
Streaming, unchanged
Compiled answers come back in your provider's own response shape, streamed or not, so your agent loop doesn't change.
Your key stays yours
Your provider key never reaches AgentCompile. Your model is called with your own key.
Every call takes one route
The SDK asks AgentCompile what to do with each model call, then does one of these.
compiled- A known job: AgentCompile answers, in your provider's own response shape. Your model isn't called.
forwarded- Anything else: your model is called, unchanged, with your own key.
fail-open- AgentCompile is slow, unreachable or answering nonsense: your model is called.
shadow- With mode set to shadow: AgentCompile decides, and your model answers.
no-conversation- No conversation id: your model is called.
Works with
- Clients
- OpenAI and Anthropic, sync and async
- Languages
- Python 3.9 or newer, and TypeScript on Node 20 or newer
- Agents
- Plain agent loops and the OpenAI Agents SDK
- Models
- Any model behind an OpenAI- or Anthropic-compatible client
What it did on τ-bench retail
Agent calls
Per conversation · Gemini 2.5 Pro agent
58% fewer agent calls, with the same answers.
Agent token spend
Claude Sonnet 4.5 agent · 21 paired tasks
36%less spent on agent tokens, measured on a Claude agent.
Claude Sonnet 4.5 · 21 paired tasks · 26% with prompt caching over 48 pairs
Did anything different
478 recorded conversations it never learned from
0times it did anything different.
430 did what the agent did48 left to the agent
Held-out conversations
τ-bench retail · simulated customers
34% of held-out conversations finished with no agent call. 86% correct, against the agent's 87% on the same tasks.
Agent calls, by model
Without AgentCompile = 100%
5,000+ benchmark conversations behind these numbers.
See the resultsτ-bench retail · simulated customersRead the research
Where it fits
Support, workflow and voice agents today, with data, document and IT agents close behind. Some agent work we leave alone, on purpose.
Where AgentCompile fits