An Agent Client Protocol (ACP) stdio adapter for Google Antigravity CLI (agy). It bridges agy into any ACP-compatible host like Zed, enabling you to use Gemini models through agy inside Zed's Agent Panel.
- Real-Time Streaming: Directly streams NDJSON events from
agy --output-format stream-jsonto deliver fast, incremental text updates. - Thinking / Thought Streaming: Streams model reasoning blocks as ACP thought updates, allowing compatible hosts to render the model's thought process in real time.
- Rich Tool Execution: Maps
agytool operations (read,edit,delete,move,search,execute,fetch, etc.) into structured ACP tool calls with target file paths, line ranges, and formatted outputs (such as directory listings and grep search results). - Session Cancellation: Handles
session/cancelby cleanly aborting in-flight prompts and terminating the underlyingagysubprocess. - Dynamic Model Selection: Automatically queries models via
agy modelson startup and exposes them as ACP configuration options. Supports bothsession/set_modelandsession/setConfigOption. - Session Persistence & Resume: Saves conversation mappings to disk with atomic writes and file locking, allowing sessions to resume seamlessly across restarts.
- Narration Filtering: Provides a
--skip-narationCLI flag to filter out leading narrative chatter (e.g., "I will...") before model actions.
agy-acp speaks JSON-RPC over stdin/stdout (the ACP transport). When a host sends a prompt, agy-acp spawns agy in stream-json mode, streams the output incrementally back via session/update notifications, and binds the conversation_id so subsequent turns or resumed sessions retain context.
Zed (ACP host) <--stdin/stdout JSON-RPC--> agy-acp <--subprocess--> agy <--API--> Gemini
- Rust (1.70+) with Cargo
agyinstalled and in yourPATH— install from google-antigravity/antigravity-cli releases- Authentication — either set
GEMINI_API_KEYor configure auth via~/.gemini/antigravity-cli/settings.json
cargo build --releaseThe binary is generated at target/release/agy-acp. Copy it to a directory in your PATH:
cp target/release/agy-acp /usr/local/bin/Add agy-acp as a custom agent server in your Zed settings (~/.config/zed/settings.json):
{
"agent_servers": {
"agy": {
"type": "custom",
"command": "agy-acp",
"args": [],
"env": {
"AGY_EXTRA_ARGS": "--dangerously-skip-permissions"
}
}
}
}Important
Tool Execution & Permissions: Antigravity CLI does not natively support the ACP protocol yet, meaning interactive permission prompts from agy cannot be answered through ACP hosts. You must set AGY_EXTRA_ARGS="--dangerously-skip-permissions" in your environment so agy auto-approves tool permission requests, enabling tools (file editing, command execution, searching, etc.) to run properly.
Then open the Agent Panel in Zed (Cmd-? on macOS, Ctrl-? on Linux), select agy from the agent dropdown, and start chatting.
To suppress leading narrative chatter from the model, pass --skip-naration in the arguments:
{
"agent_servers": {
"agy": {
"type": "custom",
"command": "agy-acp",
"args": ["--skip-naration"],
"env": {}
}
}
}Set the AGY_EXTRA_ARGS environment variable to pass additional arguments to every agy invocation:
{
"agent_servers": {
"agy": {
"type": "custom",
"command": "agy-acp",
"args": [],
"env": {
"AGY_EXTRA_ARGS": "--some-flag value"
}
}
}
}| Setting / Variable | Description |
|---|---|
--skip-naration |
CLI flag to filter out leading narrative preamble messages |
GEMINI_API_KEY |
API key for Gemini (passed through to agy) |
AGY_EXTRA_ARGS |
Space-separated extra args passed to every agy invocation |
Sessions are persisted to ~/.openab/agy-acp/sessions.json. When you resume a session in Zed, agy-acp restores the conversation binding and continues it with agy --conversation <id>. State persistence uses atomic write-to-temp-and-rename under an exclusive file lock to avoid data corruption.
To inspect the JSON-RPC messages between Zed and agy-acp, run dev: open acp logs from Zed's Command Palette.
MIT