Google has introduced mid-conversation system instruction and tool changes in the Gemini API through the Interactions API, available in public preview. The feature lets agents adapt to new rules and tools mid-session without re-reading the entire conversation or driving up costs.
Google Adds Mid-Conversation System Instructions to Gemini API
Google says developers can now update system instructions or tools during a conversation in the Gemini API without invalidating the prompt cache.

In brief
- Google says mid-conversation system instruction and tool changes are now available in preview in the Gemini API.
- The feature lets agents adapt to new rules and tools mid-session without invalidating the prompt cache.
- System_input steps carry the same authority as top-level system instructions and take precedence over user messages.
- The feature is available in public preview across all Gemini 4 models through the v1beta endpoint.
How it works
Developers can send a system_input step at any turn with system instruction or tool changes. It carries the same authority as the top-level system instruction and takes precedence over user messages, while earlier turns stay cached.
To send an instruction mid-conversation, developers pass the previous turn's ID in previous_interaction_id and place a system_input step directly before user_input in the input array. The top-level system_instruction remains unchanged across turns so the prompt prefix stays valid in the cache.
Each system_input appends to the conversation history as its own step and stays active for the rest of the session alongside the top-level system_instruction. When a newer system_input conflicts with an earlier instruction, the model favors the most recent instruction.
Tool updates
Tool declarations sit at the start of the prompt, so changing the top-level tools list between turns breaks the prompt cache. With system_input, Google recommends leaving the same top-level tools list on every turn and using added_tools and removed_tools to update which functions the model can call as the session evolves. Only updating function tools via added_tools and removed_tools is currently supported and not MCP server tools.
Tool updates stay in effect until a later system_input changes them. When a single step includes both fields, the API processes removed_tools before added_tools, letting developers replace a tool definition in place.
Pricing and availability
Mid-conversation system instructions carry no separate fee. Tokens in system_input steps are billed at the standard input token rates for the model called. Earlier turns remain eligible for cached-token rates when rules or tools change.
The feature is available in public preview across all Gemini 4 models in the Interactions API through the v1beta endpoint in the Gemini API. Support for Gemini Enterprise Agent Platform is coming soon.
Why it matters
Long-running agents often work across dozens, if not hundreds, of turns, and rules, permissions and available tools change along the way. Previously, developers had to either put instructions in a user message, which does not carry the same weight as top-level system instructions, or rewrite the system instruction or tools, which invalidates the prompt cache and causes the model to reprocess the entire conversation history, adding cost and latency.
Sources
This article was drafted with AI assistance and checked against the sources above. Company claims are reported as claims. Cover image is AI-generated.
Questions readers ask
- What is the new feature introduced by Google in the Gemini API?
- Google has introduced mid-conversation system instruction and tool changes in the Gemini API through the Interactions API, which is available in public preview.
- How do developers send a system instruction mid-conversation?
- Developers pass the previous turn's ID in previous_interaction_id and place a system_input step directly before user_input in the input array.
- How are tool updates handled to avoid breaking the prompt cache?
- Google recommends leaving the same top-level tools list on every turn and using added_tools and removed_tools to update which functions the model can call.
- What is the pricing structure for mid-conversation system instructions?
- Mid-conversation system instructions carry no separate fee, and tokens in system_input steps are billed at the standard input token rates for the model called.
The day's checked news, by email
One short email a day with the top stories. Free, and you can unsubscribe in one click.
Or follow for the latest news:
How do you feel about this story?
Comments 0
No comments yet. Start the discussion.
More AI stories
Tech giants and US agencies urge faster encryption upgrades amid AI advances
Major technology companies and US cybersecurity agencies are urging organizations to accelerate adoption of post-quantum cryptography, citing AI-related discoveries that affect some cryptographic systems currently in use.
Senators Question Nvidia CEO Over AI Chip Smuggling and National Security
Nvidia CEO Jensen Huang testified before the Senate Banking Committee about AI chip diversions to China, export controls, and his personal relationships, facing criticism from both parties.

