openclaw agents

管理隔離的 agent(工作區 + 驗證 + 路由)。

相關資源:

範例

openclaw agents list
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents bindings
openclaw agents bind --agent work --bind telegram:ops
openclaw agents unbind --agent work --bind telegram:ops
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
openclaw agents set-identity --agent main --avatar avatars/openclaw.png
openclaw agents delete work

路由綁定

使用路由綁定將入站頻道流量釘選至特定 agent。

列出綁定:

openclaw agents bindings
openclaw agents bindings --agent work
openclaw agents bindings --json

新增綁定:

openclaw agents bind --agent work --bind telegram:ops --bind discord:guild-a

省略 accountId--bind <channel>)時,OpenClaw 會在可用的情況下從頻道預設值和外掛程式設定 hook 中自動解析。

綁定範圍行為

  • 不含 accountId 的綁定僅匹配頻道預設帳號。
  • accountId: "*" 是頻道級的後備(所有帳號),其優先順序低於明確的帳號綁定。
  • 如果同一 agent 已有匹配的不含 accountId 頻道綁定,之後你以明確或已解析的 accountId 進行綁定時,OpenClaw 會就地升級既有綁定,而非新增重複項目。

範例:

# 初始僅頻道綁定
openclaw agents bind --agent work --bind telegram

# 之後升級為帳號範圍綁定
openclaw agents bind --agent work --bind telegram:ops

升級後,該綁定的路由範圍限定為 telegram:ops。如果你也需要預設帳號路由,需明確新增(例如 --bind telegram:default)。

移除綁定:

openclaw agents unbind --agent work --bind telegram:ops
openclaw agents unbind --agent work --all

身分檔案

每個 agent 工作區的根目錄可以包含一個 IDENTITY.md

  • 範例路徑:~/.openclaw/workspace/IDENTITY.md
  • set-identity --from-identity 會從工作區根目錄讀取(或從明確指定的 --identity-file

頭像路徑以工作區根目錄為基準解析。

設定身分

set-identity 會將欄位寫入 agents.list[].identity

  • name
  • theme
  • emoji
  • avatar(工作區相對路徑、http(s) URL 或 data URI)

IDENTITY.md 載入:

openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity

明確覆蓋欄位:

openclaw agents set-identity --agent main --name "OpenClaw" --emoji "🦞" --avatar avatars/openclaw.png

設定範例:

{
  agents: {
    list: [
      {
        id: "main",
        identity: {
          name: "OpenClaw",
          theme: "space lobster",
          emoji: "🦞",
          avatar: "avatars/openclaw.png",
        },
      },
    ],
  },
}