Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Antigravity 20 & Managed Agents: Dev Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Google Antigravity 20 is a developer platform that lets you build, deploy, and manage AI agents using a visual canvas and a CLI. Managed Agents are the built-in hosting and orchestration layer that handles scaling, monitoring, and tool integration for those agents. For developers, this means you can focus on agent logic and workflows instead of infrastructure. Here's a practical step-by-step guide to getting started.

What You'll Need

  • A Google Cloud project with billing enabled (Antigravity uses Cloud resources).
  • Google Cloud CLI (gcloud) installed and authenticated (gcloud auth login).
  • Node.js 18+ or Python 3.9+ (depending on your preferred SDK).
  • Basic familiarity with REST APIs and JSON.

Step-by-Step

  1. Enable the Antigravity API – In the Google Cloud Console, go to APIs & Services > Library and search for "Antigravity API". Click Enable. (Menu labels may vary slightly by console version.)
  2. Install the Antigravity CLI – Run gcloud components install antigravity or download the CLI from the official Google Cloud SDK page. Verify with antigravity --version.
  3. Create a project workspace – Run antigravity init my-agent in your terminal. This creates a folder with a config.yaml and a flows/ directory.
  4. Define your agent's intent – Open config.yaml and set the name, description, and model (e.g., gemini-2.0-flash). You can also set a system prompt under system_instruction.
  5. Build a flow (visual canvas) – Run antigravity open to launch the visual editor in your browser. Drag nodes like "User Input", "LLM Call", "Tool Call", and "Condition" onto the canvas. Connect them to define the logic. For example, a simple flow: User Input -> LLM Call -> Output.
  6. Add a managed tool – In the canvas, click the "+" on a Tool Call node and select a pre-built tool like "Google Search" or "Calendar". You can also add a custom REST API tool by specifying the endpoint and auth header in the tool's settings.
  7. Test locally – Run antigravity run to test your agent in a local sandbox. The CLI will simulate a conversation, and you can see logs in the terminal.
  8. Deploy to Managed Agents – When ready, run antigravity deploy. This packages your flow and uploads it to Google's managed infrastructure. You'll get a public HTTPS endpoint.
  9. Invoke your agent – Use the endpoint via a REST call: POST https:///v1/agents/my-agent:run with a JSON body like {"input": "What's the weather today?"}. The response will contain the agent's output.
  10. Monitor and iterate – In the Cloud Console, go to the Antigravity section to see logs, traces, and metrics for your deployed agent. Use this to debug and improve your flow.

Common Mistakes

  • Forgetting to enable the API before deploying – you'll get a 403 error.
  • Using a model name that doesn't exist – check the current model list in the docs.
  • Not setting a system prompt – the agent has no context and may give generic answers.
  • Overcomplicating flows with too many nodes – start simple and add complexity only when needed.
  • Ignoring the local test step – deploying untested flows leads to runtime errors.

Tips

  • Use version control (git) for your flows/ directory – it's plain text and easy to review.
  • Leverage the built-in evaluation tools in the CLI (antigravity eval) to test multiple inputs at once.
  • For production, set up a service account for authentication instead of using your personal credentials.
  • Use environment variables for secrets like API keys – the CLI supports .env files.
  • Check the official Antigravity documentation for the latest tool catalog – new tools are added regularly.

Troubleshooting

If you get a 403 when calling the endpoint: Check that the API is enabled and that your service account has the 'Antigravity Agent Invoker' role. Also verify that you're using the correct bearer token.

If your agent returns empty responses: Check the logs in the Cloud Console – often it's a missing API key for a tool, or the model is incorrectly configured. Test with a simple prompt first.

If antigravity deploy fails: Run antigravity validate to check your config for syntax errors. Also ensure your Google Cloud project ID is set correctly via gcloud config set project.

If the visual canvas doesn't load: Make sure you have a stable internet connection and that your browser allows pop-ups. Try clearing cache or using incognito mode.

If you want to delete a deployed agent: Use antigravity delete --name my-agent. This permanently removes the endpoint – no rollback.

Frequently Asked Questions

Do I need to know machine learning to use Antigravity?

No, you design flows visually and write prompts in natural language. The underlying model is handled by Google.

Can I use my own custom tools?

Yes, you can add any REST API as a tool by specifying the endpoint, method, and headers. Authentication via API keys or OAuth is supported.

How does managed hosting scale?

Google automatically scales the underlying compute based on request volume. You don't need to provision servers.

Can I export my agent to run elsewhere?

Not directly – the flow is proprietary to Antigravity. You can export the flow definition as JSON, but you'd need to reimplement it on another platform.

What programming languages are supported?

The CLI works with any language that can call REST APIs. For local testing, you can use Node.js or Python to simulate requests.

Is there a free tier?

Pricing varies by usage – check the Google Cloud pricing page for Antigravity. There is no separate free tier, but you may be eligible for the general free trial credits.