Guide

Prompt caching: why re-reading the same context costs less, and how your agent spends magnets

Published 29 November 2026 · 11 min read

Prompt caching is the reason the first reply of a new conversation costs 3–4 magnets, and every reply after it costs a fraction of one. The model re-reads the same setup on each turn, and a re-read from the cache is billed much cheaper than a first read. Below: what exactly sits in that cache, how much cheaper a re-read is at WAM Agents and at model providers, what resets the discount and what does not affect it, and seven habits that keep your balance flat.

“The second read is the cheap one”: Vasilisa in an impossible library where the same stack of glowing pages is being re-shelved by her smaller self at a fraction of the effort

The short answer

Prompt caching is a billing rule built into modern language models. Every time the model answers you, it first reads everything it knows about the task: its instructions, the settings, the files you attached, the whole conversation so far. That read is work, and work is billed. But when the same text was read a moment ago and nothing in it changed, the model keeps the result of the previous read in a cache and bills the re-read much cheaper. A first read of the same page costs, say, a rouble. A re-read from the cache costs kopecks.

That is why a conversation with your agent has a shape like a taxi ride: the first reply of a new session costs 3–4 M, because the agent reads its whole setup, tens of thousands of tokens, plus your message. Every reply after that reuses the cached setup and costs a fraction of a magnet. The discount is automatic, you do not turn anything on. What you control is how often you reset it.

The waiter's notepad: what a prompt cache actually is

Forget the word prompt for a minute. A language model answers in two stages: first it reads, then it writes. The reading stage is called prefill, and the expensive part of it is not looking up words, it is computing how every word in the context relates to every other word. Our article What an LLM is: large language models in plain words, how they write, and which ones run in your agent shows this loop step by step.

Here is the everyday comparison. A waiter at a busy bistro does not re-meet the restaurant every time she takes an order. At the start of the shift she walks the room once: where the bar is, today's menu, which table is waiting for the bill, what the kitchen is out of. She keeps that picture on her notepad. Each new order adds one line, and the room itself barely changes between tables. Reading the notepad again takes seconds; walking the room again takes half an hour.

The context of a conversation is that room. The cache is the notepad. Each turn adds your new message to the page, and re-walking the whole room for every order would be absurd, so the model does not bill it as a full walk. Technically the saved work is the set of intermediate computations the model produced while reading, called the KV cache. You do not need the term, you need the consequence: same text, read again soon, costs a fraction of the first read.

Two conditions keep the notepad valid. The beginning of the text must be unchanged: edit one word in the middle and everything after it is re-walked. And the read must be recent: the model provider clears an unused cache after a while: by default after five minutes at Anthropic, usually within a few hours to a few days at DeepSeek. Both conditions shape the habits below.

How much cheaper a re-read is

The discount is not a courtesy of one product, it is written into the rate cards of model providers. As of 18 November 2026:

  • Anthropic bills cache read tokens at 0.1 times the base input price, a tenfold discount, and keeps the cache for five minutes by default (Anthropic docs on prompt caching).
  • DeepSeek's API does the re-read from its context cache automatically and bills cache hits at a fraction of the regular input price (DeepSeek API docs); an unused cache is usually cleared within a few hours to a few days (DeepSeek docs on the cache).
  • Inside WAM Agents the same arithmetic is what makes a conversation cheap to continue: the setup part of the context, once read, comes from the cache about 50 times cheaper, so messages later in the conversation cost a fraction of a magnet.

Note what is discounted and what is not. The re-read of the same text is cheap. Anything new is billed in full: your fresh message, files you send for the first time, a search result the agent just fetched, and the reply the model writes for you, token by token. Caching lowers the price of continuing a conversation, not the price of new work. A long analysis of a new 200-page contract costs what it costs however chatty you were before.

What your agent reads on every turn

Now the concrete numbers, from the pricing page and the rate card of the site. A magnet is spent when the agent does something: reads, searches, transcribes, draws. It is never spent for keeping the chat open.

