3 Sources
[1]
Google lets developers change Gemini agents' rules mid-conversation
A Gemini API preview keeps earlier turns cached, so long-running agents don't reprocess the whole chat. Google has released a preview in the Gemini API that lets developers add system instructions and switch tools on or off during a conversation while earlier turns stay cached. New rules carry the
[2]
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. 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
[3]
Gemini API Mid Conversation Updates
Gemini API Mid Conversation Updates Friday, December 4, 2026 Trey Abbe Google said the Gemini API now lets developers change system instructions or function tools mid-conversation through the Interactions API in preview, using system_input steps that keep the prompt cache intact. Anyone who has
Share
Copy Link
Google has launched a public preview of mid-conversation system instruction and tool changes in the Gemini API, announced December 3 through its Interactions API
2
. For developers building long-running agents, it removes a constraint that has shaped how these apps are written: until now, an agent's rules were effectively frozen at the start of a conversation2
.Long-running agents run dozens to hundreds of turns, Google says, and their rules, permissions and available tools change along the way
2
. The prompt cache lets the model skip reprocessing earlier turns, which keeps cost and latency down. Until now, any change to those instructions or tools wiped the cache and could force the model to process the entire conversation again at extra cost and latency, per Google's account2
.Some firms' AI bills have tripled even as token prices fell, per The Next Web's reporting, so the cost of reprocessing long conversations is a live industry worry
1
. Until now, developers worked around this in two ways Google itself describes2
. Instructions tucked into user messages carried less weight and could be imitated by users; rewriting the instructions wholesale wiped the cache2
.The new system_input step solves both problems, per Google's description
2
. It holds the same authority as the top-level system instruction and outranks user messages, while earlier turns stay prompt-cached2
. Tools change too, through added_tools and removed_tools fields; in one example Google gives, an app pulls a refund tool during a billing review2
. Per Google's documentation, the top-level instruction and tools list must stay untouched for the cache to hold, and each new step keeps applying for the remainder of the session2
.
Source: The Next Web
The feature's strength is also where Google posts its warning. The announcement post tells developers to check every function call on their backend before running it, and to keep content from untrusted or end-user sources out of system_input
2
. Google says these steps steer model behavior only2
. The Next Web's reporting notes a researcher has already taken control of agents from Google and other companies using prompt injection1
. App Developer Magazine reads the warning as meaning that removing a tool from the model's list is not the same as revoking it on the server3
. Piping user-written or scraped text into system_input, it says, turns the authority advantage into a risk3
.Google lists five intended uses, from spending limits set per session to switching write tools on after a user authenticates
2
. Every system_input step is recorded in order when a developer retrieves an interaction, so a team can audit why an agent acted in turn forty2
. The feature runs across all Gemini 4 models in public preview; support for the Gemini Enterprise Agent Platform is coming soon, with no date2
.It is a public preview, so interfaces may change, and App Developer Magazine notes it has not run Google's sample code
3
. Model Context Protocol server tools, which many agent stacks rely on, do not work with it yet2
. The post also skips the numbers a cost-driven pitch needs3
. There are no benchmarks for instruction-following after a mid-session change, no limits on tools per step or instruction length, no comparison with other vendors, and no savings figures3
. How much cache the feature saves, and how well instructions hold after a mid-session change, are numbers a developer's own tests will have to produce.Related Stories
Summarized by
Navi
13 Feb 2025•Technology

22 Oct 2025•Technology

17 Mar 2026•Technology
