IntraMind LLC logo
IntraMind LLC
IntraBlog
Go back

Gemini API: Change Rules Mid-Chat Fast

Unlock flexible Gemini agent updates without breaking the prompt cache

Dec 4, 2026 (Updated Dec 4, 2026) - Written by Christian Tico

7

Share this article:

Artificial Intelligence
Gemini API mid-conversation updates diagram showing how to add instructions and tools without resetting the cache, with a cached system instruction, a turn 13 system_input about a deployment freeze and the create_release tool swapped for get_logs

Source: Google.

Sponsored

Shadowbanned? The Hashtag Mistake Destroying Your Organic Reach

Copying and pasting the same generic hashtags will quickly ruin your social media ranking. Generate highly optimized captions and relevant tags based on your exact brand persona.

Get AI Tags
Author Thought

The Gemini API's mid-conversation updates solve a practical problem for agent builders: changing instructions and tools during a session without invalidating the prompt cache. This makes it possible to adapt permissions and rules to the different stages of a workflow while reducing processing costs. As this is a preview, it is worth testing on concrete use cases and verifying its behavior before adopting it in production.

Christian Tico
Knowledge Check

How long do tool changes made with added_tools and removed_tools last in a Gemini API session?