> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Client Protocol

> 通过 ACP 在 Devin Desktop 的 Agent Command Center 中运行第三方 Agent。

<Note>
  ACP Agent 可供 Pro、Max 和 Teams 用户使用。Enterprise admins 如需启用第三方 Agent，应联系其账户团队。
</Note>

Devin Desktop 支持在 [Agent Command Center](/zh/desktop/agent-command-center) 中运行第三方 Agent。为此，我们使用 [Agent Client Protocol (ACP)](https://agentclientprotocol.com/)。

ACP 是一种开放协议，用于标准化代码编辑器与代码 Agent 之间的通信，类似于 Language Server Protocol (LSP) 对语言服务器集成的标准化。任何实现了 ACP 的 Agent 都可以接入 Devin Desktop，而 Devin Desktop 也可以与任何兼容 ACP 的 Agent 通信。

<Note>
  使用外部 ACP Agent 时，所有 Agent 操作都会交给该 Agent。Devin Desktop 的隐私政策和法律条款不适用，计费也由你与第三方 Agent 提供方直接结算。
</Note>

<div id="example-agents">
  ## 示例 Agent
</div>

任何支持 ACP 的 Agent 都可以在 Devin Desktop 中运行。你可以接入的一些热门 ACP 兼容 Agent 包括：

* [Codex CLI](https://github.com/openai/codex) — OpenAI 的代码 Agent
* [Claude Agent](https://www.anthropic.com/claude-code) — Anthropic 的代码 Agent
* [OpenCode](https://opencode.ai) — 开源代码 Agent
* [Junie](https://www.jetbrains.com/junie/) — JetBrains 的代码 Agent
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) — Google 的代码 Agent

除了这类第三方 Agent 之外，你还可以使用 ACP 将 [自定义 Agent](/zh/desktop/acp-custom) 集成到 Devin Desktop 中。

<div id="enabling-custom-agents">
  ## 启用自定义 Agent
</div>

将 Agent 添加到你的[本地](#local-registry-config)或[团队](#team-registry-config)注册表后，即可在 `Devin Settings` 中启用：

1. 使用 `Cmd+Shift+P` (macOS) 或 `Ctrl+Shift+P` (Windows/Linux) 打开命令面板
2. 打开 `Devin User Settings`
3. 点击“Agents”选项卡
4. 打开你想使用的 ACP Agent 开关
5. 重启 Devin Desktop

启用后，在开始*新*对话时，该 Agent 会出现在 Devin Desktop 右下角的 Agent 选择器中，与 [Cascade](/zh/desktop/cascade/cascade) 和 [Devin Local](/zh/desktop/devin-local) 等内置 Agent 一起显示。

<div id="local-registry-config">
  ## 本地注册表配置
</div>

各个用户都可以通过编辑本地注册表文件来配置自己的 ACP Agent：

* **Devin Desktop:** `~/.windsurf/acp/registry.json`
* **Devin Desktop Next:** `~/.windsurf-next/acp/registry.json`

你也可以运行 `Open Local ACP Registry Config`，直接从命令面板打开该文件。

该文件遵循 [ACP 注册表规范](https://agentclientprotocol.com/get-started/registry)。

<div id="sample-config-for-devin-local">
  ### Devin Local 的示例配置
</div>

如果你想在本机上试用 [Devin Local](/zh/desktop/devin-local)，但不想为整个团队启用它，可以配置一个指向 Devin CLI 的本地注册表。

这里假设 `devin` CLI 已经安装，并且已加入你的 `PATH`。Devin Desktop 会通过 `devin acp` 启动它。

```json theme={null}
{
  "version": "1.0.0",
  "agents": [
    {
      "id": "devin-cli",
      "name": "Devin Local",
      "version": "1.0.0",
      "description": "Devin AI coding agent via Devin CLI",
      "authors": [
        "Cognition AI"
      ],
      "license": "proprietary",
      "distribution": {
        "binary": {
          "darwin-aarch64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          },
          "darwin-x86_64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          },
          "linux-aarch64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          },
          "linux-x86_64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          },
          "windows-aarch64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          },
          "windows-x86_64": {
            "archive": "",
            "cmd": "devin",
            "args": [
              "acp"
            ]
          }
        }
      }
    }
  ],
  "extensions": []
}
```

<div id="team-registry-configuration">
  ## 团队注册表配置
</div>

团队管理员可以通过 [Devin Settings](https://windsurf.com/team/settings) 中的“ACP Registry Config”设置，向团队下发自定义 ACP 配置。

这样，你就可以维护一个静态的、已批准的 ACP Agent 注册表，供团队所有成员使用，而无需每位用户单独配置。

<Note>
  出于安全考虑，Devin Desktop 目前不会直接从注册表下载 Agent 分发包。Agent 二进制文件应已安装在用户的机器上——注册表配置会告诉 Devin Desktop 如何启动它。下方示例中的 `distribution.binary.<platform>.archive` URL 是 ACP 注册表 schema 的一部分，用于兼容更广泛的生态，但 Devin Desktop 目前不会拉取这些内容。
</Note>

<div id="sample-config-for-opencode">
  ### OpenCode 示例配置
</div>

```json theme={null}
{
  "version": "1.0.0",
  "agents": [
    {
      "id": "opencode",
      "name": "OpenCode",
      "version": "1.15.7",
      "description": "The open source coding agent",
      "repository": "https://github.com/anomalyco/opencode",
      "website": "https://opencode.ai",
      "authors": [
        "Anomaly"
      ],
      "license": "MIT",
      "icon": "https://cdn.agentclientprotocol.com/registry/v1/latest/opencode.svg",
      "distribution": {
        "binary": {
          "darwin-aarch64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-darwin-arm64.zip",
            "cmd": "./opencode",
            "args": [
              "acp"
            ]
          },
          "darwin-x86_64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-darwin-x64.zip",
            "cmd": "./opencode",
            "args": [
              "acp"
            ]
          },
          "linux-aarch64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-linux-arm64.tar.gz",
            "cmd": "./opencode",
            "args": [
              "acp"
            ]
          },
          "linux-x86_64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-linux-x64.tar.gz",
            "cmd": "./opencode",
            "args": [
              "acp"
            ]
          },
          "windows-aarch64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-windows-arm64.zip",
            "cmd": "./opencode.exe",
            "args": [
              "acp"
            ]
          },
          "windows-x86_64": {
            "archive": "https://github.com/anomalyco/opencode/releases/download/v1.15.7/opencode-windows-x64.zip",
            "cmd": "./opencode.exe",
            "args": [
              "acp"
            ]
          }
        }
      }
    }
  ],
  "extensions": []
}
```

<div id="troubleshooting">
  ## 故障排查
</div>

<div id="my-existing-agent-setup-isnt-working">
  ### 我现有的 Agent 设置无法正常工作
</div>

第三方 Agent 的大部分设置会从各自的配置文件中读取，但身份验证通常需要单独处理。具体来说，你通常需要：

* 在 Agent 中通过 `/login` 斜杠命令进行身份验证。
* 在 Devin User Settings 的 Agents 选项卡中，使用“...”按钮配置环境变量。
* 在你的 `settings.json` 文件中，通过 `devin.acp.agentEnv.<agentName>` 设置环境变量。
