News

Tools

CONFIRMED: Gemini updates agent rules without losing the cache

Google lets developers update instructions and functions during Gemini API conversations. The preview can preserve cache savings but requires integration and permission checks.

Mão insere cartão de instruções em um fluxo contínuo de conversa, com ferramentas e memória representadas em violeta e turquesa.

CONFIRMED

Google announced a change to the Gemini application programming interface, or API, on December 3 that lets developers modify rules and available tools during a conversation without invalidating the cache of earlier turns. For businesses running extended support conversations or multistep agents, the potential benefit is adapting operations without paying to process the entire existing context again.

New rules without restarting

The feature is in public preview through the Interactions API v1beta endpoint and supports Gemini 4 models. An application sends a system_input step before the next user message. It carries system-level authority, above an ordinary user message, but is inserted at the current conversation boundary. The earlier history stays unchanged and eligible for caching, a mechanism that reuses previous processing under separate billing conditions.

Previously, according to Google, developers faced two awkward options: rewrite the original instruction and lose the cache, or put the update in a user message without equivalent priority. With the new approach, instructions on different subjects remain active together. When they conflict, the model favors the most recent instruction. Earlier instructions are not deleted from the context.

When customer support changes stage

Consider a Brazilian retailer whose assistant checks orders and starts refund requests. If refunds must temporarily pause, the application can remove that function and add a tool that escalates cases to staff. The customer remains in the same conversation without having to reconstruct its history. An agency could similarly reinforce a spending ceiling after a brief is approved while retaining the discussion that explains the proposal.

Applications can also begin with a small tool set and add functions as a task develops. Any financial benefit depends on conversation length, actual cache reuse and integration quality. Google has not announced a new discount: added instructions are billed at the model's standard input rates, with no separate feature fee. Earlier turns remain eligible for cached-token pricing rather than becoming free.

Integration sets the limits

Current support covers function tools, not tools exposed by Model Context Protocol servers. MCP is a standard for connecting agents to external services. Updates happen between turns, not at an arbitrary moment during tool execution. The original system instruction and initial tools list must stay stable to preserve the reusable prefix. Google says support for Gemini Enterprise Agent Platform will follow later.

An independent discussion opened in the LiteLLM repository in September reported cache losses when translating system messages for Gemini through Vertex. It illustrates an integration problem, but does not test today's release or prove savings from it. Nor does telling an agent to stop an action replace authorization: the application must validate permissions on the backend and keep external content out of system-level instructions.

Our editorial assessment is that this makes long-running agents easier to administer, not automatically more trustworthy. For Brazilian small and midsize companies, the practical question is whether their supplier supports the new API and measures cache reuse and cost per completed conversation. Without those measurements, lower spending remains a technical opportunity rather than demonstrated savings.

Sources

Google: Introducing mid-conversation instructions in the Gemini API; Google AI Studio: Mid-conversation system instructions; GitHub, LiteLLM: issue 42104, independent integration report from September.