Google Adds Mid-Conversation System Instructions to Gemini API
Google says developers can now update system instructions and tools mid-conversation in the Gemini API's Interactions API without breaking the prompt cache.
Quick answer
What did Google announce about mid-conversation instructions in the Gemini API?
Google says the Gemini API's Interactions API now supports a new system_input step that lets developers update system instructions and tools mid-conversation. According to Google, this lets long-running agents adapt to new rules without re-reading the full conversation or invalidating the prompt cache, avoiding added cost and latency.
Key takeaways
- Google says the Gemini API's Interactions API now supports mid-conversation system instruction and tool updates through a new system_input step, available in preview.
- According to Google, the feature lets long-running agents adapt to new rules or available tools without re-reading the entire conversation history or invalidating the prompt cache.
- Google says a system_input step carries the same authority as a top-level system instruction and takes precedence over user messages, while earlier cached turns stay unchanged.
- For tool changes, Google says developers should keep the top-level tools list identical across turns and instead use added_tools and removed_tools parameters, which currently work only for function tools and not MCP server tools.
- Google says retrieving an interaction shows each system_input step in order alongside user and model turns, which the company says makes multi-turn agent traces easier to audit and debug.
What Google announced
Google says it has introduced mid-conversation system instruction and tool changes in the Gemini API, available in preview through the Interactions API. According to the company, the feature lets agents adapt to new rules and tools mid-session without re-reading the entire conversation or driving up costs.
The problem Google says it addresses
Google says long-running agents often work across dozens or hundreds of turns, and that rules, permissions and available tools can change along the way. Previously, Google says, developers couldn't give the model a new system instruction or update its tools without invalidating the prompt cache.
Google says developers had relied on two workarounds. One was putting new instructions in a user message to preserve the cache, which Google says carries less authority than a top-level system instruction and can be imitated by users. The other was rewriting the system instruction or tools outright, which Google says invalidates the prompt cache and forces the model to reprocess the entire conversation history, adding cost and latency.
How the new system_input step works
Google says the Interactions API now allows developers to send a system_input step at any turn containing system instruction or tool changes. The company says this step carries the same authority as a top-level system instruction, takes precedence over user messages, and leaves earlier turns cached.
To use it, Google says developers pass the previous turn's ID in previous_interaction_id and place a system_input step directly before user_input in the input array, while keeping the top-level system_instruction unchanged across turns so the cached prompt prefix stays valid.
Google says each system_input step appends to the conversation history as its own step and stays active for the rest of the session alongside the top-level instruction. Rules covering different topics remain in effect together, according to Google, and when a newer system_input conflicts with an earlier one, the model favors the most recent instruction. Google also says that when an interaction is retrieved, each system_input step appears in order alongside user_input and model_output, which the company says makes multi-turn agent traces easier to audit and debug. Because the step appends at the current turn boundary, Google says all preceding tokens stay identical turn to turn and continue to reuse the prompt cache.
Mid-conversation tool updates
Google says tool declarations sit at the start of the prompt, so changing the top-level tools list between turns breaks the cache. Instead, the company recommends developers keep the same top-level tools list on every turn and use added_tools and removed_tools parameters within a system_input step to change which functions the model can call as a session evolves. Google says this is currently supported only for function tools, not MCP server tools, and that developers can send one system_input step per turn, directly before user_input, containing text content, tool updates, or both.
Source: Google, "Introducing mid-conversation instructions in the Gemini API," published December 3, 2026.
Frequently asked questions
- What is the new feature Google announced for the Gemini API?
- Google says developers can now send system instruction or tool changes mid-conversation using a new system_input step in the Interactions API, currently available in preview.
- Why did Google build this feature?
- Google says long-running agents often need updated rules, permissions or tools across many turns, and previously changing a system instruction or tools meant invalidating the prompt cache and reprocessing the full conversation history, adding cost and latency.
- How do mid-conversation tool changes work?
- Google says developers should keep the top-level tools list unchanged across turns and instead use added_tools and removed_tools inside a system_input step to adjust which functions the model can call; this currently supports function tools only, not MCP server tools.
- Does a new mid-conversation instruction override earlier ones?
- Google says each system_input step stays active for the rest of the session alongside the top-level instruction, and when a newer instruction conflicts with an earlier one, the model favors the most recent instruction.