Live AgentCache
Stop paying your AI model twice for the same answer.
Your agent gets asked the same questions again and again, often in different words. AgentCache remembers the answers. Before calling a model or API, your agent checks the cache: a repeat comes back in milliseconds for $0.002. If there's no match, the check is free.
| Question | Result |
|---|---|
| “How do I reset my password?” First time asked: model called, answer saved |
miss $0.00 |
| “How can I reset my password?” Reworded · 99.8% similar |
hit $0.002 |
| “I forgot my password, how do I reset it?” Reworded · 97% similar |
hit $0.002 |
| “How do I change my email address?” Different question: no match |
miss $0.00 |
Why teams use it
Lower model bills
Every repeat question answered from the cache is a model call you don't pay for. A hit costs $0.002; a typical model call costs several times that.
Answers in milliseconds
A saved answer comes back in a few milliseconds instead of the seconds a model takes to think, so your users wait less.
The same answer every time
Customers who ask the same question get the same, already-checked answer, instead of a slightly different one each time.
Real-world examples
A team of research agents
A coding assistant
context field keeps answers for different API versions apart.Questions that look alike but aren't
What would you save?
Enter your own numbers. The math runs in your browser.
What it does
- Finds reworded questions
- Questions are compared by meaning with the bge-m3 model, which runs inside Cloudflare and understands many languages. Exact repeats are matched instantly without the model.
- Careful by default
- A saved answer is reused only when the question is at least 95% similar and every number in it matches exactly. You can raise the bar on any lookup.
- Private to your agent
- Each answer belongs to one agent, one namespace and one optional context, such as the model and system prompt. Lookups never search anywhere else.
- Pay only for hits
- A hit costs $0.002 from your prepaid wallet. Misses are free, saving answers is free, and a retried lookup with the same
Idempotency-Keyis never charged twice. - You choose how long
- Answers are kept for 24 hours by default, or anywhere from one minute to 30 days. Delete one answer, or a whole namespace, at any time.
- Never blocks your agent
- If anything behind the cache is unavailable, a lookup simply answers “miss” and charges nothing, so your agent carries on as usual.
How it works
- Check first. Before calling your model, send the question to
POST /v1/lookup. - On a hit, you're done. Use the saved answer. You paid $0.002 instead of a model call.
- On a miss, save the answer. Call your model as usual, then send the question and answer to
POST /v1/store(free). The next similar question is a hit.
Try it
# 1. Check the cache before calling your model
curl -X POST https://cache.myuiaf.com/v1/lookup \
-H "X-Agent-API-Key: fv1.acme-bot.k1.xxxxx" \
-H "content-type: application/json" \
-d '{"prompt":"How can I reset my password?","namespace":"support"}'
# 2. On a miss, call your model, then save its answer
curl -X POST https://cache.myuiaf.com/v1/store \
-H "X-Agent-API-Key: fv1.acme-bot.k1.xxxxx" \
-H "content-type: application/json" \
-d '{"prompt":"How do I reset my password?","namespace":"support",
"answer":"Go to Settings, then Security, then Reset password.",
"original_cost_usd":0.012}'
HTTP/2 200
x-agentcache-hit: similar
x-agentcache-charged-usd: 0.002
{ "hit": true, "match": "similar", "similarity": 0.9984,
"cached_prompt": "How do I reset my password?",
"answer": "Go to Settings, then Security, then Reset password.",
"charged_usd": 0.002, "original_cost_usd": 0.012, "saved_usd": 0.01 }
Pricing
| Action | Price |
|---|---|
| Lookup that finds an answer (hit) | $0.002 |
| Lookup with no match (miss) | Free |
| Saving, deleting or clearing answers | Free |
Hits are paid from the same prepaid credits as Freshness Validator and AgentPay. Buy a credit pack, or let your agent buy its own.
Rate limits
Lookups and saves are counted separately from the other services, so one service never slows down another.
| Tier | AgentCache requests per minute |
|---|---|
| Early Testing | 120 |
| Growing Product | 300 |
| Scale Revenue | 1,000 |
| Enterprise | 3,000 |
Questions
What is AgentCache?
AgentCache is a semantic answer cache for AI agents. Before calling a model or API, the agent asks cache.myuiaf.com whether it has already answered the same or a similar question. If it has, the saved answer comes back in milliseconds for $0.002.
What does it cost?
A hit costs $0.002. A miss costs nothing, and saving answers costs nothing. Charges come from the same prepaid wallet as Freshness Validator and AgentPay.
How does it know two questions mean the same thing?
Each question is turned into an embedding by the bge-m3 model, which runs inside Cloudflare. A saved answer is reused only when the meaning is at least 95% similar and every number in the question matches exactly, so "order 12345" never gets the answer for "order 12346".
Can it give my agent someone else's answer?
No. Every answer belongs to one agent, one namespace and one optional context, such as the model and system prompt. A lookup only searches that one space.
How long are answers kept?
For 24 hours by default, or anywhere from one minute to 30 days. Your agent can delete one answer or a whole namespace at any time.
What should I not cache?
Personal data, and answers that depend on who is asking or on information that changes minute to minute. Cache questions whose answer is the same for everyone in the namespace.
Works with the other services
The same key and wallet work on Freshness Validator, which tells your agent when a source has changed (a good moment to clear a namespace), and on AgentPay, which lets your agent pay for APIs per call.