# google-antigravity/antigravity-sdk-python

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/google-antigravity-antigravity-sdk-python).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

3,966 stars · 1,558 forks · Python · Apache-2.0

## Links

- GitHub: https://github.com/google-antigravity/antigravity-sdk-python
- Homepage: https://antigravity.google/product/antigravity-sdk
- awesome-repositories: https://awesome-repositories.com/repository/google-antigravity-antigravity-sdk-python.md

## Topics

`ai-agents` `antigravity` `gemini` `gemini-api` `google` `llm-agents` `mcp` `python-sdk` `skills`

## Description

This is a Python SDK for building asynchronous AI agents. A single async session connects to an agent backend, sends prompts (text or multimodal content such as images and documents), and streams results back as steps, text tokens, model thoughts, and tool calls. The session handles backend startup, authentication, tool wiring, hook registration, and cleanup, so developers don't write the agentic loop by hand. Agents run through a locally running harness on the developer's own machine, and the package ships with a pre-compiled platform-specific binary.

What sets it apart is how much of the agent's behavior can be controlled from outside the agent itself. A declarative policy engine applies allow, deny, and ask-user rules to tool calls, with exact tool names taking priority over wildcards and optional argument-based conditions. Tools can also be hidden from the model entirely. Layered lifecycle hooks work like middleware around sessions, turns, and operations, covering logging, guardrails, rate limiting, and error recovery, with scoped state shared across those stages. Event-driven triggers run as background tasks on intervals, on file changes, or on custom external events, and push messages into a live session so the agent can act without a user prompt.

Tooling and collaboration cover the rest of the surface. Ordinary Python functions can be registered as tools, and external Model Context Protocol servers can be connected alongside them. Several agents can share one chat room, either in synchronized rounds or asynchronously with reactive wake-ups, and an image-generating agent can be chained with a reviewing agent. Agents can also run against locally hosted models entirely offline. Supporting features include session history inspection and size limits, token usage tracking, optional telemetry export, configurable model retries, reusable skill packages, and enterprise platform sign-in.

The repository includes guides and small single-file examples, each teaching one concept such as agents, streaming, tools, policies, hooks, and structured output, plus a full interactive command-line agent that asks for approval before sensitive actions.

## Tags

### Artificial Intelligence & ML

