antigravity-sdk-python
antigravity-sdk-python copied to clipboard
A Python library for building AI agents that leverage the full power of Google Antigravity.
## Environment - `google-antigravity` SDK v0.1.3 - Python 3.14 - macOS ## Problem The SDK supports automatic context compaction via `CapabilitiesConfig.compaction_threshold`, but there is no way to trigger compaction on-demand...
## Summary The Go harness only writes trajectory files during its shutdown sequence (`agent.Close()` triggered by WebSocket close). There is no API to flush or checkpoint the trajectory mid-session. If...
`define_subagent` exposes permission flags (`enable_mcp_tools`, `enable_write_tools`, `enable_subagent_tools`) but they are not enforced at runtime. Subagents always inherit the parent's full MCP toolset regardless of flags, and write tools are always...
Calling `agent.chat()` concurrently on the same `Agent` instance produces three failure modes depending on timing: a `RuntimeError` crash, garbled responses, or silent data loss. None of these are documented. ##...
A subagent defined with `enable_write_tools=true` via `define_subagent` cannot write files — the `edit_file` / `write_to_file` calls are denied with "permission denied." The parent agent's `policies=[policy.allow_all()]` does not propagate to subagent...
## Environment - `google-antigravity` SDK v0.1.3 - Python 3.14 - macOS ## Problem The MCP protocol defines `ToolAnnotations` on tool definitions ([spec](https://modelcontextprotocol.io/specification/2025-03-26/server/tools#tool-annotations)): ```python class ToolAnnotations: title: str | None readOnlyHint:...
## Environment - `google-antigravity` SDK v0.1.3 - Python 3.14 - macOS ## Description `McpStdioServer` has no `env` field, but the underlying proto (`McpStdioTransport`) has an `env` map field (field number...
## Environment - **SDK version**: latest - - **Python version**: managed via Homebrew (e.g., `brew install python`) - - - **OS / platform**: macOS (Apple Silicon / x86_64) - -...
## Problem The Antigravity SDK provides `UsageMetadata` for observing token consumption after the fact, but no mechanisms to **limit** it. When building CI automation (e.g., PR review agents, CI summary...
The SDK surfaces `usage_metadata` on every `ChatResponse` — `prompt_token_count`, `candidates_token_count`, `thinking_token_count`, `total_token_count`. The hook system gives us `AfterModelHook` to inspect and `BeforeModelHook` to gate. `SessionContext.state` persists across turns. All the...