Files
openclaw/docs/zh-CN/cli/agents.md
Josh Palmer 5676a6b38d Docs: normalize zh-CN terminology + tone
What: switch to 你/你的 tone; standardize Skills/Gateway网关/local loopback/私信 wording
Why: align zh-CN docs with issue 6995 feedback + idiomatic tech style
Tests: pnpm docs:build
2026-02-02 16:38:25 +01:00

83 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
read_when:
- 你需要多个隔离的智能体(工作区 + 路由 + 认证)
summary: "`openclaw agents` 的 CLI 参考(列出/添加/删除/设置身份)"
title: agents
x-i18n:
generated_at: "2026-02-01T19:58:38Z"
model: claude-opus-4-5
provider: pi
source_hash: 30556d81636a9ad8972573cc6b498e620fd266e1dfb16eef3f61096ea62f9896
source_path: cli/agents.md
workflow: 14
---
# `openclaw agents`
管理隔离的智能体(工作区 + 认证 + 路由)。
相关内容:
- 多智能体路由:[多智能体路由](/concepts/multi-agent)
- 智能体工作区:[智能体工作区](/concepts/agent-workspace)
## 示例
```bash
openclaw agents list
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
openclaw agents set-identity --agent main --avatar avatars/openclaw.png
openclaw agents delete work
```
## 身份文件
每个智能体工作区可以在工作区根目录包含一个 `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` 加载:
```bash
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
```
显式覆盖字段:
```bash
openclaw agents set-identity --agent main --name "OpenClaw" --emoji "🦞" --avatar avatars/openclaw.png
```
配置示例:
```json5
{
agents: {
list: [
{
id: "main",
identity: {
name: "OpenClaw",
theme: "space lobster",
emoji: "🦞",
avatar: "avatars/openclaw.png",
},
},
],
},
}
```