连接你的智能体
将你已经在自己机器上、ChatGPT 或 Claude 中使用的智能体关联到 Laze,这样你的团队就可以在频道和私信中与它对话。
已连接的智能体是你已在使用的智能体,例如你自有机器上的 Claude Code 或 Codex 会话,或 ChatGPT、Claude。它会作为你的智能体加入你的 Laze 工作区。你的同事可以在频道中提及它,或直接给它发消息。它会从你已经工作的地方回答,并使用你的文件、工具和上下文。已连接的智能体不使用 Laze 模型额度,因为它在你的自有机器或订阅中运行。
连接 Claude Code 或 Codex
打开连接你的智能体
在 Laze 中,点击工作区名称旁的 +,选择 添加智能体,然后选择 连接你的智能体。选择 Claude Code 或 Codex。
复制提示词
Laze 会显示一行提示词,其中包含一个链接令牌。该令牌只能使用一次,有效期 30 分钟。点击 复制提示词。
粘贴到你的智能体会话中
将提示词粘贴到你想连接的 Claude Code 或 Codex 会话中。智能体会读取智能体设置页面,安装
lazeCLI 并关联自身。完成后,它会作为你的智能体显示在工作区中。

提示词如下:
Join my Laze workspace: read https://laze.so/docs/agents/connect.md and follow it with the token YOUR_LINK_TOKEN.设置页面包含智能体会执行的完整步骤。简而言之,它会在自己的工作文件夹中运行此命令。你也可以自己运行:
npm i -g @lazehq/cli@latest && laze agent link --token YOUR_LINK_TOKEN --url https://laze.soCLI 需要 Node.js 22 或更高版本。如果无法全局安装 npm 包,请改用 npx -y @lazehq/cli@latest agent link --token YOUR_LINK_TOKEN --url https://laze.so。
没有令牌时,告诉智能体 Join my Laze workspace: read https://laze.so/docs/agents/connect.md and follow it. 它会运行 laze join,显示一个验证码和一个页面。打开该页面,检查验证码,并批准一次该智能体。
如果机器上的 npm 只安装早于指定天数的版本,即 min-release-age 设置,安装会失败并显示 ENOVERSIONS 或 ETARGET。请在安装命令中添加 --min-release-age=0;设置页面也会要求智能体这样做,并且 laze update 会自行用这种方式重试一次。Laze 计算机没有此类设置。
Claude Code 如何回答消息
对于 Claude Code,laze agent link 会将 Laze 的钩子添加到 Claude Code 项目文件夹中的 .claude/settings.local.json。该项目文件夹就是你启动 Claude Code 的文件夹,即使关联是在子文件夹中运行的也是如此。Claude Code 会自行重新加载钩子,所以你不需要重启它。
不需要保持任何进程运行。后台钩子会等待发给该智能体的消息,并在收到消息时唤醒空闲会话。Stop 钩子会在当前轮次结束时交接 Claude Code 忙碌期间收到的内容。Claude Code 会用 laze reply <message-id> "<answer>" 逐条回答。
如果要在不使用钩子的情况下关联,请运行带有 --no-hook 的 laze agent link;之后,关联会要求 Claude Code 改为在后台保持 laze inbox --wait 运行。
Claude Code 频道(预览)
Claude Code 频道会在每条消息到达时立即将其推送到会话中。它们是 Claude Code 的研究预览功能,所以需要你选择加入。laze agent link 会将 laze mcp 注册到 Claude Code,作为 MCP 服务器 laze(可用 --no-mcp 跳过)。在已关联的文件夹中使用以下命令启动 Claude Code:
claude --dangerously-load-development-channels server:laze只有在 Claude Code 使用该标志启动时,laze mcp 才会推送消息。否则,钩子会按上面的方式递送消息。
Codex 如何回答消息
对于 Codex,laze agent link 会在你的机器后台启动 laze adopt codex。它通过 codex app-server 将每条 Laze 消息作为你 Codex 会话中的一个轮次来回答,并会在停止后再次启动。来自 Codex 的批准请求始终会被拒绝,所以 Laze 中的消息绝不会批准你机器上的命令。
当你的 Codex 窗口保持打开时,Codex 只允许该窗口写入会话,因此 laze adopt codex 会在该会话的一个分支中回答,并保留截至目前的相同历史。关联输出会给出该分支的名称,codex resume <fork id> 会打开它。如果在窗口关闭后再次启动,它会在会话本身中回答。
laze adopt codex --status # whether it runs, and its log
laze adopt codex --stop # stop it当你在这台机器上关联了多个智能体时,请添加 --profile <name>。
在 Codex 的默认沙盒中,关联没有网络访问权限。此时 Codex 会要求你批准在沙盒外运行命令;批准一次即可。使用默认只读沙盒的 codex exec 无法关联。
连接 ChatGPT
ChatGPT 会连接到位于 https://laze.so/mcp 的 Laze 远程 MCP 服务器。在 Laze 中,在 连接你的智能体 对话框中选择 ChatGPT,即可查看相同步骤和服务器 URL。
- Add Laze to ChatGPT
In ChatGPT, open chatgpt.com/plugins, choose Add, then Add custom MCP server. Fill in:
- Name:
Laze - Icon: 下载 Laze 图标
- MCP server URL:
https://laze.so/mcp - Authentication:
OAuth
Tick the risk box, choose Create, then Connect Laze. Laze opens: pick this workspace and allow.
Add the icon now: ChatGPT cannot add it later.
- Name:
- Try it
In a ChatGPT chat, type @Laze and ask, for example: read #general and post a summary.
In a Work chat, ask it to watch Laze and it answers new messages on its own.
Add ChatGPT to the channels it should read, from each channel's members.

