Repository Public
1<br />23Managed agents on the Gemini API give you a configurable agent4harness. A single API call provisions a Linux sandbox where the agent reasons,5executes code, manages files, and browses the web autonomously.6[Quickstart7Make your first agent call, stream responses, and build a custom agent.](https://ai.google.dev/gemini-api/docs/managed-agents-quickstart) [Antigravity Agent8Capabilities, tools, multimodal input, and pricing for the default agent.](https://ai.google.dev/gemini-api/docs/antigravity-agent) [Agents in AI Studio9Visual playground for prototyping agents without writing code.](https://ai.google.dev/gemini-api/docs/aistudio-agents)1011## Available managed agents1213- **[Antigravity agent](https://ai.google.dev/gemini-api/docs/antigravity-agent)** : General-purpose managed agent built with Gemini 3.8 Flash. Runs code, manages files, and searches the web inside a secure Linux sandbox hosted by Google. You can configure the underlying model (such as Gemini 3.7 Flash, Gemini 3.6 Flash, or Gemini 3.5 Flash) using `agent_config`, and extend it with your own instructions, skills, and data to [build a custom agent](https://ai.google.dev/gemini-api/docs/custom-agents).14- **[Deep Research](https://ai.google.dev/gemini-api/docs/deep-research)**: Autonomous research agent that plans, executes, and synthesizes multi-step research tasks for use cases like market analysis, due diligence, and literature reviews.1516## Security and best practices1718> [!NOTE]19> **Note:** Managed agents are in **Public Preview**. Review the agent's actions and outputs before relying on them in sensitive workflows.2021Every agent runs in a sandboxed environment that is isolated at the OS level.22The sandbox has unrestricted outbound network access by default. You can23restrict or disable network access using an allowlist.2425### Network access2627By default, environments have unrestricted outbound network access. Use a28`network` allowlist to restrict outbound traffic to specific domains or29wildcard patterns. For configuration details, see30[Network Allow List](https://ai.google.dev/gemini-api/docs/aistudio-agents#network_allow_list) (AI31Studio) or [Network rules](https://ai.google.dev/gemini-api/docs/custom-agents#with_network_rules)32(API).3334### External tools and APIs3536You can connect external tools and APIs to extend the agent. Only use tools37from trusted sources and scope permissions to the minimum required. Store38secrets as managed credentials and reference them by ID, so the egress proxy39injects them at request time and they are never exposed inside the sandbox. The40agent may use any credential it has access to, so only provide credentials whose41full scope you are willing to grant.4243- Use least-privilege service accounts or API keys.44- Prefer short-lived tokens over long-lived keys.45- Only provide credentials whose full scope you are willing to grant.46- Rotate credentials on a regular schedule.4748For the credential types and management operations, see49[Credentials](https://ai.google.dev/gemini-api/docs/agent-credentials). You can also set headers50inline on an allowlist rule, see [Network51configuration](https://ai.google.dev/gemini-api/docs/agent-environment#network-configuration).5253### Human oversight5455Always verify outputs (generated code, data transformations, configuration56changes) before deploying them, especially for tasks that modify data or57interact with external systems.5859## Pricing6061Managed agents use a [pay-as-you-go model](https://ai.google.dev/gemini-api/docs/pricing#pricing-for-agents)62based on Gemini model tokens and tool usage. A single interaction can trigger63multiple reasoning loops, typically consuming 100k to 3M tokens. Environment64compute is **not billed** during the preview. See [estimated costs](https://ai.google.dev/gemini-api/docs/antigravity-agent#availability-and-pricing)65for per-task breakdowns. Managed agents are also available on the free tier with66a free rate limit and usage quota.6768## Limits6970| Limit | Description |71|---|---|72| **Environment Lifetime** | Environments are permanently deleted after 7 days of inactivity. |73| **VM Spin-down** | VMs shut down after a brief period of inactivity to conserve resources. The next request restores the state (with a cold start). |74| **Pre-installed Software** | Ubuntu-based environment with Python 3.12 and Node.js 22. For more information on the environment's base image, see [Pre-installed software](https://ai.google.dev/gemini-api/docs/agent-environment#pre-installed-software). |75| **Max agents** | You can have up to 1,000 managed agents. |7677## Agent frameworks7879You can also build agents with Gemini using these frameworks and SDKs:8081- [**LangChain / LangGraph**](https://ai.google.dev/gemini-api/docs/langgraph-example): Build stateful, complex application flows and multi-agent systems using graph structures.82- [**LlamaIndex**](https://ai.google.dev/gemini-api/docs/llama-index): Connect Gemini agents to your private data for RAG-enhanced workflows.83- [**CrewAI**](https://ai.google.dev/gemini-api/docs/crewai-example): Orchestrate collaborative, role-playing autonomous AI agents.84- [**Vercel AI SDK**](https://ai.google.dev/gemini-api/docs/vercel-ai-sdk-example): Build AI-powered user interfaces and agents in JavaScript/TypeScript.85- [**Google ADK**](https://google.github.io/adk-docs/get-started/python/): An open-source framework for building and orchestrating interoperable AI agents.86- [**Antigravity SDK**](https://antigravity.google/product/antigravity-sdk): Build autonomous AI agents using the same tools, agent loop, and context management that power Google Antigravity, programmable in Python.