Get the daily emailDaily email
  1. Home
  2. Products
  3. This story

Gemini API lets agents change system instructions and tools mid-conversation without losing the cache

Google has added a preview feature to the Gemini Interactions API that lets developers send a system_input step at any turn to change system instructions or tools. These mid-session instructions carry the same authority as the top-level system instruction and…

Published Covered by 2 sources Read the original

Ranked #7 of 30 on Friday, December 4

Gemini API lets agents change system instructions and tools mid-conversation without losing the cache

Why it matters

Long-running agents whose rules and permissions change mid-session can now update them without paying to reprocess the whole conversation or smuggling instructions into user messages.

What happened

1 min read

Google has added a preview feature to the Gemini Interactions API that lets developers send a system_input step at any turn to change system instructions or tools. These mid-session instructions carry the same authority as the top-level system instruction and outrank user messages, while earlier turns stay in the prompt cache. Previously, changing instructions or tools invalidated the cache and forced the whole history to be reprocessed.

inscraper analysis

Our analysis

This addresses a real pain point in agent design: until now you either sacrificed the cache or put new rules into a user message, where they carry less weight and users can imitate them. A distinct system_input channel is also a modest security win against instruction spoofing. It is preview-only and limited to the Interactions API, so existing generateContent code would need to migrate. The post says nothing about pricing or limits on how often instructions can change; teams running long multi-turn agents on Gemini should try it.

More in Products