Gemini agents can change tools mid-conversation

Gemini's new API preview lets agents change instructions and tools during a conversation. Learn the mechanism, access conditions and useful first checks.

A hand lifts a red stamp from a tray beside a service bell, while yellow cord connects three paper speech bubbles.

Gemini developers can now change an agent's instructions and available functions during an ongoing conversation, while keeping earlier turns eligible for prompt caching. Google's new public preview makes it possible to pause an action, offer a different next step and keep the discussion going with its existing context.

For a support assistant, that could mean withdrawing the refund function when an account enters review and offering escalation instead. The customer keeps the conversation. The application changes what the assistant can ask to do next.

Google announced mid-conversation instructions on 3 December 2026. The preview covers Gemini 4 models through the Interactions API's v1beta endpoint. This is a developer capability for custom applications, separate from settings in the consumer Gemini app or Google Workspace.

What changes for an ongoing agent job?

A conversation can outlast the conditions it started under. An account's status changes, a person approves the next stage, or a connected service goes offline. The assistant needs current instructions and the appropriate tools for that moment.

Previously, developers could rewrite the top-level instructions or tool declarations, which Google says invalidates the prompt cache. Another workaround was to put updated rules into an ordinary user message. That gives the update the authority of a user message, and makes it easier to confuse with something an end user typed.

The new mechanism adds a system_input step at the current turn. It can contain a trusted instruction, function-tool changes, or both. Google says it carries the authority of the top-level system instruction, with newer conflicting instructions taking precedence.

The useful possibility is a conversation that moves between stages without needing to start again. A support assistant can continue understanding the customer's problem while its action choices change. A document assistant could move from drafting to review, then offer a narrowly approved save action.

That second example is an application design you could build. The API supplies the instruction and tool-update mechanism; your application supplies the document connection, approval checks and actual save operation.

How the API keeps the earlier conversation intact

The request continues a completed turn using previous_interaction_id. The developer keeps the top-level system_instruction and tools declarations unchanged, then places one system_input step immediately before user_input in the input array.

This appends the change after the earlier conversation. The earlier prompt content can remain identical, which is why Google says it stays eligible for cache reuse. Prompt caching means reusing previously processed input instead of processing the same material afresh.

The new instructions become part of the conversation history and remain active for the rest of the session. Instructions on different topics continue together; a later instruction takes precedence where there is a conflict. That makes precise wording important. If one function is temporarily unavailable, name that function and the replacement action rather than issuing a vague new mission.

There is an easy implementation detail to miss. The Interactions API overview says previous_interaction_id preserves conversation history, while parameters such as tools, system_instruction and generation_config apply to the individual interaction. Continue sending the required top-level settings on each request. Keeping them unchanged means sending the same settings, not leaving them out.

Adding and removing functions has a defined order

Two fields on system_input control the change:

  • removed_tools identifies functions to withdraw.
  • added_tools supplies functions to introduce.

Google processes removals before additions when both appear in the same step. That supports replacing a function definition in place. The update stays in effect until a later system_input changes it.

A short accompanying instruction helps the assistant explain the change. Removing a refund function tells the model it is unavailable. Explaining that the account is under review also gives it a useful answer to the customer's next question.

The current preview supports function tools, not MCP server tools. MCP is a standard way of connecting an AI application to outside tools and information. A Gemini application using an MCP server cannot assume these fields will dynamically change that server's tool access.

Google's function-calling documentation confirms the same mid-conversation pattern. It also explains the division of work: the model requests a function and supplies its arguments; the application runs the function and returns the result.

A refund conversation shows the practical difference

Google's announcement uses a support example. The conversation begins with functions for looking up store hours and issuing a refund. On the next turn, the application removes issue_refund, adds create_escalation_ticket and tells the assistant that refunds are paused while the account is under billing review.

The next user message still asks for a refund. The application has changed the assistant's available route without discarding the conversation.

For a team building this kind of assistant, the design question becomes very concrete: which trusted event changes the job? It might be an account-status response from the business system or a decision by the employee responsible. The customer's request supplies the problem to solve; the trusted application decides whether the refund route is available.

