Have a project in mind? Let's talk.

Mid-conversation system instructions, announced by Google on December 3, let a developer change an agent's rules or tools in the middle of a session without invalidating the prompt cache. The feature is in public preview in the Gemini API through the Interactions API, and it targets a real operating problem: long-running agents work across dozens or hundreds of turns, and the rules, permissions, and available tools change along the way (Google). Until now, a team that needed to update the instructions had two options, both with a cost. This post walks through how the new step works, what Google says it is for, where the limits are, and what an operations team should still do on its own side.
Google describes two workarounds developers have relied on. The first is putting new instructions in a user message so the prompt cache stays valid. The catch is that those instructions do not carry the same weight as the top-level system instruction, and users can try to imitate them. The second is rewriting the system instruction or the tools list. That works, but it invalidates the prompt cache, so the model reprocesses the whole conversation history, which adds cost and latency (Google).
Both workarounds fail an agent that runs for a long time. A freeze on production deployments, a billing review on an account, or a downstream service going offline are all facts that appear partway through a session, not at the start. The choice used to be between weak authority and a higher bill (Google).
The Interactions API now accepts a step called system_input at any turn. Google says it carries the same authority as the top-level system instruction and takes precedence over user messages, while earlier turns stay cached. To use it, pass the previous turn's ID in previous_interaction_id and place the system_input step directly before the user_input step in the input array. The top-level system_instruction should stay unchanged across turns so the prompt prefix stays valid in the cache (Google).
Google's own example is an infrastructure troubleshooting assistant. After a first turn about a latency spike, the second turn adds a system_input saying a production deployment freeze is active and that the model should recommend read-only diagnostics. The user then asks for the command to deploy a new release, and the model answers that a freeze is active and offers diagnostic checks instead (Google).
A few behaviors are worth knowing. Each system_input appends to the history as its own step and stays active for the rest of the session alongside the top-level instruction. Rules that cover different topics remain in effect together. When a newer system_input conflicts with an earlier instruction, the model favors the most recent one. Only one system_input step is allowed per turn, and it can contain text, tool updates, or both (Google).
Consider the support agent from Google's example as a timeline. Before this feature, the moment the account entered billing review, the application had to choose. It could append a user-style message saying refunds are paused, which users can imitate and which ranks below the real system instruction. Or it could rewrite the system instruction and the tools list, pay to reprocess the full history, and accept the added latency. Neither fit a session that might run for hundreds of turns (Google).
With system_input, the same moment becomes one extra step in the next request. The application keeps the top-level instruction and tools list as they were, adds a step that says refunds are paused, removes the refund function, and adds an escalation function. The model sees that step with system authority, the cached prefix is reused, and the history shows exactly when the change happened (Google).
Tool declarations sit at the start of the prompt, so changing the top-level tools list between turns also breaks the cache. Google's recommendation is to leave the same top-level tools list on every turn and use added_tools and removed_tools inside system_input to change which functions the model can call (Google).
The worked example is a support agent that starts with get_store_hours and issue_refund. On the next turn the application removes issue_refund, adds create_escalation_ticket, and sends a note that the account is under billing review and refunds are paused. When the user then asks for a refund on order 12345, the agent has no refund tool and an explanation for why. When one step contains both fields, the API processes removed_tools before added_tools, which lets a developer replace a tool definition in place. Google also suggests adding a short text note when removing a tool, so the model can explain why an action is unavailable (Google).
Two limits apply today. Only function tools can be updated through added_tools and removed_tools, and MCP server tools are not supported yet. And the feature is a preview on the v1beta endpoint (Google).
The announcement lists five uses: session-dependent constraints such as workspace settings, account entitlements, or spending limits; long-horizon instruction reinforcement, meaning re-emphasizing format, tone, or policy rules deep into a long session as context grows; dynamic permissions and mode switches, such as enabling write tools after authentication or plan approval and removing them when returning to read-only review; live operational changes, such as disabling a tool when a downstream dependency goes offline and restoring it later; and large tool catalogs, where an agent starts with a small set of tools and adds more as the task needs them (Google).
Google says mid-conversation system instructions carry no separate fee. Tokens in system_input steps are billed at the standard input token rates for the model being called, and earlier turns stay eligible for cached-token rates when rules or tools change. The feature is in public preview across all Gemini 4 models in the Interactions API. Support for Gemini Enterprise Agent Platform is described as coming soon (Google).
It helps to be exact about the boundaries, because a rule that is stated is not the same as a rule that is enforced. Google describes system_input and the tool fields as steering model behavior. They tell the model what to do and what it may call. They do not change what your backend will accept if a function call arrives anyway, which is why Google says to authorize every function call before executing it (Google).
It also does not cover every tool type today. MCP server tools are outside added_tools and removed_tools, so an agent that relies on MCP for its main capabilities still has to manage tool exposure another way for now. And the guidance to keep the top-level tools list identical on every turn means the tools you remove are still declared at the top level. The model is told, through the step, not to use them, and the application should still refuse them if called (Google).
Finally, conflict handling is simple but worth testing. Google states that when a newer system_input conflicts with an earlier instruction, the model favors the most recent one, and that rules covering different topics stay in effect together. A team with many rule changes in one session should write tests for the interactions between them, since two rules on the same topic will resolve toward the later one (Google).
The rest of this post is our assessment, not a claim from Google.
The most useful side effect is the audit trail. Google notes that when a developer retrieves an interaction, each system_input step appears in order alongside user_input and model_output, which makes multi-turn agent traces easier to audit and debug (Google). That matters because a rule change mid-session is exactly the event that someone asks about later: why did the agent stop issuing refunds at turn 14? Having the change recorded as its own step in the same history is better than a rule change buried in application code. It does not replace a full AI agent audit trail captured outside the agent, but it gives that record a clear event to point at.
The second point is cost. Teams that rewrote the system prompt to change behavior paid for it in reprocessed history. For an agent with a long session and a large prefix, avoiding that is a direct saving, though Google does not publish figures for it, so the size of the saving will depend on the session.
The third point is the one Google itself stresses, and it is the most important. The announcement says system_input, added_tools, and removed_tools steer model behavior and serve as orchestration controls. It also says the application should still authorize every function call on the backend before executing it, and keep untrusted external or end-user content out of system_input (Google). In other words, removing issue_refund from the model's tool list is a good way to guide the model, but it is not a permission system. The enforcement point stays in your backend. This is the same principle behind AI agent tool permissions: the model can be told what it may do, but the system that executes the call decides.
The warning about untrusted content deserves its own emphasis. The reason system_input exists is that it carries more authority than a user message. That makes it a high-value target. If text from a web page, a ticket, a retrieved document, or a user ends up inside a system_input step, an injected instruction would arrive with system-level weight. Teams should treat the code path that builds system_input as privileged: only trusted application logic writes to it, and nothing that came from outside is concatenated into it. The wider controls in our guide to prompt injection defense for AI agents still apply.
Based on what Google documents, a team adopting this can check five things. Keep the top-level system_instruction and tools list identical every turn, so the cache stays valid. Build system_input only from trusted application state, never from user or retrieved text. Keep backend authorization on every function call, whatever the model's tool list says. Record why each rule change happened, with a timestamp, in your own logs as well as in the interaction history. And for approval flows, pair mode switches with a real human decision, as in human-in-the-loop AI agents, instead of letting the model move itself from read-only to write mode.
Because this is a preview on v1beta and covers function tools only, it is also reasonable to wait before building a production design around it. Teams using MCP tools cannot use added_tools and removed_tools for them yet, and preview behavior can change (Google).
They are a feature of the Interactions API that lets a developer send a system_input step at any turn to change system instructions or tools mid-session. The step carries the same authority as the top-level system instruction and takes precedence over user messages, while earlier turns stay cached (Google).
No, that is the point of the feature. Because system_input appends at the current turn boundary, all preceding tokens stay identical from turn to turn and reuse the cache. Google advises keeping the top-level system_instruction and tools list unchanged on every turn (Google).
Not yet. Google says only function tools can be updated with added_tools and removed_tools, and MCP server tools are not supported at this time (Google).
No separate fee. Tokens in system_input steps are billed at the standard input token rates for the model you call, and earlier turns remain eligible for cached-token rates (Google).
Google: https://blog.google/innovation-and-ai/technology/developers-tools/gemini-api-mid-conversation-updates/
Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.