Google Gemini API adds mid-conversation instruction updates
Google’s Gemini API can now change system instructions and function tools mid-conversation while keeping earlier prompt tokens eligible for cache reuse.
Google is opening up a new way to change an AI agent’s instructions without throwing away the conversation it has already processed. The company says developers can now update system instructions and function tools in the middle of a Gemini API session while keeping the prompt cache intact.1
The preview is delivered through Google’s Interactions API. Developers can pass a `system_input` step at a later turn, immediately before a new user input, while also supplying the previous interaction’s ID. Google says this step carries the same authority as the top-level system instruction, takes precedence over user messages and remains active for the rest of the session.
That matters because long-running agents often need to respond to changing permissions, rules or available tools. Previously, developers had to put the new instruction in a user message, which did not have the same authority, or rewrite the system instruction and risk invalidating the cache. In the latter case, the model could need to reprocess the earlier conversation, adding latency and input-token cost.
How the Gemini API update works
A `system_input` step is appended at the current turn boundary, so earlier turns remain unchanged and eligible for cache reuse. Google says multiple updates can coexist, with a newer conflicting instruction taking priority over an older one. The company’s examples show the mechanism being used to enforce a deployment freeze and remove a refund function from an agent while adding an escalation function.
Tool changes use `added_tools` and `removed_tools`. Developers can leave the top-level tools list unchanged, then adjust the functions available to the agent as the session develops. Google says this currently applies to function tools rather than MCP server tools.
The preview is available across Gemini 4 models through the v1beta endpoint. Google says there is no separate fee for `system_input`; standard input-token rates apply. Support for Gemini Enterprise Agent Platform is not available yet.
Our opinion
This is a practical upgrade for agents that operate over long sessions, particularly where access rules change while work is under way. Keeping the prompt prefix reusable should be cheaper and less disruptive than restarting a conversation, but Google’s announcement does not provide independent benchmarks for the claimed latency or cost benefits. The useful test will be whether developers can audit instruction changes clearly enough to prevent a late rule from quietly widening an agent’s permissions.
For now, the feature looks more like important plumbing than a flashy new model capability. That is precisely why it could matter: reliable agents need to change course without losing their memory or their guardrails.