Gemini API Mid-Conversation Instructions: Change the Rules Without Losing the Cache
One Tradeoff Nobody Liked
Long-running AI agents have a quiet, expensive problem. Halfway through a conversation, the rules change. A customer asks for a refund, and suddenly the agent needs a new tool. A billing review starts, and the agent needs a new instruction. Until now, the Gemini API made you choose: change the rules, or keep your prompt cache. You could not have both, because the tool list sat at the start of the prompt, and changing it broke the cache. On 3 December 2026, Google removed that tradeoff. The Gemini API now supports mid-conversation instructions: a new step, called system_input, that lets an app update the instructions or the available tools without breaking the cache. With Gemini API mid-conversation instructions, a long-running agent can adapt when the facts change instead of paying to reread everything it has already seen.
The announcement came from Trey Nguyen, Product Manager for the Gemini API, and Daniel Kyme, Product Manager for Google Cloud. It is a public preview, not a general release. Gemini API mid-conversation instructions are now in public preview, and they let an agent change its rules and its tools mid-conversation — something that is usually a good idea anyway, because instructions that cannot adapt become stale and turn into workarounds. That does not mean the feature is ready for every production system. The model still decides, the same way it did before, when and how to use the tools it can see. It only changes how the rules reach the model. But for anyone building agents that run for dozens of turns, Gemini API mid-conversation instructions fix a real cost problem.
How Gemini API Mid-Conversation Instructions Work
The core of Gemini API mid-conversation instructions is a new step type called system_input. In the Interactions API, you can now send a system_input step alongside user_input and model_output steps. It carries the same authority as a top-level system instruction, but it is appended later, at the current turn boundary. That placement is the point: all the tokens before it stay exactly the same, so the prompt cache stays valid.
Placement matters, and Google is specific about it. To send Gemini API mid-conversation instructions, you pass the previous turn’s ID in previous_interaction_id and place a system_input step directly before user_input in the input array. Keep the top-level system_instruction the same across turns, and keep the original tools list the same too. Each system_input step is appended to the history as its own step and stays active for the rest of the session, alongside the original system_instruction. Rules that cover different topics stay in effect together. If a newer system_input conflicts with an earlier one, the model favours the most recent instruction.
Retrieval stays tidy too. When you fetch an interaction with client.interactions.get, each system_input step appears in order alongside user_input and model_output steps, so multi-turn traces stay straightforward to audit and debug.
Tool Changes, Not Just Text
With Gemini API mid-conversation instructions, tool changes travel in the same step, through added_tools and removed_tools. Google’s example is a support agent that starts with get_store_hours and issue_refund. On the next turn, the app removes issue_refund and adds create_escalation_ticket, while the top-level tools list stays identical. The API processes removed_tools before added_tools, so you can replace a tool definition in place by naming it in both fields. Adding a short text note when you remove a tool also helps the model understand why it has gone.
Tool updates stay in effect until a later system_input changes them. Only function tools can be updated this way, and only those that were declared as tools in the first place. This is the part that should shape how you design your tool sets: if a capability is missing from the original declaration, you cannot add it later through this route.
The Rules That Catch People Out
This is a preview, and previews have sharp edges. The ones Google documents are worth reading before you build on Gemini API mid-conversation instructions.
First, tool updates support function tools only. MCP server tools and built-in tools such as Google Search are not covered. Second, at most one system_input step is allowed per turn, and it must sit directly before a user_input step. Third, and this is the one that will break integrations, you must keep passing the original tools list, unchanged, on every turn. If you change it, the cache is invalidated and the whole point of the feature disappears. Fourth, the feature is limited to model interactions through the Interactions API on the v1beta endpoint. You can pass a text note, tool updates, or both in a single system_input step.
It is also worth knowing that system_input, added_tools and removed_tools steer behaviour and act as orchestration controls. They do not authorise anything. Your application still needs to check permissions before an agent acts — for example, before it issues a refund.
What It Costs, and What It Does Not Promise
There is no separate fee for Gemini API mid-conversation instructions. Tokens inside system_input steps are billed as input tokens, exactly like the tokens in the original system instructions. The real saving is cache reuse, because a system_input step keeps the prompt prefix intact, so the API does not need to reread it. The amount saved depends on your model and cache tier, so check your own token counts. For Gemini 4 Neon, that is $3.00 per million input tokens, with cached tokens at $0.15 per million — before any prompt-caching discount.
Google is also clear about what this feature is not. The company writes that system_input, added_tools and removed_tools are orchestration controls. They do not give the model permission to act, and they do not check permissions on your behalf. You still need to confirm that the request is authorised before the model performs the action.
The preview label itself is the final limit. The API surface may change before general availability. If you build on the Gemini API, try it on a staging agent first. Test the three rules that keep the cache valid and keep the original system_instruction and tools list unchanged on every turn. When it works, the next time a rule changes mid-conversation, you can keep the cache and change the rule.
Who Benefits First
The teams that gain most are the ones running long agents with changing rules: support agents that need new refund rules mid-session, research agents that pick up a new tool after authentication, and operations agents that lose a dependency halfway through a job. For those teams, Gemini API mid-conversation instructions are a clear cost and reliability win: they cut the need to reread the conversation and they keep the instructions in one place.
If your agent depends on MCP tools, this feature does not change them. MCP server tools are not covered by system_input updates, so you will still need to manage them another way. The same applies to built-in tools such as Google Search: they sit outside the function-tool updates that system_input supports.
If you build on the Gemini API, try it on a staging agent first. Test the three rules that keep the cache valid and keep the original system_instruction and tools list unchanged on every turn. When it works, the next time a rule changes mid-conversation, you can keep the cache and change the rule.
This is an early preview, so expect small changes before general availability. Read Google’s announcement and try one real scenario before changing your whole stack — a guardrail that appears mid-session or a tool that only becomes available after approval.