SI Agent News
← All news

Google lets developers rewrite a Gemini agent's rules without ending the chat

A new preview feature in Google's Gemini API lets builders change an agent's standing instructions mid-conversation, with new rules outranking old ones.

3 min readMade with AI

The short version

  • Preview in the Gemini API: system instructions can change without interrupting the conversation.
  • New instructions carry the same authority as the originals; the latest one wins in a conflict.
  • Developers can also switch a tool on or off mid-exchange, such as removing a refund function.
  • Earlier exchanges kept in memory are billed at a discount, with no extra charge on top of the usual token price.
  • Google says apps must verify each action on their own servers; a researcher has hijacked agents via prompt injection.

What Google announced

Google announced on Thursday that developers using the Gemini API can now change the system instructions of a Gemini agent without breaking off the conversation. System instructions are the standing rules an AI is given at the start: its role, its limits, what it may and may not do. The feature is available in preview, meaning it is an early release that is still being tested.

As Brief IA reported, the new instructions carry the same authority as the original ones. The same release lets developers make a tool available or disable it partway through an exchange. The example given is removing a refund function while an account is under review.

Why it matters

Long-running AI agents need rules that change as circumstances change, such as a new spending limit or a paused account. Doing that cleanly and more cheaply makes agents easier to run. Google's own warning shows that better rule-setting does not replace checking what an agent actually does.

What was wrong with the old way

Agents can keep a conversation going for hundreds of turns, and their rules often change along the way. Spending limits get revised. Permissions get modified. Until now, a developer who wanted to add a rule mid-conversation could slip it in as a user message.

That workaround had two problems. The model gave such a message less weight in its decisions. And because it looked like any other user message, a user could imitate it and pretend to be giving an official instruction.

Now, adding an instruction is its own distinct step in the exchange, separate from what the user says. Earlier instructions stay in place. If two of them contradict each other, the most recent one wins.

The cost and speed angle

Changing the main instructions used to mean the model had to reprocess the whole conversation from the start. That meant extra cost and extra waiting. With the new feature, the history can stay in memory, and those earlier exchanges are billed at a discount.

Google adds no surcharge on top of the usual token price. A token is the small chunk of text that AI services count and bill by. The feature works with Gemini 4, including the recently launched Gemini 4 Neon.

This matters because the cost of running agents is a growing worry for companies. Some are seeing their AI bills triple even though individual tokens are getting cheaper. For comparison, the source notes that Anthropic added message threads to its API in November, and those mainly save time rather than money.

The security caveat

Google is explicit about the limits. In its view, this mechanism exists only to steer the model. It is not a security guarantee. Applications are expected to check every action on their own servers before carrying it out, rather than trusting the model to follow its rules.

The warning has a real basis. The source says a researcher has already managed to hijack agents at Google and at other companies through prompt injection. That is an attack where text fed to an AI, such as a web page or a message, tricks it into following the attacker's instructions instead of its owner's.

A well-placed rule helps the model behave. The real safeguard is still a check outside the model. If an agent can issue refunds, the server should confirm that a refund is allowed before the money moves.

Who this touches

The source describes a developer feature in the API, not a button in the Gemini chat app. Most readers will not use it directly. They may still meet its effects in apps built on Gemini, such as support bots and shopping or booking assistants whose rules can now shift in the middle of a task.

It also fits the idea we raised in today's issue: agents that act for you need standing instructions you can adjust, such as a budget or a confirmation step. The source does not say which products will use this or how soon.

What to watch

  • Does the preview reach everyday Gemini users, or stay a developer feature?
  • Will other AI providers offer rule changes that carry the same authority as the original instructions?
  • Do security researchers find new ways to get around rules that can be changed mid-conversation?

Try it

If you build with the Gemini API, test the preview on a small agent: add a rule mid-conversation, then confirm your server still checks every action. If you only use chat assistants, keep your rules short and edit the rule itself when output drifts.

Up nextGoogle says its Gemini 4 math agent wrote six papers and beat a 34-year factoring record

More stories

Say why

Liked it? Say why

Add a line for other readers.

No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.

Sources

The reporting and documents this story is built from. Each link opens the original.

Written with AI by the SI Agent News Desk from the reporting above. Every number is checked against it.Spot a mistake or a concern? Contact us · Corrections.

More AI news