A Python SDK for building AI agents on Antigravity and Gemini with tool use, streaming, and policy controls. Install from PyPI to get platform wheels with the bundled runtime binary.
Overview
Google Antigravity SDK for Python helps developers build agents that read files, run commands, edit code, and use the same agent loop as Google Antigravity. It wraps state management, tool execution, and backend communication so application code can focus on agent behavior.
The Agent class offers a high-level async entry point for lifecycle, tools, hooks, and default policies. Conversation and ConnectionStrategy APIs provide deeper control over sessions, history, and chat flows. Responses can be streamed token by token, with optional streams for model reasoning and tool calls.
Developers can attach multimodal inputs, register Python functions as tools, connect external MCP servers, and define hooks and permission policies. Triggers run background tasks that push events into the agent. Authentication supports API-key express mode or Vertex-style project, location, and application default credentials.
The SDK can pair with local Gemma models through LiteRT-LM for offline workflows. Built-in filesystem and terminal tools can be combined with custom callables, MCP tools, and skills in one pipeline.
Key features
- High-level Agent and Conversation APIs
- Streaming text and tool call output
- Custom tools and MCP server integration
- Declarative hooks and security policies
- Multimodal file and path attachments
- Vertex express and standard auth modes
- Background triggers for external events
- Optional local Gemma via LiteRT-LM
Use cases
- Building file and terminal coding agents
- Streaming agent UIs and consoles
- Enterprise Gemini Vertex deployments
- Extending agents with MCP tools
- Offline local model agent scripts