Each turn the agent reads two kinds of text. The first is its setup: who it is, what you taught it, its skills, the rules of your chats. That is tens of thousands of tokens, and it goes into the context of every session before your first word. The second kind is the conversation itself, your messages and its replies. On the default DeepSeek Flash model, 20,000 tokens of text cost 1 M; on DeepSeek Pro, 5,000 tokens cost 1 M.

How the price of a turn is built: the first reply reads the setup and the message at full price, every next reply reuses the cached setup and adds only the new text
How the price of a turn is built: full read first, cheap re-read after

Put the two together and the shape of a session falls out by itself. The first reply of a new session reads the setup, tens of thousands of tokens, plus your message: 3–4 M. Every next reply still has that setup in front of it, but the setup arrives from the cache about 50 times cheaper, and only the new text is billed in full. That is why the status line in your chat shows a small number for most replies and a bigger one right after a reset. The counter is always in front of you: ask the agent for the balance, or open it in @wamagentsbot.

A sense of scale helps. A page of plain text is a few hundred tokens, so the setup alone is a stack of well over a hundred pages the agent reads before your first word. Reading that stack for the first time is what costs 3–4 M, and re-reading it from the cache costs a fraction of a magnet: that is the whole gap between the first reply and the ones after it. And on Flash, when a conversation grows very long, the history is compacted to its gist automatically after roughly 133,000 tokens. The reply right after compaction rereads the gist at the full price, but the gist is far shorter than the history, so the re-reads after it cost less, even in a very long conversation.

Where the discount resets

The cache is loyal to an unchanged text. Anything that changes the beginning of the context or moves you to a different one makes the next reply a first read again.

A new session or /clear. Starting a conversation from scratch, or sending /clear in the middle of one, forgets the chat. A new session and /clear assemble the context anew, and the session's service data inside it changes, so nothing matches the cache: the next reply rereads the whole setup at the full price and starts from your first message, 3–4 M, like the start of a conversation. /clear is a tool for changing the topic, not for saving money: used often, it does the opposite.

A /thinking switch. Turning the extended reasoning before the answer on or off keeps the conversation, the agent carries on with the same memory. But the reply right after the switch is billed without the discount: it rereads the setup and the accumulated conversation at the full rate, 3–4 M plus the length of the chat, five magnets in one of our tests. From the second reply after the switch, the cache is warm again. The practical rule: switch once for a series of questions, and ideally early, while the conversation is still short. Separately, reasoning itself is billed like generated text, so /thinking off lowers the price of every turn; for simple tasks that is the cheaper mode, for hard analysis it is worth its magnets.

New material. Attaching a big file for the first time, or asking the agent to fetch fresh search results, adds new text to the context, and new text is billed in full on its first read. The good news is that after the first read, the file stays in the conversation: referring to it later in the same chat costs the cheap re-read price, unless a long pause has cooled the cache. Send the contract once, then ask a dozen questions about it.

A long pause. The model provider clears an unused cache after a while: by default after five minutes at Anthropic, usually within a few hours to a few days at DeepSeek. If the conversation sat idle longer than that, the next reply, just as after a /thinking switch, re-reads both the setup and the whole conversation so far without the discount: 3–4 M plus the length of the chat. From the second reply on, the cache is warm again.

What does not reset anything: your language and the number of topics you touched. The cache does not care how messy the chat is, only where the text changed.

