Google introduced mid-conversation system instruction and tool changes in preview in the Gemini API, allowing developers to update rules and tools during a session while keeping earlier turns cached. The company announced the change on Dec. 3 in a post on its The Keyword site.

Google said the update, available through the Interactions API, lets agents adapt to changing rules, permissions and tools without forcing the model to reprocess the full conversation history. The company said this avoids added cost and latency that occur when the prompt cache is invalidated.

According to Google, developers can send a system_input step at any turn. That step must come right before a user_input and is treated like the top-level system instruction. Earlier turns remain cached. Each system_input is recorded as its own step and continues to apply for the rest of the session alongside the top-level instruction. If instructions clash, the latest one overrides earlier ones, the post said.

Google said only one system_input step is allowed per turn. It can include text, tool updates, or both. When retrieving an interaction, system_input, user_input and model_output steps appear in order, which Google said makes multi-turn traces easier to audit and debug.

The company described how to change tools without breaking the cache. Because tool declarations sit at the start of the prompt, Google recommends leaving the same top-level tools list on each turn and using added_tools and removed_tools inside system_input to adjust which functions the model may call. The post said that only function tools can be updated this way, not Model Context Protocol server tools. When both fields appear in one step, the API applies removals before additions so a tool can be replaced in place. Google added that including a short text note when removing a tool can help the model explain why an action is not available.

Google listed examples that include applying session-specific limits, reinforcing instructions deeper into long chats, switching permissions or modes after authentication, responding to live operational changes, and expanding tool sets as tasks evolve.

On pricing, Google said there is no extra charge for mid-conversation system instructions. It said tokens in system_input are charged at the model’s normal input token price. Google said prior turns can still qualify for cached token pricing even when rules or tools are updated.

Google said the feature is available as a public preview for every Gemini 4 model through the Interactions API via the v1beta endpoint. The company said support for the Gemini Enterprise Agent Platform is coming soon.

Google also cautioned that system_input, added_tools and removed_tools act as orchestration controls, and that applications should still authorize each function call on the backend and keep untrusted external or end-user content out of system_input.