AI coding assistants are transforming software development, but most developers face three major friction points: high costs, strict rate limits, and context constraints.
Google Antigravity solves this by acting as an autonomous AI agent capable of writing code, debugging, and executing terminal commands. Even better, you can bypass API rate limits by connecting free open-source models through OpenCode and OpenRouter.
Here is a complete tutorial on setting up Antigravity and unlocking unlimited models for free.
Step 1: Install & Set Up Google Antigravity
- Navigate to
antigravity.googleand download the installer for your OS (Windows or macOS). - Install and launch the application.
- Choose your interface preferences:
- Theme: Select Dark or Light theme.
- Mode: Choose Agentic Drive & Development (Recommended).
- Sign in using your Google Account and accept the terms of service.
Step 2: Set Up an AGENTS.md Instruction File
To get production-ready code, define strict guidelines for the AI agent by creating an AGENTS.md file in your project root folder.
- Open your project folder in Antigravity.
- Create a file named
AGENTS.md. - Add system guidelines defining the agent’s behavior:
- Role: Autonomous AI Software Engineer.
- Code Quality: Write clean, modular, and DRY (Don’t Repeat Yourself) code.
- Workflow: Require the AI to read existing project architecture and present an Implementation Plan before writing code.
Step 3: Generate Code with Autonomous Agents
- Open the Antigravity prompt interface.
- Direct the agent to read your setup file and execute your task (e.g., “Follow
AGENTS.mdand build a minimal full-stack Next.js 16 blog with Tailwind CSS”). - Review the generated Implementation Plan.
- Click Proceed to let the agent auto-generate files, install dependencies, and run build/lint commands in your terminal.
- Click Accept All once the task completes successfully.
Step 4: Bypass Rate Limits using OpenCode & OpenRouter
When default model quotas run out, connect open-source models for free using OpenCode.
1. Install OpenCode Terminal Tool & Extension
Run the installation command in your terminal:
Bash
npm i -g opencode-ai
Then, go to the Extensions tab in Antigravity, search for OpenCode, and click Install.
2. Connect OpenRouter for Free Models
- Open the OpenCode interface by pressing
Cmd + Esc(Mac) orCtrl + Esc(Windows). - Go to OpenRouter.ai, create a free account, and generate a new API key.
- In OpenCode, run
/models, select OpenRouter, and paste your API key when prompted.
3. Switch Between Unlimited LLMs
Type /models in the OpenCode window to instantly switch to powerful open-source models, including:
- Llama 3.3 70B
- Qwen 2.5 Coding Models
- Minimax M2.5
- GLM 4.5
Summary
By combining Google Antigravity with OpenCode and OpenRouter, you get an autonomous AI developer environment without paying recurring subscription fees or hitting strict daily caps.