Skip to main content

bub-acp-server

Expose Bub as an Agent Client Protocol agent.

What It Provides

  • Bub plugin entry point: acp-server
  • CLI command registered on Bub: bub acp
  • Standalone console script: bub-acp-server
  • ACP agent methods for initialize, session/new, session/load, session/resume, session/list, session/close, and session/prompt
  • Streaming ACP session/update events from Bub stream events
  • ACP client-backed replacements for Bub's bash, fs.read, fs.write, and fs.edit tools while the ACP server is running

Installation

uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-acp-server"

Or from a Bub project:

bub install bub-acp-server@main

Usage

Configure an ACP-compatible client to launch one of:

bub acp

The previous bub acp serve form remains accepted temporarily and prints a deprecation warning. Other positional arguments are rejected.

or:

bub-acp-server

The process speaks ACP over stdio. Prompts are sent through Bub's hook pipeline with stream output enabled, so model chunks and tool events can be displayed by the ACP client as they arrive.

At the end of every turn, the agent sends an ACP usage_update. Missing token usage is reported as 0. If the model provider does not report its context-window size, set BUB_ACP_SERVER_CONTEXT_WINDOW_SIZE; the default is 128000 tokens.

Bub keeps using its own configuration, tools, skills, and tapes. The ACP client starts the process and displays the session; it does not replace Bub's model setup.

ACP session metadata is stored under Bub home as acp-sessions.json so compatible clients can list sessions again after restarting. Keep BUB_HOME stable if you want the same ACP thread list across editor launches.

bub-acp-server supports both ACP session load and resume. session/load restores the matching Bub history through the same ACP streaming path used by live turns. session/resume attaches the editor back to the Bub session without replaying history, so later turns keep streaming through Bub's normal hook pipeline.

Use In Zed

Zed supports external terminal agents through ACP. Custom agents are configured in Zed's settings.json under agent_servers.

Prerequisites:

  • bub is installed and available to Zed.
  • bub-acp-server is installed in the Bub environment:
bub install bub-acp-server@main

Open Zed's settings with the zed: open settings command and add a custom agent server:

{
  "agent_servers": {
    "Bub": {
      "type": "custom",
      "command": "bub",
      "args": ["acp"],
      "env": {}
    }
  }
}

If Zed cannot find bub, use the absolute path printed by command -v bub:

{
  "agent_servers": {
    "Bub": {
      "type": "custom",
      "command": "/absolute/path/to/bub",
      "args": ["acp"],
      "env": {}
    }
  }
}

After saving the settings, open Zed's agent panel with cmd-? on macOS or ctrl-? on Linux/Windows, then start a new thread and select Bub.

Useful Zed commands while testing:

  • dev: open acp logs shows the JSON-RPC traffic between Zed and Bub.
  • zed: open settings opens settings.json.

Notes:

  • Zed launches Bub as a separate ACP process. Bub reads its own local configuration and credentials directly.
  • Use env only for settings your Bub installation actually needs.
  • If your Bub configuration is loaded from a project .env, use a wrapper command that loads that file before running bub acp.

References:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bub_acp_server-0.0.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bub_acp_server-0.0.1-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file bub_acp_server-0.0.1.tar.gz.

File metadata

  • Download URL: bub_acp_server-0.0.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bub_acp_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2aed9527ecece6d69dbb733556ba1e2b8ed99cd17a2716db3fc6f29bdc5d6ca5
MD5 8a8e8abd137ffbd015615c4ef14c762f
BLAKE2b-256 acd266afd4d98013cbb9340e18e356911f5c1ada635562a2560c6054e13015a9

See more details on using hashes here.

File details

Details for the file bub_acp_server-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bub_acp_server-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bub_acp_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca3ad46462c321e949db3d8a2bdc58cb488bddbed6cc7c575ea46449f44b5416
MD5 83f8b524f08bf7196511ca900afaee7c
BLAKE2b-256 5311356d821674d3229dd8bc0b73ac2b7b75019a7e3f5b349cba0ee2a17203b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page