Agent calls
Per conversation · Gemini 2.5 Pro agent
58% fewer agent calls, with the same answers.
Introducing AgentCompileRead the post
Your agent repeats the same jobs and thinks each one through from scratch. AgentCompile runs them compiled, with the same answers and far fewer model calls.
Per conversation · Gemini 2.5 Pro agent
58% fewer agent calls, with the same answers.
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
478 recorded conversations it never learned from
0times it did anything different.
430 did what the agent did48 left to the agent
τ-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.
Without AgentCompile = 100%
5,000+ benchmark conversations behind these numbers.
See the resultsPublic benchmarks · simulated users
Voice agents also ran 2x faster on the same public benchmark.
Routing
AgentCompile wraps your agent's model client. Known jobs run compiled. Anything new, unclear or unusual goes to your model, 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.
Four rules for every request.
Known jobs run compiled, your agent is always the fallback, nothing irreversible happens without a yes, and it fails open.
Three different requests run into one compiled job, and three identical answers come out. Your model stands beside it and is never called.
Your agent's model isn't called for them. AgentCompile learns the job, so it handles new customers, new orders and new details. A job goes live only after it gets your past conversations right.
A known request runs into the compiled job. A new one, carrying the conversation so far, turns off before the job and goes to your agent.
Anything new, unclear or unusual goes to your agent, unchanged. When AgentCompile hands a conversation back, your agent gets the whole conversation so far.
A change from the compiled job waits at a lowered bar. A yes arrives, the bar lifts, and only then does the change go through.
A compiled job asks your customer before it changes anything, and waits for their explicit yes.
The compiled job has a problem, so the request takes the path around it, straight to your model.
If AgentCompile has any problem, or a step takes too long, the call goes straight to your model.
Integration
Install the SDK and wrap the model client your agent already uses. Pass an AgentCompile key, and a conversation id with each conversation. Your model and your prompts stay exactly as they are.
pip install agentcompilenpm install agentcompileWorks with OpenAI- and Anthropic-compatible clients, in any agent framework that lets you pass your own client.
Open the CookbookOpenAI-compatible
from openai import OpenAIAdded line: import agentcompileclient = OpenAI()Added line: client = agentcompile.wrap(Added line: client, key="<agentcompile key>"Added line: )Anthropic-compatible
from anthropic import AnthropicAdded line: import agentcompileclient = Anthropic()Added line: client = agentcompile.wrap(Added line: client, key="<agentcompile key>"Added line: )also pass, per conversation
Added line: conversation_id="<conversation id>"Works with
AgentCompile wraps the model client your agent already uses, so it goes wherever that client goes: any model behind an OpenAI- or Anthropic-compatible client. Your model and your prompts stay exactly as they are.
The AgentCompile SDK, connected to OpenAI, Anthropic, Google Gemini, Grok, Microsoft Azure and Amazon Bedrock.
Pilot
Nothing goes live until you've seen how each job did on your history.
01Learn
We show you which jobs your agent repeats.
Your agent's logs: requests like order status, cancelling an order, changing an address and filling in a job application come up again and again, and each is marked as a repeated job. A request that doesn't repeat is left unmarked.
02Prove
Each job has to get your past conversations right.
A job is replayed on your agent's past conversations. In most it does exactly what your agent did; in the rest it doesn't act and leaves the conversation to your agent. It never does anything different.
03Run compiled
Known jobs run compiled. Everything else goes to your agent as usual.
One line adds the SDK, wrapping your agent's model client. Then live requests at that client: known jobs like order status, cancelling an order or filling in an application run compiled, asking the customer for a yes before changing anything. A new request goes to your agent, unchanged.
Your agent's history keeps growing, and AgentCompile keeps reading it. When a new job starts to repeat, it's proven on your history and goes live, so more of your agent's work runs compiled over time.
Your agent works
Every conversation adds to your agent's history. With capture on, each call is sent in the background, scrubbed on your machine first.
New jobs surface
When a kind of request starts coming back again and again, AgentCompile picks it up as a new repeated job.
Each one is proven
A new job goes live only after it gets your past conversations right. Nothing changes until you've seen how it did.
More runs compiled
Each job that goes live is one more your agent's model doesn't have to think through. Everything else still goes to your agent, unchanged.
A stepped chart over time: the share of your agent's calls that run compiled climbs one step each time a new job goes live, and the rest goes to your agent. It shows a shape, not measured values.
FAQ
What it is, why use it, and what it needs from you.
An SDK that wraps 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 then runs them compiled, without calling your agent's model. Anything new, unclear or unusual goes to your agent, unchanged.
Your agent does the same jobs over and over, and thinks each one through from scratch. Once a job is compiled, your agent's model isn't called for it. On τ-bench retail, that meant 58% fewer agent calls, with the same answers.
Companies running an AI agent in production, and the engineers who run it.
Install the SDK and wrap the model client your agent already uses. Pass an AgentCompile key, and a conversation id with each conversation. Your model and your prompts stay exactly as they are.
Any model behind an OpenAI- or Anthropic-compatible client, including OpenAI, Anthropic, Google Gemini, Grok, Microsoft Azure and Amazon Bedrock, in any agent framework that lets you pass your own client.
It fails open. If AgentCompile has any problem, or a step takes too long, the call goes straight to your model.
No. A cache replays old answers. AgentCompile learns the job, so it handles new customers, new orders and new details.
No. Your model stays exactly as it is. AgentCompile decides when a call to it isn't needed.
For anything new, unclear or unusual, the same request it gets today, unchanged. When AgentCompile hands a conversation back, your agent gets the whole conversation so far. For known jobs, your agent's model isn't called.
From your agent's own history: its logs. A job goes live only after it gets your past conversations right, and you see how each job did before it goes live.
To start, your agent's logs. We show you which jobs repeat and prove each one on your history. To go live: add the SDK with an AgentCompile key, and pass a conversation id per conversation.
No. Every result here ran on τ-bench, the public customer-service agent benchmark, retail domain, with a simulated customer. A pilot measures your own traffic.
We go through data handling, key handling and where AgentCompile runs with you on a call, before you share any logs.
Yes, as one of 10 beta teams. Book a call to start.
If your company runs an AI agent in production, we'd like to compile its most repeated jobs with you.