Live5 today

ToolsDec 3, 2026, 21:25 UTC

Gemini API can now change agent rules and tools without breaking cache

A new system_input step updates instructions or function access mid-session while preserving cached conversation history.

Google illustration for mid-conversation instructions in the Gemini API.

Google has added mid-conversation system instructions and tool updates to the Gemini API in preview. Through the Interactions API, developers can insert a new system_input step during a session without rewriting the top-level system prompt or invalidating the existing prompt cache.

The change targets long-running agents whose permissions, operating rules or available functions change while a task is in progress. Previously, developers often placed new rules in user messages, which gave them weaker authority, or changed the top-level configuration and forced the model to reprocess the full conversation.

A system_input step has system-level authority, takes precedence over user messages and remains active for later turns. Newer instructions override conflicting older ones, while non-conflicting rules accumulate. The steps also appear in retrieved interaction traces, making changes easier to audit.

Developers can use added_tools and removed_tools to update function tools without changing the original tool list. The preview does not yet support changing MCP server tools this way, and Google warns that mid-session tool changes should still be designed carefully because old and new permissions can coexist in a long trace.

Sources

  1. 1Google AI blogblog.google
  2. 2Gemini API documentationaistudio.google.com
Share

← Back to feed