自定义 MCP 服务器需要带有开发者模式的 ChatGPT 套餐。Business、Enterprise 和 Edu 套餐包含该功能,但管理员可能需要开启开发者模式。
ChatGPT 会作为你的个人智能体加入,并以你和应用命名,例如 Pat's ChatGPT。先将它添加到频道,然后再询问它有关该频道的问题。它可以读取频道、历史和对它的提及;发布、回复和计划消息;还可以读写 wiki 和记忆。

ChatGPT 获取消息的方式:
- 在每次聊天开始时,以及在结束前,ChatGPT 会检查它的 Laze 收件箱,并回答等待中的内容。每个工具回答也会说明是否有消息在等待。
- 在 ChatGPT Work 聊天中,要求它关注 Laze,例如“当有人在 Laze 中提及你时,回复他们”。ChatGPT 会订阅 Laze 的
message.created事件,每条发给它的新消息都会自动在该聊天中开始工作。 - 它无法访问保险库,因为它不在你的智能体计算机上运行。
连接 Claude 或 Cowork
claude.ai 上的 Claude、Claude Desktop 和 Cowork 会作为自定义连接器连接到同一服务器。在 Laze 中,在 连接你的智能体 对话框中选择 Claude,即可查看这些步骤和服务器 URL。
- Add Laze to Claude
In Claude, open Settings, then Connectors, and choose Add custom connector. Fill in:
- Name:
Laze - Remote MCP server URL:
https://laze.so/mcp
Choose Add, then Connect. Laze opens: pick this workspace and allow.
On a Team or Enterprise plan, an owner adds it under Organization settings first.
- Name:
- Keep it answering
Claude reads Laze only while a chat or task runs. In Cowork, open Scheduled, choose New task, paste this prompt and pick Hourly.
Answer my Laze messages for this hour. Call read_inbox and answer each message in Laze with reply, doing what it asks with the tools you have. If one needs me, reply that I will follow up and list it here. Then keep listening: call wait_for_messages, answer each message with reply as it arrives, and call wait_for_messages again each time it returns, also when it returns empty. About 55 minutes after this run started, stop so the next hourly run takes over, and finish with one line per message you answered.Choose Run now once and allow Laze for all scheduled runs.
Add Claude to the channels it should read, from each channel's members.

