Gemini API Now Accepts Instructions Mid-Conversation
Google's Gemini API now accepts instructions mid-conversation. A small interface change with big consequences for how AI agents are built.

Imagine hiring a talented new employee who is contractually forbidden from receiving any guidance after their first day. Everything they will ever need to know about how to behave — tone, rules, boundaries, priorities — must be compressed into a single briefing document delivered the morning they arrive. From then on, you can only send them customer emails and hope for the best. For years, that has been roughly what it is like to build on a large language model API: the system prompt is the first-day briefing, and everything after it is negotiation.
Google is now rewriting the terms of that contract. As announced on the company's official blog, the Gemini API supports mid-conversation instructions — the ability to inject new directives into an ongoing session without starting over and without re-sending the entire conversation history from scratch. It is the kind of feature that reads as a footnote in a changelog and, for anyone who has built a long-running assistant, lands closer to a structural repair.
The Drift Problem Nobody Designed
The rigid order of operations in AI assistants was never a philosophical choice; it was an engineering convenience. Instructions live in a privileged slot at the top of the conversation. Everything else — user questions, model answers, tool outputs — flows through the ordinary message channel. The trouble is what happens over hundreds of turns. The original instructions sink deeper into a growing pile of context, and the model's behavior slowly sags away from them. Developers have a name for it: drift. A support bot that started crisp and formal becomes chatty. A coding agent that was told to always ask before deleting files starts assuming consent.
The workarounds were never pretty. One option was to restart the session with a fresh system prompt, which meant resending the full history — costs spike, latency grows, and session state carefully accumulated along the way can vanish or need to be painstakingly reconstructed. The other option was a kind of polite forgery: slipping in a fake user message that reads "from now on, switch to formal Spanish" and hoping the model treats it as a command rather than content. Sometimes it works. Sometimes it doesn't. There was never a guarantee, because the instruction channel and the data channel were the same channel, and the model had to guess which one mattered.
Mid-conversation instructions promote that forgery into a first-class citizen. Instructions can now be added within the conversation flow as something explicitly distinct from an ordinary message — a statement aimed at the model's behavior for the rest of the session. For specifics such as the exact field format and which model versions honor it, developers are pointed to the Gemini API documentation and changelog; as with any freshly shipped API feature, behavior across model versions may vary, and it is worth reading the fine print before rewriting production code around it.
Why Agents Need Course Corrections
The most immediate benefit is economic. Long conversations are expensive: every request typically carries its relevant context, and instructions smuggled in through pseudo-messages add weight without adding information. An official instruction channel means developers can redirect an agent without inflating the context window. That matters well beyond customer-service chatbots. Research agents that run for hours accumulate enormous transcripts; coding assistants change tasks mid-project; live translation tools need to shift register and formality when the person on the other end of the line changes. All of these are, at their core, requests for a mid-flight steering mechanism.
There is a quieter architectural shift here too. Until now, application developers built what amounts to their own session-state machinery — external memory, automatic summaries, homegrown logic for when and how to update the rules. This feature hands the API a primitive that did not formally exist: a way to say "from this point forward, new rules apply" that the model itself understands, rather than one emulated by the application layer. A chunk of that complexity now moves into the platform, which is usually where it is cheaper and safer to maintain.
The security implications deserve equal attention. The easier it becomes to inject instructions mid-session, the more attractive the injection surface becomes for attackers. Prompt injection — malicious content disguised as data that tries to slip into the instruction channel — is already one of the most stubborn problems in agent design, and a legitimate steering mechanism raises the stakes of keeping that channel trustworthy. In practice, developers will need to ensure that only the trusted application side can write instructions, never text arriving from end users or from the web pages an agent happens to be reading. Google has not, at least as far as has been reported, spelled out every safeguard, and for now the burden of that discipline falls on the builders.
Still, the direction of travel is unmistakable. Across the industry, large language models are being repositioned from disposable chatbots into long-lived collaborators that are steered continuously rather than configured once. A steering wheel that only turns once is certainly easier to engineer. But a car you can actually drive is one whose wheel keeps moving through the whole journey — and with mid-conversation instructions, Gemini API has nudged the wheel a meaningful turn further.



