Google is previewing a new capability in the Gemini API’s Interactions API: developers can update system instructions and tool availability while a conversation is in progress, while keeping earlier prompt content eligible for caching. The change addresses a practical challenge for long-running agents. Previously, rewriting the top-level instruction or changing the tool list could invalidate the cache and force the model to process the conversation history again. Sending new rules as an ordinary user message could preserve the cache, but did not give those rules the authority of a system instruction.
What changes
An application can now add a system_input step at any turn, directly before user_input. The step becomes part of the conversation history and has the same authority as the top-level system instruction, taking precedence over user messages. It remains active for the rest of the session. Compatible rules can accumulate, while a newer instruction takes precedence when it conflicts with an earlier one. To keep the prompt prefix stable and make cache reuse possible, Google recommends leaving the top-level system_instruction unchanged across turns.
Tool availability can also evolve, but developers should keep the top-level tools list the same on every turn and use added_tools and removed_tools within system_input to adjust callable functions. For example, an application could remove a refund function and add an escalation-ticket function when an account enters review. If a step both removes and adds tools, removals are processed first. The preview supports updates to function tools only; MCP server tools are not included.
Why it matters—and what it does not do
The feature offers a more direct way to reflect changing account entitlements, permissions, service availability, or task phases without rebuilding a long conversation. Reusing the prompt cache can avoid reprocessing earlier context, while the separate, ordered interaction steps make agent traces easier to inspect and debug. System input and tool updates are orchestration controls, not a substitute for application security. Google says backends must still authorize every function call before execution, and untrusted user or external content should not be placed in system_input.
There is also an important cost distinction: keeping earlier turns cached does not make new instructions free. Tokens in system_input are charged at the model’s standard input-token rates, with no separate fee for the feature itself. The capability is currently in preview through the Interactions API. In short, it gives developers more flexibility to manage evolving instructions and tools in long sessions, while leaving enforcement and authorization with the application.
Comments
Checking sign-in status...
Loading comments...