Illustration of Gemini 2026 Agent, tool calling, and structured output changes

You open Google AI Studio and the docs already default to the Interactions API. Production still reads outputs, response_mime_type, and content.delta. Marketing pages pile on Gemini Agent, Managed Agents, and Antigravity. What actually breaks launches is usually not the model name—it is the response shape.

This guide splits four 2026 changes: where Gemini Agent actually runs, how tool calling moved from a flat list to typed steps, how the API coexists with generateContent, and the new Structured Output object. Facts are current as of 2026-08-18 against the Interactions overview and the May 2026 breaking-change guide.

What this delivers: a developer checklist, not a ranking. One-line version: new work uses Interactions; production first pins Api-Revision and parsers—do not rename the Agent first.

Quick Answer

QuestionAnswer
Which API now?Use Interactions for new projects (GA in June 2026). generateContent stays supported, but long-running agent features land there first.
What is Gemini Agent?Managed Agents on the same interactions.create call (for example deep-research-preview-04-2026, antigravity-preview-05-2026) that plan, code, and browse inside an isolated Linux sandbox.
Biggest tool-calling change?Responses use typed steps instead of flat outputs. Streaming arguments arrive as arguments_delta and must be concatenated.
How do I request JSON?Drop top-level response_mime_type. Use response_format: { type: "text", mime_type: "application/json", schema: … }.
Does old code break overnight?The legacy schema was scheduled for removal on 2026-06-08. During migration, send Api-Revision: 2026-05-20.

What does Gemini Agent mean in 2026?

In the 2026 docs, “Gemini Agent” is no longer just a chat model that can call tools. Google put models and managed agents on one Interactions endpoint: pass model for ordinary turns, agent for hosted jobs.

In August 2026 we ran the same “tidy the README and list five risks” prompt. gemini-3.6-flash usually finished in one text turn plus 0–1 tools. antigravity-preview-05-2026 entered a sandbox, installed packages, and edited files—wall time jumped from about 8 seconds to 40–90 seconds. Treating the latter as “smarter Flash” immediately mismatchs timeouts and invoices.

Call typeTypical IDWhere it runsUse it for
Modelgemini-3.6-flash / gemini-3.1-pro-previewAPI-side inferenceLow-latency chat, JSON extract, sync tools
Deep Researchdeep-research-preview-04-2026Hosted research loopLong retrieval, multi-source briefs
Antigravityantigravity-preview-05-2026Isolated Linux sandboxCode, packages, files, web

July 2026 Managed Agent additions

The July update filled four production gaps: background=true (requires store=true), remote mcp_server tools, custom functions that pause on requires_action, and credential refresh via environment_id without wiping the sandbox filesystem.

  • ☐ Task may outlive one HTTP timeout → background execution and poll the interaction ID
  • ☐ Need private data → attach remote MCP instead of a custom proxy
  • ☐ Tokens expire → next turn keeps the same environment_id with a new network config
  • ☐ You still need signing or macOS tooling → the Agent sandbox is not Apple Silicon
The hosted sandbox is Linux, not macOS. iOS signing, Xcode, and xcodebuild still belong on a dedicated M4 node such as Macstripe cloud Mac: let Gemini Agent emit the patch, let a real Mac build it.

How did tool calling change?

Request-side declarations are mostly the same: names plus JSON Schema. The timeline changed. You used to scan outputs for type == "function_call". Now you walk steps and also handle server tools such as thought, google_search_call, and code_execution_call.

for step in interaction.steps:
    if step.type == "function_call":
        run_tool(step.name, step.arguments)

Streaming is a larger break. The old path often delivered a complete functionCall in one chunk. The new path sends the name on step.start, then several step.delta events with arguments_delta strings. One weather sample produced 7 fragments before the JSON was valid. Services without a buffer treat partial arguments as final and hit Malformed_Function_Call or an empty city.

JobOld habit2026 habit
Final textoutputs[-1].textinteraction.output_text (fine for simple replies)
Find a tool callLoop outputsLoop steps, inspect type
Streamed textcontent.deltastep.delta
Streamed tool argsOne complete objectAccumulate arguments_delta
Need an actionGuess when to stopStatus requires_action plus the matching event

When you send results back, resume with previous_interaction_id and a function_result in input. Stateless clients should replay steps, not the old outputs array. That matches the order in our Gemini 4 API migration checklist: lock parsers before you lock model IDs.

Gemini 3 series models can combine function calling with structured output. Prompts that force a block of XML immediately before a tool call often fail. Official guidance is to turn the plan into its own function (for example update) instead of free-form text.

What changed at the API layer?

From June 2026, Interactions is the default surface in Google AI Studio and Gemini API docs. Typed steps replace a role salad: user_input, thought, function_call, model_output. POST usually returns output steps only; GET /interactions/{id} returns the full timeline including the user turn.

CapabilitygenerateContentInteractions API
Sync chat / simple JSONStill finePreferred for new code
Managed Agents / Deep ResearchNot the main pathFull entry point
Long background jobsBuild your own queuebackground=true + store=true
Remote MCPDIYPass mcp_server on the request
Revision controlModel IDModel/agent ID plus Api-Revision

Streaming events were renamed: interaction.startinteraction.created, content.*step.*, completion is interaction.completed. We saw canaries where logs said “complete” while the state machine still waited for “done”—string mismatch, not a flaky model.

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Api-Revision: 2026-05-20" \
  -d '{"model":"gemini-3.6-flash","input":"Ping"}'

Google now treats Interactions as the default for third-party SDKs and ships a gemini-interactions-api Skill so coding agents stay current. That is the same problem as maintaining Skills in Cursor or Claude Code: encode protocol changes as executable notes, not hallway reminders.

How should Structured Output be declared?

Earlier Interactions drafts split response_mime_type from the schema, so one field often lagged. The May 2026 change folds everything into a polymorphic response_format: text, audio, or image via type; multiple modalities are an array. Image aspect_ratio and image_size moved out of generation_config, which now stays about thinking (temperature, top_p, thinking) rather than “what to emit”.

interaction = client.interactions.create(
    model="gemini-3.6-flash",
    input="Summarize this log in three sentences.",
    response_format={
        "type": "text",
        "mime_type": "application/json",
        "schema": {
            "type": "object",
            "properties": {
                "summary": {"type": "string"},
                "severity": {"type": "string", "enum": ["low", "high"]}
            },
            "required": ["summary", "severity"]
        }
    },
)
print(interaction.output_text)

On 50 ops-log samples, the old field mix returned 12/50 HTTP 400 after an SDK bump. The type: text + nested schema form dropped that to 0. Another failure mode: output_text only joins trailing consecutive text. If a tool step sits in the middle, walk steps yourself.

  • Stable JSON: put the schema in response_format; do not rely on “please output JSON” in the prompt.
  • Text plus image: pass an array of format entries.
  • Agent work plus structure: prefer a function-parameter schema over regex on free text.
Validate JSON at your service boundary. A fixed eval set beats three manual prompts. Peak eval traffic can sit on a day-rented cloud Mac so laptops and invoices stay decoupled.

How should you migrate without a Friday outage?

Do not rename the Agent, bump the SDK, and rewrite parsers in the same week. One internal canary only changed readers (output_text + steps) and left model IDs alone; error rate fell from 18% the week of cutover to 2%. Deep Research waited until week two.

  1. Add the documented Api-Revision header and confirm canaries understand new event names.
  2. Parse steps instead of outputs; buffer streamed tool arguments.
  3. Inline response_mime_type into response_format and regress 20–50 real payloads.
  4. Stateless clients replay steps plus a new user_input.
  5. Gate Managed Agents separately with budget and timeout caps.
  6. Compare effective task cost with the Grok 4.5 cost notes so “switch vendor” is not a fake optimization.
  7. Document rollback: Agent flag off, revision header back, old parser kept for a week.

Interactions is not an approval workflow. Roles, tickets, and human gates still live in your app—or in something like the Paperclip workflow guide.

Who should switch now?

Your situationRecommendation
Greenfield Gemini serviceStart on Interactions; skip a generateContent wrapper
Existing generateContent, short chatsMigrate on Google’s schedule; skip hosted Agents for now
Production JSON schemasFix response_format this week—this is the 400 magnet
Multi-minute research or codingPilot Managed Agents + background with a separate quota
ipa / notarization / device debugGemini for patches; builds stay on a real Mac

A four-person mobile team dumped Antigravity Swift diffs onto a shared notebook. Memory and DerivedData melted by afternoon. They split the work: Agent sandbox for the diff, a dedicated M4 Mac Mini for xcodebuild. Compile and chat stopped blocking each other.

FAQ

Will generateContent shut off immediately?

Google still calls it fully supported, and mainline Gemini models remain available there. Long-running agents, background execution, and remote MCP show up first on Interactions. Do not make it the default for new code.

Is output_text enough instead of walking steps?

Yes for plain text. If thoughts, images, or tools appear in the middle, trailing concatenation drops earlier text. Complex chains must iterate steps.

Why does background=true fail?

Background execution is incompatible with store=false because the server must persist the interaction. Enable store and poll the returned ID.

Can a Managed Agent replace a Mac CI runner?

No. It is good at patches and research. Notarization, simulators, and device builds still need macOS.

Can function calling and JSON mode run together?

On Gemini 3 series, yes. Do not force a large XML prelude before tools; encode the plan as its own function.

Conclusion

The 2026 Gemini shift is not another chat window. Interactions is now the shared door for models and agents: timelines use steps, output uses polymorphic response_format, and managed agents run long jobs in a Linux sandbox. Switch now if you are greenfield, already seeing JSON 400s, or piloting background research/coding. Do not treat a Linux agent as Xcode.

Fix parsers and schemas first, then flip the Agent flag. Keep compile and signing on stable Apple Silicon. When you need a dedicated machine by the day, pick a Macstripe node from the home page.

Further reading