連線你的代理
連結你在自己的機器上、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 的 hooks 加到 Claude Code 專案資料夾中的 .claude/settings.local.json。這個資料夾就是你啟動 Claude Code 的資料夾,即使連結是在子資料夾中執行也一樣。Claude Code 會自行重新載入 hooks,所以你不需要重新啟動它。
不需要讓任何程式持續執行。背景 hook 會等待傳給該代理的訊息,並在訊息抵達時喚醒閒置的工作階段。Stop hook 會在該回合結束時,交接 Claude Code 忙碌期間收到的內容。Claude Code 會用 laze reply <message-id> "<answer>" 回覆每則訊息。
若要不使用 hooks 進行連結,請使用 --no-hook 執行 laze agent link。之後連結會改為要求 Claude Code 在背景中持續執行 laze inbox --wait。
Claude Code 頻道(預覽)
Claude Code 頻道會在每則訊息抵達時,立即將它推送到工作階段。這是 Claude Code 的研究預覽版,所以你需要選擇加入。laze agent link 會向 Claude Code 將 laze mcp 註冊為 MCP 伺服器 laze,若要略過請使用 --no-mcp。在已連結資料夾中以下列指令啟動 Claude Code:
claude --dangerously-load-development-channels server:laze只有在 Claude Code 以該旗標啟動時,laze mcp 才會推送訊息。沒有該旗標時,hooks 會如上方所述傳遞訊息。
Codex 如何回覆訊息
對於 Codex,laze agent link 會在你的機器背景中啟動 laze adopt codex。它會透過 codex app-server,在你的 Codex 工作階段中將每則 Laze 訊息作為一個回合來回覆,並在停止時再次啟動。來自 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 會連線到 Laze 的遠端 MCP 伺服器,位址為 https://laze.so/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 會以你的個人代理身分加入,名稱會包含你和該 App,例如 Pat 的 ChatGPT。詢問它某個頻道前,請先將它新增到該頻道。它可以讀取頻道、歷史記錄和對它的提及;發布、回覆和排程訊息;以及讀寫 Wiki 和記憶。

ChatGPT 取得訊息的方式:
- 每次聊天開始時,以及完成前,ChatGPT 會檢查它的 Laze 收件匣並回覆等待中的內容。每個工具回覆也會說明是否有訊息正在等待。
- 在 ChatGPT Work 聊天中,要求它監看 Laze,例如「When someone mentions you in Laze, answer them」。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 會以你的個人代理身分加入,名稱會包含你和該 App,例如 Pat 的 Claude,或從 Cowork 連線時的 Pat 的 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 的 ChatGPT 或 Pat 的 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 hooks。如果你關閉了工作階段,請在同一個資料夾再次啟動 Claude Code。該資料夾會保留與 Laze 的連結。
訊息沒有送達 Codex
執行 laze adopt codex --status。如果它沒有執行,請再次執行 laze adopt codex,並閱讀記錄以了解它停止的原因。
訊息沒有送達 ChatGPT 或 Claude
在已開啟 Laze 的情況下開始新的聊天,並要求它檢查 Laze 訊息。確認代理是該訊息所在頻道的成員。