Introducing mid-conversation instructions in the Gemini API

Developers can now update system instructions or tools in the middle of a conversation while keeping the prompt cache intact.
Your browser does not support the audio element.
Today, mid-conversation system instruction and tool changes are available in preview in the Gemini API through the Interactions API. This lets agents adapt to new rules and tools mid-session without re-reading the entire conversation or driving up costs.
Long-running agents often work across dozens, if not hundreds, of turns. Along the way, rules, permissions and available tools change. Until now, you couldn't give the model a new system instruction or update tools without invalidating the cache.
Developers have commonly relied on two workarounds:
The Interactions API now allows you to send a system_input step at any turn with system instruction or tool changes. It carries the same authority as your top-level system instruction and takes precedence over user messages, while earlier turns stay cached.
To send an instruction mid-conversation, 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 your top-level system_instruction unchanged across turns so the prompt prefix stays valid in the cache:
Each system_input appends to the conversation history as its own step and stays active for the rest of the session alongside the top-level system_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 instruction.
This summary is from Google Blog, published Dec 3, 2026. NewsFusion links to the original reporting and groups related coverage.




