Introducing AgentCompileRead the post

The first time, your agent thinks. After that, it's compiled.

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.

Build with AgentCompileTalk to the founder

Set up AgentCompile in this project. Read https://www.tryagentcompile.com/cookbook.md and follow it.

Works with
Dataτ-bench retail · Gemini 2.5 Pro agent

Our promise: the same answers as your agent, with far fewer calls to your model.

Agent calls

Per conversation · Gemini 2.5 Pro agent

Without17.2
With7.3

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

Fewer agent calls, by kind of agent

Public benchmarks · simulated users

  • Browser agents64%fewer agent calls on browser agents.
  • Customer support agents56%fewer agent calls on customer support agents.
  • Retail agents55%fewer agent calls on retail agents.
  • Voice agents45%fewer agent calls on voice agents.
  • Coding agents30%fewer agent calls on coding agents.

Voice agents also ran 2x faster on the same public benchmark.

Routing

Where each request goes.

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.

Known jobs run compiled.

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.

Your agent is always the fallback.

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.

Nothing irreversible without a yes.

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.

It fails open.

If AgentCompile has any problem, or a step takes too long, the call goes straight to your model.

Integration

One line of code.

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.

  1. Install the SDKpip install agentcompilenpm install agentcompile
  2. Wrap your client
  3. Give each conversation its id

Any model, any framework.

Works with OpenAI- and Anthropic-compatible clients, in any agent framework that lets you pass your own client.

Open the Cookbook

OpenAI-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>"
one install · one line · a conversation id per conversation Names are placeholders.

Works with

Connected where your agent already is.

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

How a pilot works.

Nothing goes live until you've seen how each job did on your history.

  1. 01Learn

    Show us your logs.

    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.

  2. 02Prove

    We prove each job on your history.

    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.

  3. 03Run compiled

    Add the SDK.

    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.

It keeps learning.

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.

  1. 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.

  2. New jobs surface

    When a kind of request starts coming back again and again, AgentCompile picks it up as a new repeated job.

  3. 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.

  4. 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.

Each step is a new job going live. The shape, not a measurement: how far it goes depends on your agent's own work.

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

Questions.

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.

Join the beta. 10 spots.

If your company runs an AI agent in production, we'd like to compile its most repeated jobs with you.

Book a call

cal.com/agent-compile/beta

To start, we'll ask to see your agent's logs.