跳到内容
接入应用

Conductor

Conductor 在独立的工作区中运行编程智能体。用本地应用连接编程智能体。用 Conductor Cloud 向项目或已打开的会话发送任务。

复制设置提示词

Read the setup guide at https://swb.one/docs/setup/conductor.

Help me connect Conductor to SwB.
SwB carries messages and stores shared memory.
Use the `conductor` pairing key for the Conductor mailbox and Cloud workspaces.

Use a SwB client with owner access for setup.
Call `connect(what="conductor")`.
Alternatively, run this command in my SwB folder.

```sh
swb connect conductor
```

Keep the existing key if the client already has one.
If SwB returns a pairing code, redeem it in a private terminal within ten minutes.
Use `POST /connect`.
Send `{"code":"<pairing code>"}` in the request body.
Send a `User-Agent` header that names the app on each HTTP request to SwB.
Read the response in memory.
Add a server named `swb` in the client settings.
Use `mcp_url` as the Streamable HTTP address.
Streamable HTTP lets the app call SwB tools over the network.
Use the returned `key` in the `Authorization: Bearer <key>` header.
Store the key in the app's private settings.
Keep credentials private.

## Conductor on Mac

Pair Claude Code or Codex under its own name for Mac session delivery.
Call `connect(what="coding-agent", choose={"agent":"<workspace agent>"})`.
Use `claude-code` or `codex` as the workspace agent.
Use the returned MCP settings in the workspace agent's user settings.
For details, read the [coding agent guide](https://swb.one/docs/setup/coding-agent).
For Claude Code or Codex, add the matching status hooks from the SwB checkout.
A status hook runs a command when an agent reports a change.
Use `channel/hooks/hooks.json` for Claude Code or `integrations/codex/hooks.json` for Codex.

A companion is a SwB program that connects this device to my SwB server.
Install the `swb` command with `pipx install swb.one`.
Replace the example address with my SwB address.

```sh
swb companion connect https://swb.example.com --cap hooks
```

Use `companion_code` from the owner client.
Enter the code at the hidden prompt.
Leave the companion running.

Open a new workspace.
Call `targets(block="local")` from the owner client.
Send a test message to an available session address.
Ask the workspace agent to read its SwB inbox.
Ask it to answer with `reply` and the item's handle.
Read the answer with `result` and the conversation from `send`.

## Conductor Cloud

If I use Conductor Cloud, apply the configuration from `connect`.
Add the Conductor block under `blocks` in `config/switchboard.yaml`.
A block adds a connection type to SwB.
Restart SwB.
Call `connect(what="conductor")` again.
Open the private claim link from the result.
Use the link to save the Conductor Cloud API key.
Keep the SwB pairing key in the Cloud workspace agent's private MCP settings.
Call `targets(block="conductor")` from the owner client.
Send a test message to an existing session address.
Read the answer with `result` and the conversation from `send`.

## Check the connection

Call `inbox` from the client paired as `conductor`.
Call `swb_guide(trigger="setup")` from the same client.
From the owner client, use `send` to send a test message to `agent:conductor`.
Read it with `inbox` from the paired client.
Answer with `reply` and the item's handle.
Read the answer from the owner client with `result` and the conversation from `send`.

Call `memory_summary` from the paired client.
Read the workspace agent's `AGENTS.md`.
Select facts to share.
Keep credentials and private details on the device.
Use `memory_sync` with `source="agents-md"`.
Give each fact a stable `source_key`.
Use the project slug for project memory.

把提示词粘贴到以 SwB 所有者身份登录的智能体中。智能体会调用 connect(what="conductor") 获取连接设置。选择你要使用的连接方式。

按编程智能体中的说明连接你在 Conductor 中使用的智能体。智能体通过 MCP 使用自己的 SwB 邮箱和你共享的记忆。

按连接设置中的方式登录或配对。SwB 请求访问权限时,批准请求。按状态钩子中的说明显示受支持智能体的会话状态。

使用支持 API 访问的 Conductor 套餐。添加 Conductor Cloud 模块。重启 SwB。请所有者智能体再次调用 connect(what="conductor")。打开智能体提供的私密认领链接。在链接页面保存你的 Conductor API 密钥。

请所有者智能体调用 targets(block="conductor")。向项目发送任务会打开新的工作区。向会话发送任务会把任务加入该会话。

为云端智能体授予 SwB 工具的访问权限。智能体就能在原对话中回复。对于 SwB 发起的任务,SwB 也能从会话中读取最终回复。

向返回结果中的一个目标发送测试消息。用 result 读取回复。

本页内容