{"slug": "gemini-managed-agents-deploy-an-ai-agent-with-one-api-call", "title": "Gemini Managed Agents: Deploy an AI Agent with One API Call", "summary": "Google launched Managed Agents in the Gemini API at I/O 2026, allowing developers to deploy an AI agent with a single API call that provisions a Linux sandbox for code execution, web browsing, and file management. The Interactions API replaces multi-service setups, with the Antigravity agent running on Gemini 3.5 Flash and outperforming previous models on agentic benchmarks. During public preview, sandbox compute is free, with token costs at $1.50 per million input and $9.00 per million output tokens.", "body_md": "Google shipped Managed Agents in the Gemini API at I/O 2026, and the pitch is blunt: call an API, get a working Linux sandbox where an AI agent reasons, runs code, browses the web, and manages files — all in one call. No VMs to spin up, no orchestration loop to write, no tool registry to maintain. The first call to `client.interactions.create()`\n\nreplaces what used to be a multi-service setup. Whether or not it holds up in production, the developer experience argument is hard to argue with.\n\n## What Managed Agents Actually Do\n\nThe core of this is the **Interactions API** (currently in Beta), which replaces `generateContent`\n\nfor agentic work. You pass a task to the Antigravity agent — `antigravity-preview-05-2026`\n\n, Google’s general-purpose managed agent — and Google provisions a remote Linux sandbox, runs the agent loop, and returns the result. Inside that sandbox, the agent can execute Python, Node.js, and Bash; install packages; read and write files; and browse the web. That last combination — code execution *and* web browsing in the same isolated environment — is what separates this from OpenAI’s code interpreter, which keeps those capabilities more siloed.\n\nThe Antigravity agent runs on [Gemini 3.5 Flash](https://blog.google/innovation-and-ai/technology/developers-tools/google-io-2026-developer-highlights/), fine-tuned specifically for tool calls and shell command output. Google reports Terminal-Bench 2.1 at 76.2% and MCP Atlas at 83.6%, outperforming Gemini 3.1 Pro on the agentic benchmarks that matter for this use case.\n\n## The Code: Start in Under Five Minutes\n\nInstall the SDK (`pip install google-genai`\n\n), set your `GEMINI_API_KEY`\n\n, and you’re ready. Here’s the basic pattern:\n\n``` python\nfrom google import genai\n\nclient = genai.Client()\n\n# One call provisions a fresh Linux sandbox\ninteraction = client.interactions.create(\n    agent=\"antigravity-preview-05-2026\",\n    environment=\"remote\",\n    input=\"Research the top Python web frameworks in 2026. Write a markdown comparison and save it as report.md\"\n)\n\nprint(interaction.output_text)  # Final response\nprint(interaction.steps)        # Every reasoning step and tool call\n\n# Continue in the same sandbox — files and packages persist\nfollow_up = client.interactions.create(\n    agent=\"antigravity-preview-05-2026\",\n    environment=interaction.environment_id,\n    previous_interaction_id=interaction.id,\n    input=\"Add benchmark data and convert report.md to HTML\"\n)\n```\n\nThe `interaction.steps`\n\nlist is worth examining when debugging. It surfaces every reasoning step, tool invocation, and code execution so you can trace exactly what the agent did — significantly more useful than a black-box response.\n\n## State: Two Independent Dimensions\n\nThe state model is what makes iterative workflows practical. The [Interactions API](https://ai.google.dev/gemini-api/docs/interactions/interactions-overview) tracks two independent dimensions:\n\n**Conversation context**— tracked via`previous_interaction_id`\n\n. Pass the last`interaction.id`\n\nand the agent carries forward its full chat history, reasoning trace, and tool logs.**Environment state**— tracked via`environment_id`\n\n. Reuse the same sandbox and your installed packages, generated files, and file system state persist. Sandboxes have a 7-day TTL.\n\nThese two are independent by design. You can reset conversation history while keeping the environment — useful for running different prompts in the same prepared sandbox — or vice versa. Reusing `environment_id`\n\nis the better practice for iterative tasks: it avoids re-provisioning latency and keeps the packages you installed in step one alive for step three.\n\n## What It Costs Right Now\n\nDuring the public preview, sandbox compute is free. You pay only for tokens at standard Gemini 3.5 Flash rates: **$1.50 per million input tokens** and **$9.00 per million output tokens**. That’s 25% cheaper than Gemini 3.1 Pro ($2.00/$12.00), which is now outclassed on agentic benchmarks anyway. When Managed Agents move to GA on the [Enterprise Agent Platform](https://cloud.google.com/products/gemini-enterprise-agent-platform/pricing), Google Cloud pricing applies. If you’re evaluating this for a real use case, the preview window is the right time to benchmark it.\n\n## Where This Fits (Honest Take)\n\nManaged Agents are not the right tool for every agent workflow. Here’s where they earn their place and where they don’t.\n\n**Pick Managed Agents when:** you want a working prototype in an afternoon, you’re already on GCP or deep in Google Workspace, or your use case is self-contained tasks — research, code execution, data processing — that don’t require tight integration with external services you control.\n\n**Stick with Claude Agent SDK or OpenAI when:** you need fine-grained control over the orchestration loop, complex multi-agent topologies with MCP integration, or production-grade reliability guarantees that a preview product can’t provide. The Claude SDK gives you composable agents with explicit tool registration and transparent state management — more setup, more control.\n\nThe honest comparison: Managed Agents are to agent development what Vercel was to deployment — they remove the infra work so you can focus on what your agent actually does. That’s genuinely valuable. Not everyone needs more control than that.\n\n## Get Started\n\nThe [official quickstart](https://ai.google.dev/gemini-api/docs/managed-agents-quickstart) covers your first interaction in Python, JavaScript, and REST. The [Antigravity agent reference](https://ai.google.dev/gemini-api/docs/antigravity-agent) has the full capability list. If you want to build a custom managed agent with your own tool set and system prompt, the documentation is at [Building Managed Agents](https://ai.google.dev/gemini-api/docs/custom-agents).\n\nThe preview is live now. Sandbox compute is free. If you’ve been meaning to prototype an agent workflow, this is the lowest-friction entry point available — with the understanding that preview means preview.", "url": "https://wpnews.pro/news/gemini-managed-agents-deploy-an-ai-agent-with-one-api-call", "canonical_source": "https://byteiota.com/gemini-managed-agents-antigravity-api/", "published_at": "2026-06-13 18:09:14+00:00", "updated_at": "2026-06-14 00:41:24.081084+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-products", "ai-tools", "ai-infrastructure", "large-language-models"], "entities": ["Google", "Gemini API", "Antigravity", "Gemini 3.5 Flash", "Interactions API", "OpenAI", "Terminal-Bench", "MCP Atlas"], "alternates": {"html": "https://wpnews.pro/news/gemini-managed-agents-deploy-an-ai-agent-with-one-api-call", "markdown": "https://wpnews.pro/news/gemini-managed-agents-deploy-an-ai-agent-with-one-api-call.md", "text": "https://wpnews.pro/news/gemini-managed-agents-deploy-an-ai-agent-with-one-api-call.txt", "jsonld": "https://wpnews.pro/news/gemini-managed-agents-deploy-an-ai-agent-with-one-api-call.jsonld"}}