Gemini API Mid-Conversation Instructions Explained
Google has introduced mid-conversation system instructions for the Gemini API, allowing developers to update agent behavior and tools without resetting prompt caches.
Table of Contents3 sections

On December 3, 2026, Google announced the introduction of mid-conversation system instructions and tool updates for the Gemini API, now available in public preview as detailed in the official announcement. This update provides developers with the ability to modify agent behavior dynamically during an active session. By utilizing the new system_input step, developers can adjust instructions or tool sets without the need to restart the conversation or invalidate the prompt cache built from previous turns. This capability addresses long-standing workflow constraints in multi-turn interactions where maintaining conversational state and prompt efficiency are paramount for performance. The update is currently available for all Gemini 4 models through the v1beta endpoint of the Gemini API via the Interactions API.
Understanding the System Input Mechanism and Caching
The core of this update is the system_input step, which functions as an injection point for new directives during an ongoing interaction. This step carries the same authority as top-level system instructions and takes precedence over user messages, ensuring that the model adheres to the updated constraints or goals immediately upon processing. Because this mechanism avoids invalidating the prompt cache, it offers a more efficient way to manage long-running sessions where the agent’s objectives might shift based on user input or external events. Maintaining the cache preserves the underlying token economy and reduces latency by keeping previous context intact while new instructions are ingested by the model. This is a significant shift from previous workflows that often required re-initializing sessions to apply new system-level constraints.
This capability is particularly relevant for developers managing complex state transitions and system boundaries. For instance, when implementing an AI Agent Handoff: Build Fallback Without Losing Context, the ability to inject new instructions mid-session allows for a seamless transition between specialized agents without requiring a complete reset of the conversation history. By maintaining the cache, the system preserves the context necessary for the model to continue providing relevant responses, even as its underlying operational parameters change across different execution phases. This allows for more fluid agentic behavior where the system can adapt to the user’s evolving needs without the overhead of re-processing the entire conversation history, which is a common bottleneck in high-frequency, multi-turn AI applications.
Dynamic Tool Management and API Scope
Beyond system instructions, the update introduces a structured approach to tool management within active sessions. Developers can now specify added_tools and removed_tools within a single system_input step. The API is designed to process these changes in a specific order, removing the specified tools before adding new ones, which prevents conflicts during the update process. This ensures that the agent’s toolset remains consistent with the current requirements of the task at hand while keeping the top-level tools list stable and predictable for subsequent execution turns. This structured update path is essential for maintaining the integrity of the agent’s capabilities as it moves through different stages of a task.
While this provides a robust framework for dynamic updates, the long-term implications for agent stability and the potential for instruction drift remain areas for developer observation and ongoing analysis. As with any public preview feature, the exact performance characteristics under high-concurrency scenarios or extremely long sessions are not yet fully documented by the publisher, leaving room for further exploration by those building production-grade agentic systems. Developers should monitor how these mid-conversation updates interact with existing prompt engineering strategies, as the ability to change instructions on the fly may require new approaches to state management and error handling to ensure consistent model performance throughout the lifecycle of a conversation.
You Might Also Like
View all articles
Gemini API Tool Retrieval Preview Explained
Google has introduced Tool Retrieval for the Gemini API, a feature designed to optimize token usage and latency by deferring the loading of large tool parameter schemas.

Google Gemini Mac Computer Use Update Explained
Google has introduced new computer-use capabilities for its Gemini Mac application, enabling the AI to interact directly with local software. We examine the scope of these features, the current access requirements, and t

Google Gemini macOS Computer Use Feature Explained
Google has introduced a computer use feature for its macOS Gemini application, enabling the AI to interact with desktop apps and local files. We examine the scope of this update and its implications for system security.