Introducing mid-conversation instructions in the Gemini API
Introducing mid-conversation instructions in the Gemini API
Google's Gemini API now offers a public preview of mid-conversation system instruction and tool changes via the Interactions API, letting developers send a system_input step at any turn while keeping the prompt cache intact. The system_input carries the same authority as top-level system instructions, and tool changes are made with added_tools and removed_tools while the top-level tools list stays unchanged; only function tools are supported, not MCP server tools. Tokens in system_input steps are billed at standard input token rates, and earlier turns remain eligible for cached-token rates.
Useful for developers building long-running agents who want to change rules or tools mid-session without invalidating the prompt cache.
Source: Google Blog AI · blog.google