Skip to main content

openclaw agents

管理隔離的 Agent(包含工作區、認證與路由)。 相關資訊:

指令範例

# 列出目前的 Agent
openclaw agents list

# 新增一個名為 work 的 Agent 並指定其工作區路徑
openclaw agents add work --workspace ~/.openclaw/workspace-work

# 從工作區目錄的描述檔讀取並設定身分
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity

# 手動設定特定 Agent 的名稱、Emoji 與頭像
openclaw agents set-identity --agent main --name "小助" --emoji "🦞" --avatar avatars/openclaw.png

# 刪除特定的 Agent
openclaw agents delete work

身分識別檔案 (Identity files)

每個 Agent 的工作區根目錄可以包含一個 IDENTITY.md 檔案:
  • 預設路徑:~/.openclaw/workspace/IDENTITY.md
  • set-identity --from-identity:從工作區根目錄(或指定的 --identity-file)讀取資訊。
頭像路徑將相對於工作區根目錄進行解析。

設定身分 (Set identity)

set-identity 指令會將欄位寫入配置檔案的 agents.list[].identity 中:
  • name:顯示名稱。
  • theme:主題描述。
  • emoji:代表表情符號。
  • avatar:頭像(支援工作區相對路徑、http(s) 網址或 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: "太空龍蝦",
          emoji: "🦞",
          avatar: "avatars/openclaw.png",
        },
      },
    ],
  },
}