Gemini API: Updating Instructions and Tools Mid-Conversation Without Losing Prompt Cache
Date: December 4, 2026

AI applications are increasingly used for multi-step processes, from customer support and data analysis to business operations automation. During a long interaction, an AI agent may need new instructions, a different operating mode or access to additional tools. Until now, making these changes could require restarting context or reprocessing conversation history. Soft & Solution Group follows developments that aim to make these workflows more efficient and controllable.
On December 3, 2026, Google announced a Gemini API capability that allows developers to update system instructions and available tools in the middle of a conversation without invalidating the prompt cache. The feature is in public preview through the Interactions API and is designed especially for AI agents performing multi-step tasks.
The feature introduces a new step called system_input. It allows instructions or tool changes to be added later in a conversation while keeping earlier context cached. This can reduce repeated processing, token-related costs and latency in applications that rely on long conversations.
What is the new Gemini API capability?
The capability is part of Google’s Interactions API and lets developers add new system-level instructions during an active conversation. These instructions have the same authority as the original system instruction and take precedence over user messages. When a new instruction conflicts with an earlier one, the model follows the most recent instruction.
How does system_input work?
The developer continues the conversation by sending the previous interaction identifier through previous_interaction_id. In the new request, a system_input step is placed directly before user_input. The new instruction is appended to the conversation history and remains active for the rest of the session alongside the original system instruction.
To preserve the prompt cache, Google recommends keeping the top-level system_instruction unchanged across requests. This keeps the earlier prompt prefix identical and reusable, rather than requiring the model to process the entire conversation history again.
What changes in tool management?
Developers can also change which functions an agent may call. The added_tools and removed_tools parameters add or remove function tools during the session. Google recommends keeping the top-level tools list unchanged across requests and applying changes through these parameters.
For example, a customer-support agent may start with tools for checking store hours and processing requests. If a case moves to specialist review, the application can remove the previous tool and add a function for creating an escalation ticket without starting a new conversation.
Why is preserving the prompt cache important?
Prompt caching stores parts of a prompt that have already been processed so they do not need to be analysed from scratch in every request. In long conversations containing thousands of tokens, reusing this context can reduce repeated processing and latency.
Previously, changing the main system instruction or tools list could invalidate the cache and force the model to reprocess the conversation history. With system_input, instructions and tools can be adjusted during the session while earlier content remains eligible for cache reuse. New system_input steps are billed at standard input-token rates and carry no separate fee.
What are the practical business use cases?
A key use case is long-running AI agents. A technical-support agent can receive new instructions when an incident moves from diagnosis to remediation. A software-development agent can receive additional permissions after completing a verification stage. A customer-service system can change its available tools when a request is transferred to another team.
The feature may also benefit applications that adapt their operating mode according to session context, account restrictions, user permissions or the status of an external service. Developers can build more flexible workflows without interrupting the conversation or losing the context already established.
What are the limitations and technical requirements?
The feature is in public preview through the Interactions API on the v1beta endpoint for Gemini 4 models. Tool updates currently support developer-defined function tools; MCP server tools are not yet supported. The announcement applies specifically to the Interactions API and should not be generalised to every Gemini API.
Google stresses that instruction and tool changes are orchestration controls and do not replace application security checks. Every function call should still be authorised by the backend before execution. Applications should also avoid placing untrusted user or external content inside system_input.
What should developers do before implementation?
Teams should identify workflows where changing instructions or tools currently requires restarting a conversation. They can then test system_input in the preview environment, measure cached-token usage, latency and agent behaviour, and verify that tool permissions are enforced by the backend.
Teams should define which rules may change during a session, how conflicting instructions are handled and under what conditions a tool should be added or removed. Testing should also cover failure scenarios, such as an unavailable service or a permission change while a task is running.
Conclusion: AI agents become more flexible without losing context
The Gemini API update gives developers a more flexible way to manage instructions and tools during long conversations. With system_input, applications can adapt agent behaviour and available functions while retaining the ability to reuse earlier context through prompt caching.
For businesses, this can make it easier to build agents that adapt to changing processes, roles and permissions, but implementation still requires testing and strong security controls. Soft & Solution Group views this development as an important step towards more dynamic, manageable and efficient AI applications.
As Ermal Beqiri, founder of Soft & Solution Group, explains:
“The value of an intelligent agent lies not only in its ability to perform tasks, but also in how it adapts when requirements change during a process. Updating instructions and tools without losing context creates greater flexibility, but it must always be accompanied by clear authorisation and security controls.”