Google Opens a Preview for Live Rule Changes

Google has added Gemini API Mid-Conversation instructions to the Gemini API, letting developers change an agent's rules or its list of tools at any turn of a session without invalidating the prompt cache. The feature arrived in public preview on December 3, 2026, through the Interactions API, and it carries no separate fee. According to Google's announcement on its developer blog, the new capability is available across all Gemini 4 models in the preview.

The change targets a real problem for long-running agents. An agent that helps a customer, monitors a system or works through a long task can span dozens or hundreds of turns, and its instructions often need to shift as conditions change. Until now, updating the system prompt mid-session meant starting over or paying to reprocess the whole conversation. The Gemini API Mid-Conversation update solves that by appending a new instruction step at the current turn boundary, with the same authority as the original system instruction and taking precedence over user messages.

The worked example in Google's announcement makes the idea concrete. An assistant is troubleshooting a latency spike when a production deployment freeze is declared. With the new step, the application can tell the agent to recommend read-only diagnostics and stop further rollouts, without losing the conversation history it has already built up. The earlier turns stay cached, so the update costs only the tokens in the new instruction itself.

How the Update Works

To send a Gemini API Mid-Conversation instruction, the application chains the new turn to the previous one by passing the previous interaction's identifier, then places a single system input step directly before the user input step in the request. The top-level system instruction stays unchanged, and because the new step lands at the current turn boundary, all preceding tokens remain identical and eligible for cached-token rates.

Tools change through the same Gemini API Mid-Conversation step. The application can add new function tools or remove existing ones inside the system input step, while the top-level tool list is left untouched. There is one rule that is easy to get wrong: after disabling a function, the application must keep sending the function's original definition in the top-level tool list. Removing it there causes later turns to fail, as Developers Codex explains in its walkthrough of the new rules. Functions introduced through the update step should stay out of that original list.

Instructions accumulate rather than replace, which is another detail worth knowing. Reversing an earlier rule requires explicitly telling the model to ignore it. And the update cannot land in the middle of a tool-calling loop: Google permits at most one system input step per turn, placed directly before a user input step. The tool updates support custom functions only, excluding built-in tools such as Google Search and server-based tool connections.

Why the Cache Matters

The economics are the point. Long agent sessions are expensive precisely because every turn traditionally re-reads the conversation. By keeping earlier turns cached, the Gemini API Mid-Conversation design means a rule change costs roughly the price of the new tokens alone. According to the Gemini API price list, uncached input costs three dollars per million tokens while cached input costs fifteen cents, so the difference across a long session adds up quickly. The system input tokens themselves are billed at the standard input-token rate for the model being called.

That pricing structure is what makes the append-only design worthwhile. An agent that runs for hours, checking systems or guiding a customer through a multi-step process, can adapt its rules as policies change without paying to rebuild its context each time. Support for Google's enterprise agent platform is announced as coming soon, which suggests the company sees this as infrastructure for production agents rather than a demo feature.

The same week has been busy for Gemini. Google's Gemini 4 Live answered in under half a second across 70 languages, and the open-weight MedGemma 2 brought open health AI to clinics and phones. The mid-conversation update is quieter than either launch, but for developers building agents it may matter more: the Gemini API Mid-Conversation update changes how an agent behaves over time, not just how fast it answers.

What to Watch Before Building on It

The Gemini API Mid-Conversation preview comes with limits that developers should respect. It is available only through the preview endpoint of the Interactions API, and Google says the surface may change before general availability, so production code should treat it as provisional. Only three Gemini 4 models are supported, and other models return an error. The feature is also limited to model interactions, leaving the simpler content-generation route and managed agent interactions unsupported.

Google also warns that the new steps steer the model and are no security boundary. Applications should still authorize every function call on the backend and keep untrusted content out of the new step. As i10X News notes in its explainer, text from emails, web pages or user uploads should never be passed into the instruction step, since it would carry system-level authority.

Still, the direction is clear. Agents are becoming long-lived, and long-lived agents need their rules to change while they run. Google's answer, the Gemini API Mid-Conversation update, is a small, cache-friendly mechanism that treats an instruction update like any other turn. If the preview holds up in production use, expect other providers to follow with their own versions of the same idea.

Sources: Google developer blog announcement; Developers Codex; AI in Context; i10X News; NeoTeo.