You've decided you want a managed agent: the provider runs the loop so you don't hand-write while stop_reason == "tool_use", host the compute, or babysit session state. As of this week there are two serious options — Anthropic's Claude Managed Agents and Google's Managed Agents in the Gemini API, freshly expanded on July 7, 2026. They sound like the same product. They are not. Here's the decision, first-screen.

The short answer: Claude Managed Agents is a platform — a persisted, versioned agent plus a hosted sandbox the agent actually works inside. Gemini Managed Agents is a lighter runtime — a way to run agent interactions in the background, with remote MCP and function calling, on the free tier. Pick by whether your agent needs a real hosted workspace or just a place to run.

The mental model: who holds the session#

The difference that decides everything is what "managed" means in each.

Claude Managed Agents splits into three objects. You create an Agent once — model, system prompt, tools, MCP servers, skills — and it's persisted and versioned. You then start Sessions that reference it by ID. Each session provisions a container on Anthropic's infrastructure: a real workspace where bash, file edits, and code execution run. The agent loop itself runs on Anthropic's orchestration layer and acts on that container through tools; you drive it over an SSE event stream — sending user messages, interrupting, or returning your own custom-tool results mid-run.

# Claude: define the agent ONCE (versioned), then run sessions against it
agent = client.beta.agents.create(
    name="Repo Fixer",
    model="claude-opus-5",
    system="You fix failing tests in the mounted repository.",
    tools=[{"type": "agent_toolset_20260401"}],  # bash, read/write/edit, glob, grep, web_search, web_fetch
)

session = client.beta.sessions.create(
    agent=agent.id,             # or {"type": "agent", "id": agent.id, "version": 3} to pin
    environment_id=env.id,      # the per-session container template
)
# then stream events, send user.message / custom-tool results back

The payoff is durability and control: the agent config is a first-class object you iterate and roll back, and the agent has a genuine filesystem to work in. If you're still deciding whether you even want a managed loop versus owning it yourself, start with manual loop vs tool runner vs Managed Agents — this piece assumes you've already chosen "managed."

Gemini Managed Agents sits closer to a single API call. Google runs the loop, and the July expansion added the pieces that make that practical for real work:

# Gemini: run the loop in the background, hand it a remote MCP server at call time
generate(
    model="gemini-...",
    contents=[...],
    tools=[{"mcp_server": "https://your-mcp.example.com/mcp"}, code_execution],
    background=True,            # runs async on Google's servers; poll/await the result
)

There's no long-lived, versioned agent object to manage and no session/container model to reason about. You get a hosted, backgroundable loop with MCP and functions — and not much ceremony.

The decision, made simple#

Choose Claude Managed Agents when:

Choose Gemini Managed Agents when:

The tell: if your agent needs somewhere to stand — a filesystem, a repo, a persistent identity — Claude holds the session. If it just needs somewhere to run — briefly, cheaply, in the background — Gemini does.

The honest caveat#

These aren't at the same maturity. Claude Managed Agents is a broad platform in beta (vaults, memory stores, skills, multi-agent, scheduled deployments, even self-hosted sandboxes). Gemini's Managed Agents debuted at Google I/O in May 2026 and is still filling in — the July update is exactly that filling-in. So the comparison isn't "which is better," it's "which shape fits the job."

Most teams building seriously on agents this year will end up using both: Gemini Managed Agents for the swarm of lightweight, backgroundable tasks where free-tier and fire-and-forget win, and Claude Managed Agents for the heavy, stateful, sandbox-bound work where a versioned agent operating in a real workspace is worth the platform. Pick per task, not per vendor.