ToolGemini

Gemini API updates instructions mid-conversation

Original title: Introducing mid-conversation instructions in the Gemini API

Date
Company
Google
Type
Tool
Illustration: Gemini API updates instructions mid-conversation

Plain language

What it is
Google introduced the ability to update system instructions and tools in the middle of a conversation in the Gemini API. This allows AI assistants to adapt to new rules without restarting the session.
How it works
It works by keeping the conversation history cached. The model does not need to re-read the entire chat, which reduces response times and lowers costs.
Where it is available
This feature is available in public preview for all Gemini 4 models in the Interactions API, using the v1beta endpoint.
Example
A customer support agent can start with a tool to issue refunds, but mid-conversation switch to a restricted mode that disables refunds and adds an escalation tool instead.

For developers

What it is
The Gemini API now supports updating system instructions and tools mid-conversation via the Interactions API. This allows developers to modify agent behavior without invalidating the prompt cache.
How it works
Developers pass a system_input step directly before user_input in the input array, referencing the previous_interaction_id. Tool updates are managed by keeping the top-level tools list identical and using added_tools and removed_tools within the system_input step.
Where it is available
It is available in public preview across all Gemini 4 models in the Interactions API through the v1beta endpoint.
Example
An infrastructure troubleshooting assistant receives a mid-conversation system_input stating that a production deployment freeze is active, instructing it to recommend read-only diagnostics and block new rollouts.

The original post

The headline and explanation on this page are based on Google's post. The full details are in the original.

Introducing mid-conversation instructions in the Gemini API

Read the source (opens in a new tab)

Featured in the morning brief

Every morning · in Hebrew

Yesterday's AI, in this morning's inbox

The new models, tools and deals, each with a short note on what it changes for a business.

How often?

A short issue in the morning, on every day there is news. Written in Hebrew.

Unsubscribe in one click. Your email is used only for the brief.

Past issues