The application must still authorise every function call before executing it. Google explicitly describes these new fields as controls for coordinating the model's behaviour. A tool removed from the model's next choices also needs to be blocked by the application's action checks when it is no longer permitted.

That matters if a request is already in flight or an old call is retried. Recheck the account's current status at the point of execution. If a refund is no longer allowed, refuse the action there and return a clear result the assistant can explain.

Where this is useful, and when simpler is better

This feature earns attention when the permitted next step changes during a conversation that is worth keeping.

SituationUseful change during the conversation
An employee approves a documentOffer the specific save function for the approved work.
A connected service goes offlineWithdraw the affected function and explain the available alternative.
An account enters reviewRemove the account-changing action and offer escalation.
The job moves to read-only reviewRemove write functions while keeping the discussion and lookup context.

These are proposed applications of the documented mechanism. They each need their own connections and action checks.

For a fixed form that always follows the same steps, an ordinary application rule may already do the job. Keep that simpler route when the user doesn't need an ongoing conversation. If the task is just answering a question from supplied documents, a supported team AI workspace may be enough; our AI provider comparison covers that choice.

The developer route becomes more interesting when someone needs to discuss the work, change direction and continue with the relevant context. Our business-agent comparison separates ready-made products from configurable and developer-built systems.

What needs to be ready before a developer tries it?

Start with a Gemini API project that has access to a supported Gemini 4 model, an application using the Interactions API and a current Google GenAI SDK. Google's overview lists Python google-genai and JavaScript @google/genai support from version 2.3.0 onwards; check the current release and the preview's required fields before implementation.

The underlying Interactions API is generally available, according to its overview. The newly announced mid-conversation feature is in public preview. Those are different availability statements. Google says support for Gemini Enterprise Agent Platform is coming later; don't treat this API preview as an available feature across every Google agent surface.

Decide how the application will store the conversation too. Interactions are stored by default so later requests can continue from their IDs. The overview documents retention controls and deletion. Setting store=false prevents subsequent turns from using previous_interaction_id, so that option changes how you manage the conversation. Set the intended storage and retention arrangement before introducing real customer information.

Keep the trusted update channel under application control. A retrieved page, customer email or user message can contain requests, but its text must not be copied into system_input as though it were an authorised rule change.

A focused first exercise for your build team

Use a fictional support account and test functions with no real payment or customer-system access. This prepared exercise gives the developer and the person responsible for support a shared acceptance check.

Begin with an account that permits refunds. Ask the assistant to explain the refund options, then change the test account's status to billing review through the trusted application path. Before the next user request, send the instruction update, remove the refund function and add escalation.

Now ask for the refund again. Inspect three separate things:

  1. The conversation still contains the original issue, so the customer doesn't have to explain it again.
  2. The assistant explains the current restriction and offers the permitted escalation route.
  3. The application refuses a direct attempt to execute the old refund function under the new account status.

The third check deliberately tests the application, independently of whether the model chooses the right function. A polite refusal in the conversation doesn't establish that the old action is blocked.

Then restore the permitted route through a later trusted update and repeat the request. Check that the restoration changes only the intended action and that the conversation uses the current account state. Inspect the returned interaction steps to see where each instruction changed.

A useful review record includes the account state, instruction change, available functions, requested action and actual application result. Keep the record alongside the test so another developer can repeat it after a model, SDK or policy change.

Check cache reuse separately from a useful answer

Google says earlier turns remain eligible for cached-token treatment because the update is appended at the current boundary. That is a mechanism to evaluate in your application, rather than a fixed saving to put into a business case.

Inspect actual usage across comparable conversations. Keep the task, model and starting conversation consistent, and compare the old update method with the new one. Record cache usage, response time, whether the right action was selected and any human correction needed. A cheaper turn that chooses an unavailable action hasn't finished the job well.

For an existing Gemini agent, choose one point where the job changes and give the developer the fictional-account exercise above. That is a useful first step before redesigning the wider application. Which action would you want your assistant to hand back to a person while keeping the conversation going?

To choose a sensible first agent job around the systems your team already uses, Book a conversation.

  • Jake