antigravity-sdk-python  by google-antigravity

Python SDK for building secure, scalable AI agents

Created 3 weeks ago

New!

759 stars

Top 45.3% on SourcePulse

GitHubView on GitHub
Project Summary

The Google Antigravity SDK is a Python library designed for developers building AI agents powered by Antigravity and Gemini. It offers a secure, scalable, and stateful infrastructure layer that abstracts the complexities of the agentic loop, enabling users to concentrate on agent functionality rather than operational overhead. The SDK aims to simplify the development and deployment of sophisticated AI agents.

How It Works

The SDK employs a three-layer architecture: a high-level "Simplified" entry point (Agent), a stateful "Session" layer (Conversation) for managing history and convenience methods, and a flexible "Adapter" layer (ConnectionStrategy) for transport and backend abstraction. It abstracts the agentic loop, handling binary discovery, tool wiring, hook registration, and policy defaults. The system supports real-time streaming of agent output, internal model reasoning, and tool call events, providing granular control and a fluid user experience.

Quick Start & Requirements

  • Primary install: pip install google-antigravity
  • Prerequisites: Requires a GEMINI_API_KEY environment variable.
  • Important Note: The SDK relies on a compiled runtime binary. Installation must be done via PyPI (pip install google-antigravity) to obtain this binary; cloning the repository alone is insufficient.
  • Examples: Runnable examples are provided in the examples/ directory.

Highlighted Details

  • Multimodal Ingestion: Supports rich multimedia attachments (images, videos, audio, documents) directly via content classes or filesystem paths.
  • Custom Tools: Allows registration of Python functions as tools that the agent can invoke.
  • MCP Integration: Enables connection to external Model Context Protocol (MCP) servers to expose their tools.
  • Hooks and Policies: Features a declarative policy system for controlling agent behavior, including allowing, denying, or prompting for tool execution.
  • Triggers: Supports running background tasks that react to external events and push messages into the agent.

Maintenance & Community

No specific details regarding contributors, sponsorships, or community channels (like Discord/Slack) were found in the provided README.

Licensing & Compatibility

The project is licensed under the Apache License 2.0. This license is generally permissive and compatible with commercial use and closed-source linking.

Limitations & Caveats

Cloning the repository directly is insufficient for running the SDK; users must install the package from PyPI to acquire the necessary compiled runtime binary.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
15
Star History
785 stars in the last 24 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Jack Lukic Jack Lukic(Author of Semantic UI), and
5 more.

ag2 by ag2ai

0.8%
5k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 1 year ago
Updated 1 day ago
Feedback? Help us improve.