- [Agent SDKs](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-sdks.md) — Offers an asynchronous Python SDK that connects to an agent backend, sends text or multimodal prompts, and streams steps, tokens, thoughts, and tool calls.
- [Autonomous AI Agent Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-ai-agent-frameworks.md) — Provides an async Python SDK for building agents that connect to a backend, call tools, and hold multi-turn conversations without a hand-written agentic loop.
- [Event-Driven Agent Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/event-driven-agent-loops.md) — Runs background triggers on intervals, file changes, or external events that push messages into a live session so agents act without a user prompt.
- [Agent Lifecycle Hooks](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-lifecycle-hooks.md) — Stacks lifecycle hooks around sessions, turns, and operations like middleware to add rate limiting, audit logging, and error recovery without changing agent logic. ([source](https://github.com/google-antigravity/antigravity-sdk-python/tree/main/examples))
- [Agent Harnesses](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-capabilities-skills-tooling/agent-harnesses.md) — Connects to a locally running agent harness shipped as a pre-compiled binary, so agents execute directly on the developer's machine. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/connections/README.md))
- [Tool Allow and Deny Patterns](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/tool-use-and-execution/agent-tool-execution/mcp-tool-allow-lists/tool-allow-and-deny-patterns.md) — Applies declarative allow, deny, and ask-user rules to agent tool calls, with exact names outranking wildcards, so only permitted actions run. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Agent Governance](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-security-and-governance/agent-governance.md) — Governs what an autonomous agent may do by gating tool calls with allow, deny, and approval rules plus lifecycle hooks for guardrails.
- [Event-Triggered Agent Runs](https://awesome-repositories.com/f/artificial-intelligence-ml/event-triggered-agent-runs.md) — Runs background triggers on intervals, file changes, or custom external events that push messages into a live session so the agent acts without a prompt. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))
- [Agent Backend Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/orchestration-engines/ai-agent/agent-backend-managers.md) — Establishes a live agent backend session, handling process startup, transport setup, authentication, and health checks inside an async context manager. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/connections/README.md))
- [Custom Function Registrations](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/tooling-integration-interfaces/agent-tooling-extensions/custom-function-registrations.md) — Registers ordinary Python functions as callable tools the agent can invoke to fetch information or take actions during a conversation. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Agent Prompt Submission](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-prompt-submission.md) — Sends text or multimodal prompts to a connected agent and streams completed steps back asynchronously, with turn cancellation and idle checks. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/connections/README.md))
- [Agent Tool Server Connections](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-tool-server-connections.md) — Connects agents to external Model Context Protocol servers so they can discover and call outside tools alongside built-in and custom ones. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/mcp/README.md))
- [Custom Tool and Reward Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-capabilities-skills-tooling/agent-capability-extensions/custom-tool-and-reward-definitions.md) — Registers ordinary Python functions, sync or async, as agent tools and runs them on request without blocking the event loop. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/tools/README.md))
- [Multi-Agent Collaboration Systems](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/autonomous-agents/multi-agent-collaboration-systems.md) — Coordinates several agents in one chat room, in synchronized rounds or asynchronously, and chains image generation with a reviewing agent.
- [Model Context Protocol](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/model-context-protocol.md) — Gives agents access to custom Python functions and external Model Context Protocol servers so they can fetch information and take actions.
- [MCP Server Connections](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/model-context-protocol/mcp-server-management/mcp-server-connections.md) — Connects external MCP servers and makes their tools available to the agent alongside its built-in capabilities. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))
- [Agentic Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-toolkits.md) — Registers ordinary Python functions as agent tools and connects external Model Context Protocol servers alongside them to extend what agents can do.
- [Multi-Agent Chat Rooms](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-toolkits/multi-agent-chat-rooms.md) — Runs several agents in a single chat room, either in synchronized parallel rounds or asynchronously with reactive wake-ups when new messages arrive.
- [Action Approval Gates](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-action-frameworks/action-approval-gates.md) — Pauses a tool call and asks a human-supplied handler to approve or deny it, failing fast at setup if no handler exists. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/hooks/README.md))
- [Async Agent Session Lifecycles](https://awesome-repositories.com/f/artificial-intelligence-ml/async-agent-session-lifecycles.md) — Wraps the whole agent session in an async context manager that starts the backend, wires tools and hooks, and cleans up automatically on exit.
- [Console Agent Output Streams](https://awesome-repositories.com/f/artificial-intelligence-ml/console-agent-output-streams.md) — Streams conversational text tokens as the agent produces them, giving responsive console output without waiting for the full response. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Local Model Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/local-model-inference.md) — Runs agent workflows entirely offline with locally hosted open models, finishing tasks without network access to a hosted model service. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Offline Model Runners](https://awesome-repositories.com/f/artificial-intelligence-ml/local-model-serving/offline-model-runners.md) — Runs agent workflows against locally hosted models entirely offline on the user's own hardware without sending data to external services. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))
- [Real-Time Tool Call Streams](https://awesome-repositories.com/f/artificial-intelligence-ml/mcp-tool-connectors/tool-call-executions/streaming-tool-call-handlers/real-time-tool-call-streams.md) — Exposes model thoughts and tool call requests through dedicated async streams so applications can watch or intercept them in real time. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))
- [Shared Room Agent Orchestration](https://awesome-repositories.com/f/artificial-intelligence-ml/multi-backend-agent-chat/shared-room-agent-orchestration.md) — Runs several agents in a single chat room, in synchronized rounds with parallel turns or asynchronously with reactive wake-ups. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/examples))
- [Multimodal Agent Capabilities](https://awesome-repositories.com/f/artificial-intelligence-ml/multimodal-agent-capabilities.md) — Passes images, videos, audio, and documents to the agent alongside text prompts using in-memory content objects or file paths with automatic type detection. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))

### Development Tools & Productivity

- [AI Agent Development Tools](https://awesome-repositories.com/f/development-tools-productivity/ai-agent-development-tools.md) — Builds asynchronous AI agents by wiring tools, hooks, and default policies behind one async session, so developers skip hand-writing the agentic loop. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Asynchronous Agent Task Triggers](https://awesome-repositories.com/f/development-tools-productivity/background-task-schedulers/asynchronous-agent-task-triggers.md) — Runs event triggers as long-lived background tasks that push messages into a live agent session so it can act without a user prompt.

### DevOps & Infrastructure

- [Runtime Event Interception](https://awesome-repositories.com/f/devops-infrastructure/agent-lifecycle-management/runtime-event-interception.md) — Runs custom code at set stages of agent execution so developers can observe, gate, or change behavior for logging, guardrails, and cleanup. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/hooks/README.md))
- [Event-Driven Triggers](https://awesome-repositories.com/f/devops-infrastructure/event-driven-triggers.md) — Runs background triggers on schedules or outside events that push messages into a live agent session so it acts without a user prompt. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/README.md))
- [Action Policy Enforcement](https://awesome-repositories.com/f/devops-infrastructure/infrastructure/configuration-policy-enforcement/action-policy-enforcement.md) — Checks each operation before it runs and returns an allow or deny decision, optionally rewriting tool arguments first. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/hooks/README.md))

### Security & Cryptography

- [Agent Action Policies](https://awesome-repositories.com/f/security-cryptography/identity-access-management/access-control/policy-enforcement-engines/action-resolution-policies/agent-action-policies.md) — Applies declarative allow, deny, and ask-user policies to agent tool calls, with a read-only default that can be widened to allow write tools. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))
- [Layered Tool Permission Gates](https://awesome-repositories.com/f/security-cryptography/layered-tool-permission-gates.md) — Checks each tool call against allow, deny, and ask-user rules before it runs, with exact names outranking wildcards and argument conditions.
- [Tool Access Controls](https://awesome-repositories.com/f/security-cryptography/domain-based-access-controls/domain-whitelists/username-whitelists/tool-access-controls.md) — Declares allow, deny, and ask-user rules for tool calls through simple builder functions, with exact tool names taking priority over wildcards. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/hooks/README.md))

### Software Engineering & Architecture

- [Middleware Lifecycle Hooks](https://awesome-repositories.com/f/software-engineering-architecture/middleware-lifecycle-hooks.md) — Stacks lifecycle hooks around sessions, turns, and operations like middleware, enabling logging, guardrails, rate limiting, and error recovery without touching agent logic.

### Business & Productivity Software

- [AI Agent Session Managers](https://awesome-repositories.com/f/business-productivity-software/team-collaboration-management/collaborative-chat-sessions/ai-agent-session-managers.md) — Manages the full agent session lifecycle behind one async context manager, including binary discovery, tool wiring, hook registration, and safe default policies. ([source](https://github.com/google-antigravity/antigravity-sdk-python#readme))

### Data & Databases

- [Conversation Step Streaming](https://awesome-repositories.com/f/data-databases/real-time-analytics/stream-analytics-processing/conversational-analytics-streams/conversation-step-streaming.md) — Yields agent steps, text tokens, thoughts, and tool calls through async iterators so interfaces can render output while the model is still generating.

### Networking & Communication

- [AI Prompt Sending APIs](https://awesome-repositories.com/f/networking-communication/messaging-api-integrations/chat-message-sending-apis/ai-prompt-sending-apis.md) — Sends text or multimodal prompts such as images and documents to an agent and returns the complete response once finished. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/conversation/README.md))
- [Token Streaming](https://awesome-repositories.com/f/networking-communication/real-time-event-streams/token-streaming.md) — Streams tokens, model thoughts, and tool calls as incremental chunks so interfaces can display output while the model is still generating. ([source](https://github.com/google-antigravity/antigravity-sdk-python/blob/main/google/antigravity/conversation/README.md))
