Google has added a way for developers to change an AI agent's system instructions and available tools partway through a conversation in the Gemini API. The model doesn't have to reprocess the whole chat history when that happens. The feature launched in preview on December 3 through the Interactions API. It should make long-running Gemini agents cheaper and faster to run, and harder for users to manipulate. That covers the agents behind the support bots and assistant features that end up in Android apps.
Product managers Trey Nguyen (Gemini API) and Daniel Kyme (Google Cloud) wrote the announcement. It targets a familiar problem for anyone building agents: rules, permissions and tool access change during a session, but changing them used to wipe out the prompt cache.
The problem it fixes

Google says long-running agents often work through dozens or even hundreds of conversational turns. Until now, giving the model a new system instruction or a different set of tools in the middle of that meant invalidating the cache. Prompt caching lets earlier parts of a conversation be reused at lower cost.
Google says developers have mostly used one of two workarounds, and both have downsides:
- Slipping instructions into a user message. This keeps the cache, but the model doesn't treat these instructions with the same weight as real system instructions. Users can also try to imitate them.
- Rewriting the system instruction or tool list. This makes the change official, but it breaks the cache. The model has to reread the entire conversation, which adds cost and latency.
The new approach adds a system_input step that developers can send at any turn. Google says it carries the same authority as the top-level system instruction and takes precedence over user messages. Earlier turns stay cached.
How it works

To use it, a developer passes the previous turn's ID in the previous_interaction_id field and places a system_input step directly before the user_input step. The top-level system instruction should stay the same on every turn so the cached prompt prefix stays valid.
Each system_input is added to the conversation history as its own step. It stays active for the rest of the session, alongside the original system instruction. Rules on different topics all stay in force together. If a newer instruction conflicts with an older one, the model follows the most recent one.
Only one system_input step is allowed per turn. It can contain text, tool changes or both. When developers pull up an interaction later, the system_input steps appear in order alongside user messages and model output. Google says that makes multi-turn agent sessions easier to audit and debug.
Tools work much the same way. Tool declarations sit at the start of the prompt, so editing the main tool list breaks the cache. Google recommends leaving that list unchanged and using new added_tools and removed_tools fields instead. In Google's example, a support agent starts with store-hours and refund functions. On a later turn, the app removes the refund tool and adds one for creating escalation tickets.
If one step includes both fields, the API handles removals before additions, so a tool definition can be swapped in place. For now this only works with function tools, not MCP server tools. Google also warns that these controls only steer the model. Apps should still authorize every function call on the backend and keep untrusted user or outside content out of system_input.
What developers can do with it

Google suggests several uses:
- Applying rules that come up mid-session, such as account entitlements, workspace settings or spending limits
- Repeating key tone, formatting or policy rules deep into long conversations
- Turning on write or account-action tools only after a user signs in or approves a plan, then turning them off again for read-only review
- Disabling a tool when a service it depends on goes down, then restoring it once the service is back
- Starting with a small set of tools and adding more as a task needs them, instead of declaring a large catalog up front
Pricing and availability

Google isn't charging a separate fee for the feature. Tokens in system_input steps are billed at the normal input token rate for whichever model is being called. Earlier turns can still get cached-token pricing after rules or tools change.
As of December 4, 2026, mid-conversation system instructions are in public preview for all Gemini 4 models. They're available through the Interactions API's v1beta endpoint in the Gemini API. Google says support for Gemini Enterprise Agent Platform is coming soon but hasn't given a date. Developers can find details in Google's Gemini API documentation.