
Developers can change system instructions or tools partway through a session without breaking the prompt cache. In preview in the Interactions API.
Google has added mid-conversation instructions to the Gemini API, it announced on 3 December. Developers can now change an agent's system instructions or tools partway through a session without paying to reprocess the whole conversation. The feature is in preview through the Interactions API.
Agents that run for many turns often need new rules or tools along the way. Until now, developers had two poor options, Google says:
Developers send a new system_input step before the user's next message. Google says it carries the same authority as the top-level system instruction and takes precedence over user messages, while earlier turns stay cached.
Each new instruction stays active for the rest of the session. If a newer instruction conflicts with an older one, the model favours the newer one. Every instruction appears in order in the conversation history, which makes it easier to audit what the agent was told.
Google's example: an infrastructure assistant is told mid-session that a deployment freeze is on, so it refuses a request to deploy a new release.
If you build agents on Gemini, you can change permissions or tools as a session goes on, for example when a user signs in or a freeze starts, without the cost of starting over. It is a preview, so expect changes before general release.
You can try the Gemini API in Google AI Studio. For Google's newest model, see our Gemini 4 Neon story.
Source: Google blog