1# Agent Extensions
2
3[Agent Client Protocol](https://agentclientprotocol.com/) servers can be exposed as extensions for use in the [agent panel](../ai/agent-panel.md).
4
5## Defining Agent Extensions
6
7A given extension may provide one or more agent servers.
8Each agent server must be registered in the `extension.toml`:
9
10```toml
11[agent_servers.my-acp-server]
12# Required, this shows up in the Zed UI when the user selects an agent server
13name = "My ACP Server"
14# Optional, SVG icon path relative to the extension's root directory. This will be displayed next to the agent name.
15icon = "./path/to/icon.svg"
16
17# A series of target specifications for automatically downloading and maintaining your agent binary.
18# The target format is "{os}-{arch}" where:
19# - os: "darwin" (macOS), "linux", "windows"
20# - arch: "aarch64" (arm64), "x86_64"
21[agent_servers.opencode.targets.darwin-aarch64]
22# The URL to download the agent binary from. We support `zip` and `tar.gz` compression formats automatically.
23# If this agent is distributed via npm, use `npm view {package_name} dist.tarball` to get the URL.
24archive = "https://github.com/org/repository/releases/latest/download/agent-darwin-arm64.zip"
25# The command to run the agent binary, relative to the extracted binary directory.
26# If your agent is run with node, use `node` as the command and Zed will automatically substitute it with a recent node runtime.
27cmd = "node"
28# The arguments to pass to the above command.
29args = ["./my-agent.mjs", "--acp"]
30# Optional SHA-256 hash of the archive for verification.
31# If not provided and the URL is a GitHub release, we'll attempt to fetch and verify it from GitHub.
32sha256 = "12345678deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
33```
34
35Unlike other Zed extensions, there is no WASM component to Agent Extensions.
36
37See the [OpenCode agent extension](https://github.com/sst/opencode-zed-extension) for an example of how these extensions work.
38
39## Available Extensions
40
41Check out all the ACP servers that have already been exposed as extensions [on Zed's site](https://zed.dev/extensions?filter=agent-servers).
42
43We recommend taking a look at their repositories as a way to understand how they are generally created and structured.
44
45## Testing
46
47To test your new Agent Client Protocol server extension, you can [install it as a dev extension](./developing-extensions.md#developing-an-extension-locally).
48
49## Publishing and distributing
50
51See the ["Publishing your extension"](./developing-extensions.md#publishing-your-extension) section.