Seven habits that keep replies cheap

  • One conversation per project. A fresh chat pays the first-read price, 3–4 M, every time. A continuing chat pays fractions, as long as there are no long pauses between messages. Keep the supplier thread, the shop thread and the personal thread as three conversations, not thirty.
  • Do not /clear to save money. Clearing spends a first read instead of a fraction. Use /clear when the topic truly changed, for example after the supplier thread is closed for good.
  • Switch /thinking once, not per question. Each switch bills a cold-cache reply. If you need deeper reasoning for a block of work, switch at the start of that block, and switch back when it ends.
  • Send big material once, reuse it many times. The first read of a file or a long document is billed in full; every later question about it rides the cache. Collect what the agent needs in one message when you can.
  • Short messages are fine, long contexts are fine. Adding two lines to a long cached conversation costs only slightly more than adding them to a short one: the long history is reread from the cache for a fraction of a magnet. Do not re-explain the project every time; that is what the cache is for.
  • Read the status line before blaming the tariff. It shows what was spent during the turn. An expensive reply is usually a first read, a new file or a long reasoning run, and the line tells you which.
  • Know that failures are free. If a call to a provider fails on their side, a timeout or an error, its magnets come back to your balance automatically. You are billed for done work, not for attempts.

What it costs

Free gives you 200 M in the first month, then 100 M every month, with no card. Pro is $13.90 a month with 400 M, or $1.39 for the first month if you subscribe within 7 days of signing up; top-up packs of 500, 1,500 and 5,000 M are available when a month runs long, and bought magnets never expire.

The rate card on the pricing page as of 18 November 2026: a message in a thread, a fraction of a magnet. Twenty thousand tokens of text on the default DeepSeek Flash, 1 M. A web search, 1.5 M. Reading a photo or a screenshot, 1.5 M. The first reply of a new session or after /clear, 3–4 M; after a /thinking switch or a long pause, the length of the conversation is added on top. That is the cache working against you, and every next reply pays it back.

If you want to see how the same unit of work behaves when the agent acts for you, not only talks, How AI agent memory works: what it remembers, where it keeps it, and how to make it forget shows what is stored between conversations, and What is MCP? A plain-words guide to how an AI agent connects apps, with a real log of its tool calls shows where connectors add their own priced calls.

Messages worth copying

What's my balance, and what did the last reply cost?

/context — how full is this conversation?

Let's keep this project in one conversation. Remind me what we already have here.

Turn /thinking on for the next block of questions, and off when we're done.

Read this file once and keep it in this conversation; I'll have questions about it.

Start a conversation with your agent and watch the status line: the first number will be a few magnets, and every next one will be a fraction of that.

Try it with your own agent

Free, no card. The agent starts working in the chat straight away.

Create your AI agent

Questions

What is prompt caching in plain words?

Every turn, the model reads the whole conversation plus its instructions before it writes a reply. When that text was read a moment ago and nothing changed, the model reuses the result of the previous read instead of doing the work again. Providers bill such a re-read, a cache hit, much cheaper than a first read.

Why does the first reply of a conversation cost more?

The first reply of a new session reads the agent's whole setup, tens of thousands of tokens, plus your message. On the default DeepSeek Flash model that comes to 3–4 M. From the second reply on, the setup is re-read from the cache, about 50 times cheaper, so later replies cost fractions of a magnet.

Does /clear save me magnets?

No, the opposite. /clear forgets the conversation, and the next reply is a first read again: 3–4 M. Clearing often spends more than it saves. Start a new conversation when the topic actually changes, not to reduce cost.

What does /thinking on or off do to the price?

Reasoning before the answer is billed like generated text, so /thinking off makes each reply cheaper. Switching it on or off keeps the conversation, but the next reply rereads the setup and the whole conversation at the full rate, 3–4 M plus the length of the chat. Switch once for a series of questions, ideally early, while the conversation is still short.

Is a long conversation a bad idea because of cost?

No. A long conversation without long pauses reuses the cache from turn to turn, and the setup part stays almost free. One conversation per project is cheaper than a fresh chat for every question, because a fresh chat pays the first-read price every time.

How do I check what a reply actually cost?

Ask the agent for the balance, or watch the status line in the chat: it shows what was spent during the turn. /context shows how full the current conversation is. If a call to a provider fails on their side, its magnets come back to your balance automatically.

Your AI agent in Telegram, ready in a minute

Open the bot, hit Start, and it walks you through the rest.

Create your AI agent

Free · no card · nothing to install · cancel in the bot

Free no card, nothing to set upCreate your AI agent