Skip to content

hicder/agy-acp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agy-acp

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.

How It Works

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

Prerequisites

  • Rust (1.70+) with Cargo
  • agy installed and in your PATH — install from google-antigravity/antigravity-cli releases
  • Authentication — either set GEMINI_API_KEY or configure auth via ~/.gemini/antigravity-cli/settings.json

Build & Install

cargo build --release

The binary is at target/release/agy-acp. Copy it somewhere in your PATH:

cp target/release/agy-acp /usr/local/bin/

Use with Zed

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.

Model Selection

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.

Passing Extra Arguments

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"
      }
    }
  }
}

Environment Variables

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

Session Persistence

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).

Debugging

To inspect the JSON-RPC messages between Zed and agy-acp, run dev: open acp logs from Zed's Command Palette.

License

MIT

About

Fork from https://github.com/openabdev/openab/tree/main/agy-acp with additional fixes

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages