Google is giving developers a way to change an AI agent’s instructions and available functions in the middle of a conversation without invalidating the prompt cache for earlier turns. The preview feature, called system_input, is available through the Gemini API’s Interactions API; it gives long-running agents a way to receive new rules without making the model reprocess the entire conversation history.

The change addresses a practical trade-off. A developer could previously add a new rule in a user message and preserve the cache, but that message did not have the authority of a system instruction. Replacing the original system instruction or the top-level tools list could invalidate the cache, adding processing time and cost, Google says. The new step sits between the previous interaction and the next user input, while the developer keeps the original top-level system instruction unchanged.

New rules are appended, not erased

In Google’s example, a troubleshooting agent receives a production deployment freeze during an ongoing session. The new instruction tells it to recommend read-only diagnostics and not allow further rollouts. A later user request for a deployment command can then be answered under that constraint. The API records the new instruction as a distinct step in the conversation history.

That history has an important consequence: a new instruction remains active for the rest of the session alongside earlier instructions. Rules on different subjects can coexist; when they conflict, Google says the model favors the newer one. Developers cannot remove an earlier step, so the documentation advises explicitly saying what changed and telling the model to ignore the old instruction when reversing a rule.

For custom function tools, developers keep sending the same original top-level tools list and use added_tools and removed_tools inside system_input to change which functions are active. Google’s example removes a refund function and adds an escalation-ticket function. The change is an orchestration control, not a security boundary: Google says applications must still authorize each function call on the backend. A model’s revised tool list cannot, by itself, prevent an improperly authorized function from running.

A preview with meaningful boundaries

The feature is in public preview on the v1beta Interactions API. Google’s documentation limits it to model interactions; it does not support generateContent requests or agent interactions. Mid-session tool changes currently cover custom function tools, not MCP servers or built-in tools such as Google Search. A turn can include at most one system_input, directly before user input; the step cannot be inserted during a function-calling loop.

Google says the instruction step has no separate fee, but its tokens are billed at the model’s standard input rates. Earlier turns remain eligible for cached-token rates when cache reuse applies. The announcement does not provide a measured cost or latency comparison, so the practical savings will depend on the conversation, model, cache behavior and how often rules change.

The design makes a control update easier to add to a long session, while leaving two responsibilities with the application: keep untrusted user or external content out of privileged system instructions, and enforce permissions outside the model. The feature changes what Gemini is told it may do; it does not turn the model into the system that decides what the software is allowed to do.

Sources