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.
agy-acp speaks JSON-RPC over stdin/stdout (the ACP transport). When a host like Zed sends a prompt, agy-acp spawns agy as a subprocess, streams the response back as incremental session/update notifications, and persists session state across restarts so you can resume conversations.
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 at target/release/agy-acp. Copy it somewhere 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": {}
}
}
}Then open the Agent Panel in Zed (Cmd-? on macOS, Ctrl-? on Linux), select agy from the agent dropdown, and start chatting.
agy-acp queries available models by running agy models at startup. You can switch models from Zed's model selector in the agent thread — the adapter exposes them as ACP config options.
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"
}
}
}
}| Variable | Description |
|---|---|
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 replays the message history from agy's SQLite conversation databases (~/.gemini/antigravity-cli/conversations/*.db).
To inspect the JSON-RPC messages between Zed and agy-acp, run dev: open acp logs from Zed's Command Palette.
MIT