Blog

# Introducing AgentCompile

Company / October 7, 2026 / Krishna Bhatnagar

Your agent does the same jobs over and over, and thinks each one through from scratch. AgentCompile learns those jobs from its own history and runs them compiled: same answers, far fewer model calls.

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

Every AI agent in production has the same secret. Most of what it does, it has done before. Where is my order. Cancel this one. Change the address on that one. Fill in the same application for a different role. The wording changes every time. The job underneath doesn't.

And every time, the agent works the job out again from scratch. It reads the policy, reads the conversation, picks a tool, reads the result, decides again. The thousandth refund costs as much thought as the one before it, and it can come out a little different each time.

## Why that matters

- Your bill: every step of the loop is a model call, and every call reads the whole conversation so far.
- Your customers: on a chat or a phone line, every model call is something they wait through.
- Your answers: reasoning varies, so the same job can go slightly differently from one customer to the next.

## What we built

AgentCompile is an SDK that wraps the model client your agent already uses. It learns the jobs your agent repeats from your agent's own history, proves each one on that history, and runs them compiled, without calling your agent's model. Anything new, unclear or unusual goes to your agent, unchanged, with the whole conversation so far.

```python
from openai import OpenAI
import agentcompile

client = agentcompile.wrap(OpenAI())  # your loop, your model, your prompts: unchanged
```

That's the whole integration: install the SDK, wrap the client, and give each conversation its id. It works with OpenAI and Anthropic clients, in Python and TypeScript.

Without AgentCompile:

- Every message goes through your agent's model.
- The same job is reasoned out again for every customer.
- Each repeat costs as much as the time before.

With AgentCompile:

- Known jobs run compiled, without calling your agent's model.
- New customers and new details are handled by the compiled job.
- Your agent's model is kept for what is new, unclear or unusual.

## What it did

We measured it on τ-bench retail, the public customer-service agent benchmark, with simulated customers: the same agent with and without AgentCompile, in the same time window. None of it is customer data.

- 58% fewer agent calls, with the same answers. Gemini 2.5 Pro agent · 17.2 → 7.3 agent calls per conversation
- 42% fewer agent calls on a Claude agent. Claude Sonnet 4.5 agent · 21 paired tasks · 38% with prompt caching over 48 pairs
- 36% less spent on agent tokens, on the same Claude agent. measured bill · 21 paired tasks, no prompt caching · 26% with caching over 48 pairs
- 34% of held-out conversations finished end to end with no agent call. 86% correct, against the agent's 87% on the same tasks
- 11.6% of compiled writes miss the right answer, against 15.6% for the agent alone. 68 of 584 compiled writes · 464 of 2,974 agent writes · every compiled write is one the customer confirmed
- 5 repeated jobs found in raw agent logs, with no task list. together they cover 85% of the agent's writes

And on 478 recorded agent conversations it never learned from, AgentCompile did exactly what the agent did in 430, left the other 48 to the agent, and never did anything different.

## What it isn't

- Not a cache. A cache replays old answers. AgentCompile learns the job, so it handles new customers, new orders and new details.
- Not fine-tuning. Your model stays exactly as it is. AgentCompile decides when a call to it isn't needed.
- Not a replacement for your agent. Your agent is always the fallback.

## What stays safe

- A job goes live only after it gets your past conversations right, and you see how each one did first.
- Nothing irreversible happens without your customer's explicit yes. A compiled job asks before it changes anything.
- It fails open. If AgentCompile has any problem, or a step takes too long, the call goes straight to your model.
- Your provider key never reaches AgentCompile.

## How the beta works

1. Show us your agent's logs. We show you which jobs repeat, and how often.
2. We prove each job on your history. Nothing goes live until you've seen how it did.
3. Wrap your model client. Known jobs run compiled; everything else goes to your agent as usual.

We're onboarding 10 beta teams at a founding price, locked for 12 months, with a full refund within 30 days.

## Who's building it

AgentCompile is built by Krishna Bhatnagar, Georgia Tech Create-X. 11x hackathon winner. If your company runs an AI agent in production, he'd like to hear what it does all day.

The person you'll talk to. [Meet the founder](/founder)

## Questions we get

**Which models does it work with?** Any model behind an OpenAI- or Anthropic-compatible client. The SDK is verified with OpenAI and Anthropic clients in Python and TypeScript.

**What happens if AgentCompile goes down?** The call goes straight to your model. It fails open, so the worst case is how your agent runs today.

**What do you need from us to start?** Your agent's logs. That's how we find the jobs it repeats.

See the founding price and the 30-day refund. [Read the pricing](/pricing)

Ready to try it on your agent? [Join the beta, 10 spots](https://cal.com/agent-compile/beta)