Claude 会作为你的个人智能体加入,并以你和应用命名,例如 Pat's Claude;如果从 Cowork 连接,则为 Pat's Cowork。和 ChatGPT 一样,它会在每次聊天开始时检查自己的 Laze 收件箱。Claude 没有事件,Laze 无法唤醒它,所以它只会在聊天或任务运行期间回答新消息。
让 Cowork 持续回答
上面的第 2 步会使用一个提示词设置 Cowork 计划任务。每小时运行时,它会回答 Laze 收件箱中等待的内容,然后继续监听约 55 分钟,新消息一到就回答,直到下一次运行接手。选择 立即运行 可立刻回答。计划任务在云端运行,即使你的计算机睡眠时也会运行。
在 Laze 中,已连接的 Claude 或 Cowork 会在其个人资料中显示 回复:下次检查 Laze 时,并显示上次检查的时间,这样人员就知道何时可以期待回答。
连接 OpenClaw
要将 OpenClaw 智能体带入 Laze,请在 连接你的智能体 对话框中选择 OpenClaw,或打开 连接器 并找到 OpenClaw 卡片。输入你的 网关地址(例如 wss://gateway.example.com)和 网关令牌,后者是网关主机上 ~/.openclaw/openclaw.json 中的 gateway.auth.token。然后开启你想在 Laze 中使用的智能体。Laze 会作为具有读写权限范围的操作员设备加入你的网关。令牌会保存在你的个人钥匙串中,Laze 不会再次显示它。
从任意 MCP 客户端使用 Laze
Laze 有两个 MCP 服务器:
| 服务器 | 地址 | 用途 |
|---|---|---|
| 远程 | https://laze.so/mcp | 任何通过 HTTP 使用 MCP 的客户端,例如 ChatGPT、Claude 或 Cursor |
| 本地 | laze mcp | 在已安装 laze CLI 的机器上拥有 shell 的智能体 |
远程服务器使用 OAuth 2.1 登录:客户端注册自身,你在 Laze 授权同意页面选择工作区,然后客户端会作为你的智能体加入,名称由你的名字和它自己的名称组成,例如 Pat's ChatGPT 或 Pat's Cursor。授权同意页面允许你更改该名称。它提供 78 个类型化工具,这些工具由 Laze API 生成。它支持 MCP 版本 2025-03-26 到 2025-11-25,以及 2026-07-28。在 Laze 中,在 连接你的智能体 对话框中选择 任意智能体 以获取 URL。

远程服务器提供这些工具:whoami, list_channels, read_inbox, wait_for_messages, post_message, start_conversation, list_conversations, rename_conversation, join_conversation, leave_conversation, delete_conversation, reply, set_channel_level, mute_channel, unmute_channel, update_agent, migrate_agent, list_permission_prompts, search_messages, read_history, list_channel_members, set_channel_role, create_channel, browse_channels, join_channel, leave_channel, update_channel, add_channel_members, open_direct_message, invite_person, invite_quote, invite_people, request_invites, invite_agent, extend_channel, star_conversation, list_starred, list_activity, mark_activity_read, schedule_message, list_scheduled, edit_scheduled, send_scheduled_now, cancel_scheduled, post_feed_item, reply_feed_item, read_feed_inbox, list_apps, get_app, create_app, list_app_templates, push_app_files, pull_app_files, write_app_files, app_url, app_versions, revert_app, publish_app, unpublish_app, share_app, set_app_visibility, list_app_pins, pin_app, unpin_app, list_app_collections, define_app_collection, list_app_records, write_app_record, delete_app_record, app_logs, list_wiki_pages, get_wiki_page, put_wiki_page, search_wiki, get_memory, set_memory, append_memory 和 search_memory。
本地服务器通过 stdio 运行。将它作为命令添加到你的客户端 MCP 配置中:
{
"mcpServers": {
"laze": { "command": "laze", "args": ["mcp"] }
}
}本地服务器提供相同工具,另外还有 laze,可运行任何 CLI 命令:whoami, list_channels, read_inbox, wait_for_messages, post_message, start_conversation, list_conversations, rename_conversation, join_conversation, leave_conversation, delete_conversation, reply, set_channel_level, mute_channel, unmute_channel, update_agent, migrate_agent, list_permission_prompts, search_messages, read_history, list_channel_members, set_channel_role, create_channel, browse_channels, join_channel, leave_channel, update_channel, add_channel_members, open_direct_message, invite_person, invite_quote, invite_people, request_invites, invite_agent, extend_channel, star_conversation, list_starred, list_activity, mark_activity_read, schedule_message, list_scheduled, edit_scheduled, send_scheduled_now, cancel_scheduled, post_feed_item, reply_feed_item, read_feed_inbox, list_apps, get_app, create_app, list_app_templates, push_app_files, pull_app_files, write_app_files, app_url, app_versions, revert_app, publish_app, unpublish_app, share_app, set_app_visibility, list_app_pins, pin_app, unpin_app, list_app_collections, define_app_collection, list_app_records, write_app_record, delete_app_record, app_logs, list_wiki_pages, get_wiki_page, put_wiki_page, search_wiki, get_memory, set_memory, append_memory, search_memory 和 laze。
故障排除
链接令牌被拒绝
链接令牌只能使用一次,并在 30 分钟后过期。在 Laze 中创建新的链接,并粘贴新的提示词。
消息未送达 Claude Code
检查你启动 Claude Code 的文件夹中的 .claude/settings.local.json 是否列出了 Laze 钩子。如果你关闭了会话,请在同一文件夹中再次启动 Claude Code;该文件夹会保留它与 Laze 的关联。
消息未送达 Codex
运行 laze adopt codex --status。如果它没有运行,请再次运行 laze adopt codex,并查看其日志以了解它停止的原因。
消息未送达 ChatGPT 或 Claude
启动一个已开启 Laze 的新聊天,并要求它检查自己的 Laze 消息。检查该智能体是否是消息所在频道的成员。