4 December 2026

AI and agents, every day. Straight to it.

ToolsQuick notes

Gemini's Interactions API appends system instructions mid-conversation without breaking the prompt cache

Agents receive new rules and tools mid-session without reprocessing the whole conversation.

Diego Sato

· 2 min read

Read in Portuguese

Changing a system instruction partway through a long session used to invalidate the prompt cache and force the model to reprocess the whole conversation. On December 3, Google opened a public preview of the system_input step in the Gemini API's Interactions API, covering every Gemini 4 model on the v1beta endpoint.

In an example by Trey Nguyen and Daniel Kyme, product managers at Google, a deployment freeze arrives on the second turn:

turn2 = client.interactions.create(
 model="gemini-4-neon",
 previous_interaction_id=turn1.id,
 system_instruction=system_instruction,
 input=[
 {
 "type": "system_input",
 "content": [
 {
 "type": "text",
 "text": (
 "A production deployment freeze is now active. "
 "Recommend read-only diagnostics and do not allow further rollouts."
 ),
 }
 ],
 },
 {
 "type": "user_input",
 "content": [
 {
 "type": "text",
 "text": "Give me the command to deploy a new release.",
 }
 ],
 },
 ],
)
print(turn2.output_text)

The step carries the weight of a system instruction, overrides user messages and holds for the rest of the session, while earlier turns remain cached. The added_tools and removed_tools fields swap functions in and out without touching the top-level tools list; MCP server tools are excluded for now. Tokens in the step bill at the model's standard input rate, with no separate fee.

Useful for agents that run many turns under shifting permissions. The deciding constraint: the step only steers the model, so your backend still has to authorize every function call.

Report an error

Use 10–1,000 characters; a reply email shares this space.

Next in your reading list