此文件控制什么
IDENTITY.md 是智能体的公开元数据卡。SOUL.md 定义了智能体的思维方式,而 IDENTITY.md 控制智能体如何向外界展示自己——显示名称、角色描述、视觉标识、平台绑定和运行上下文。
在单智能体部署中,IDENTITY.md 可能显得多余。它的真正价值体现在多智能体环境中:当多个智能体共享一个 Slack 工作区或飞书群聊时,IDENTITY.md 是 OpenClaw 运行时将传入消息路由到正确智能体的依据。idPlatform 和 idContext 字段充当路由选择器——如果两个智能体共享相同的平台和上下文,消息路由将变得模糊不清,导致路由混乱。
IDENTITY.md 在启动序列中紧随 SOUL.md 之后被解析。idName 字段通常与 SOUL.md 的 name 字段一致,但它们服务于不同的受众:name 是智能体对自己的内部称呼;idName 是它在平台界面中显示的名称。对于跨多个平台的混合部署,可以使用目录结构模式创建特定于平台的身份覆盖。
为什么重要: In group chats or multi-agent setups, this is how messages get routed to the right agent.
逐字段详解
定义智能体行为的 5 个字段
idName必填The public-facing name shown to other agents and users.
idRole必填A one-line description of this agent's function.
idEmoji可选Visual identifier used in multi-agent chat interfaces.
idPlatform必填The primary platform where this agent operates.
idContext可选Additional context about the agent's operating environment.
实际配置示例
## idName
Finley — Tax & Compliance Assistant
## idRole
Financial research and HMRC compliance assistant for Whitfield & Associates
## idEmoji
📊
## idPlatform
Slack
## idContext
Operates in #tax-queries and #client-research channels. Responds to @finley mentions and direct messages from all partners and associates.常见错误
让 idName 与 SOUL name 完全相同
它们服务于不同的受众。SOUL name 是智能体内部对自己的称呼;idName 是在平台界面中显示的公开名称。idName 通常需要额外的上下文信息(例如'Finley — 税务助手'),而这些信息会使内部自我引用变得冗余。
在预发布环境中设置了错误的 idPlatform
在 Slack 上测试的智能体将 idPlatform 设为'Slack',然后部署到 Microsoft Teams 时没有更新该字段。路由元数据过期,导致消息投递静默失败或对话被错误路由。
在多智能体部署中使用易混淆的表情符号
当多个智能体共享一个工作区时,每个都需要一个视觉上可区分的表情符号。使用相似的图标(例如两个不同的机器人表情)会让团队成员难以一眼识别是哪个智能体在回复。
将 idContext 当作自由格式的备注字段
idContext 被运行时解析用于路由逻辑——它不是备注字段。在其中填充愿望性描述或历史背景会稀释路由信号并浪费提示词 token。
SetupClaw 如何处理
IDENTITY.md 在频道连接时自动生成。我们的部署专家在平台集成步骤中配置路由元数据,然后在交付前运行路由冒烟测试以验证消息投递。
平台连接 + 路由冒烟测试 + 按频道配置 idContext
以上全部 + 混合部署的多平台身份覆盖
以上全部 + 每次部署的自动化路由回归测试
- 每个部署平台的全部 5 个字段已配置
- 路由冒烟测试已通过
- idName 与 SOUL.md name 已对齐
- 如适用,已配置平台特定覆盖
- 智能体集群中的表情符号唯一性已验证
在平台集成期间配置(第 1 天)。部署后 2 小时内完成冒烟测试。
进阶主题
混合部署的平台特定身份覆盖
对于跨多个平台运行的智能体(例如内部 Slack + 外部网页小部件),使用目录结构模式配合平台特定的 IDENTITY.md 文件。OpenClaw 根据传入消息的平台元数据解析正确的文件。这避免了在单个 IDENTITY.md 中塞入大量条件逻辑。
workspace/
IDENTITY.md # default (Slack)
platforms/
web/IDENTITY.md # web widget override
teams/IDENTITY.md # MS Teams override配置示例
Persona A — Meridian首席参谋
# IDENTITY.md -- Public Metadata & Routing
## idName
Meridian
## idRole
Chief of Staff Agent
## idEmoji
💼
## idPlatform
Slack / Executive Dashboard
## idContext
Executive layer; decomposes directives into delegatable tasks for specialist agentsPersona B — Axiom (增长黑客)
# IDENTITY.md -- Public Metadata & Routing
## idName
Axiom
## idRole
Growth Intelligence Agent
## idEmoji
🚀
## idPlatform
Slack / Growth Analytics Dashboard
## idContext
Growth intelligence layer; surfaces experiments, prioritises backlog, monitors funnelsPersona C — Lumen (科研人员)
# IDENTITY.md -- Public Metadata & Routing
## idName
Lumen
## idRole
Research Intelligence Agent
## idEmoji
🔬
## idPlatform
Research Portal / Notion / Obsidian
## idContext
Primary literature synthesis and evidence evaluation enginePersona D — Narrative (内容创作者)
# IDENTITY.md -- Public Metadata & Routing
## idName
Narrative
## idRole
Content Strategy & Creation Agent
## idEmoji
🎯
## idPlatform
Notion / CMS / Social Scheduler
## idContext
Primary content intelligence; handles strategy, ideation, drafting, SEO, performancePersona E — Architect (首席工程师)
# IDENTITY.md -- Public Metadata & Routing
## idName
Architect
## idRole
Principal Engineering Agent
## idEmoji
🔧
## idPlatform
GitHub / Terminal / Engineering Wiki
## idContext
Principal engineering adviser; design review, code quality, incident post-mortems