Dev & EngARTICLE

Vercel cuts Agent session costs by 67% with prompt caching and context management

Vercel cuts Agent session costs by 67% with prompt caching and context management
Image: Carina Ferreira
Article · Dev & Eng
Reading
4 min
In short

Vercel announced in the platform's changelog that Vercel Agent sessions in the dashboard and on Slack became, on average, 67% cheaper, with no change to billing rates. The gain came from prompt caching and context management optimizations that any team building agents can replicate.

A Vercel publicou em seu changelog oficial que as sessões do Vercel Agent, tanto no dashboard quanto na integração com Slack, agora custam em média 67% menos para rodar. A mudança não envolveu nenhuma alteração nas taxas cobradas: o modelo de billing continua o mesmo, com a tarifa de inferência repassada do provedor do modelo mais uma taxa fixa da própria Vercel de $0.25 por milhão de tokens. A redução veio inteira do lado da engenharia: menos tokens consumidos para entregar o mesmo resultado.

Para quem acompanha agentes de IA em produção, esse tipo de anúncio costuma ser mais interessante pelo "como" do que pelo número em si. A Vercel listou quatro frentes de otimização no changelog, e todas elas são técnicas genéricas o suficiente para servir de checklist em qualquer stack de agentes, seja construída sobre LangChain, sobre um orquestrador próprio ou sobre a API de um provedor direto.

O que a Vercel mudou, item por item

O changelog descreve quatro mudanças concretas no funcionamento do Agent:

Title of Vercel's changelog announcing that Agent sessions now cost 67% less
Title of Vercel's changelog announcing that Agent sessions now cost 67% less. Reprodução: vercel.com.
  • Workflow-based CLI skills: the instructions the agent uses to operate the Vercel CLI were rewritten with a focus on common flows and error recovery, which reduces trial and error (and, consequently, tokens spent on correction loops).
  • Incremental context management: the agent now manages context more efficiently as the conversation grows, including long threads on Slack, instead of resending or reprocessing the entire history on every turn.
  • Improved prompt caching: the agent preserves more reusable context between turns, which increases the fraction of the conversation that can be read from cache instead of reprocessed from scratch.
  • More efficient coding and planning: the instructions that guide the agent when planning changes and writing code were adjusted to require fewer tokens in the process.

None of these changes requires any action from the user: Vercel applied the optimizations to the Agent's backend, and they are already in production.

Why prompt caching moves the needle so much

The most technically relevant piece here is prompt caching, because it's also the one that generalizes best beyond Vercel. Model providers like Anthropic and OpenAI charge significantly less for tokens that come from a previously seen prompt prefix (cache hit) than for tokens processed from scratch. The price difference between a cached token and a new token is usually an order of magnitude.

The problem is that prompt caching only works if the conversation prefix is stable. Every time the agent reorders, rewrites, or inserts something in the middle of the previous context, the cache "breaks" from that point on, and everything after it goes back to being charged as a new token. This is exactly the kind of waste that incremental context management tackles: instead of rebuilding the entire prompt on every turn, the system preserves what has already been processed and only adds the delta.

In short: a poorly designed agent can end up paying the new-token price on every long conversation, even when 90% of the context repeats turn after turn. Fixing this doesn't depend on switching models or lowering response quality, it depends on how the context is assembled and reused.

What changes for those building their own agents

Those running agents in production outside the Vercel ecosystem, whether an internal assistant, a support bot, or a code copilot, can use the four points from the changelog as an audit checklist:

  1. Review whether the system instructions (the equivalent of "skills") are written for specific flows or are too generic, forcing the model to spend tokens figuring out what to do.
  2. Check whether the conversation history is rebuilt from scratch on every call or whether the pipeline preserves and reuses the previously processed prefix.
  3. Check, in the provider's API response headers, the proportion of input tokens that came from a cache hit; most providers already expose this metric.
  4. Measure the average cost per session before and after any prompt change, because small template changes can invalidate the cache without that being obvious in functional testing.

This type of optimization has a trade-off that Vercel's changelog doesn't discuss: more rigid, workflow-based prompts tend to be less flexible for off-pattern cases. An agent optimized for a closed set of CLI commands can degrade in scenarios that fall outside the expected script, requiring an explicit fallback so as not to break the experience.

Where these savings don't apply

It's worth noting the limits of the announcement. The 67% reduction is an average, not a guarantee per session: short conversations with low context repetition tend to benefit less from prompt caching than long Slack threads, which is exactly the scenario cited by Vercel. Sessions that constantly change subject, without reusing previous context, don't get the same discount.

It's also important to separate what is an engineering optimization from what is a price cut: per-token rates remain the same, both the portion passed through from the model provider and the $0.25 per million tokens fee charged by Vercel itself. Those who were already monitoring spend per session in the Agent dashboard should see the bill go down without needing to change anything in their configuration, but those expecting an explicit price cut in the rate table will find the same figures published before.

Translated from the Brazilian Portuguese original · Read the original

Read also