Google’s Gemini API preview now enables developers to insert new rules and enable or disable tools mid-conversation, keeping earlier dialogue cached to reduce latency and cost while maintaining instruction authority.
- Mid-conversation updates maintain cached earlier turns for lower costs
- New instructions hold same weight as original system prompts
- Developers can switch AI tools on or off during chat sessions
What happened
Google released a preview update to its Gemini API enabling developers to add or change system instructions and toggle AI tools on or off during an ongoing conversation with Gemini-powered agents. This update allows for adjustments in agent behavior without requiring a full reprocessing of prior dialogue, retaining cached conversation turns to save both time and compute costs.
This improvement means that developers can now introduce new operational rules—such as spending limits or permission changes—midway through sessions and have those changes treated with the same authority as the original system prompt. Additionally, tools like refund handlers can be dynamically enabled or disabled depending on context, such as an account status change.
Why it matters
Modifying AI agent instructions mid-conversation without reprocessing the entire chat reduces latency and operational expenses, addressing a major concern where AI service bills have surged despite falling token prices. By caching earlier conversation turns, developers can avoid unnecessary recomputation while maintaining coherent agent behavior aligned with evolving rules.
Ensuring the new instructions carry full system prompt weight also enhances security and operational integrity, as prior workarounds embedding new rules in user messages were prone to being overridden or mimicked by users. However, Google stresses that despite these built-in controls, apps must continue to validate AI actions on their own servers to prevent risks such as prompt injection attacks, which have already been demonstrated on Gemini and other AI models.
What to watch next
Moving forward, developers integrating Gemini AI agents should evaluate the new mid-conversation instruction feature to optimize agent responsiveness and cost efficiency on prolonged interactions. Observing how this capability works alongside Gemini 4 and Gemini 4 Neon models—where it is supported—will be key.
Security practices will remain critical as this flexibility increases the attack surface for prompt injection attempts. Continued improvements in AI model governance and server-side validation will be pivotal for safely enabling dynamic agent controls. Additionally, competitors such as Anthropic have introduced related features focused on time savings, highlighting an industry trend toward more adaptive and cost-conscious AI conversation management.