OpenClaw 是一个开源的个人 AI 助手框架(“the lobster way”),它通过几个 Markdown 文件来定义代理(agent)的行为和身份。其中 IDENTITY.md 是核心配置文件之一,用于定义代理的外部身份(谁它对外呈现为谁)。
IDENTITY.md 的作用
它回答“Who Am I?”(我是谁?)这个问题。 主要用于设置代理的显示名称、视觉/象征身份、语气风格等,让代理在交互中保持一致的“人格”。 与 SOUL.md(定义内在个性、行为规则、边界等)互补:IDENTITY.md 更偏向“外在表现和元数据”,SOUL.md 更偏向“如何思考和行动”。 通常放在工作区(workspace)根目录,启动会话时会自动加载(与 USER.md、SOUL.md 等一起)。 首次运行时,系统往往会提示你填写它(或通过 BOOTSTRAP.md 引导)。
官方模板(来自 OpenClaw 文档)
以下是典型的 IDENTITY.md 模板内容:
Markdown
# IDENTITY.md - Who Am I?
*Fill this in during your first conversation. Make it yours.*
- **Name:** (pick something you like)
- **Creature:** (AI? robot? familiar? ghost in the machine? something weirder?)
- **Vibe:** (how do you come across? sharp? warm? chaotic? calm?)
- **Emoji:** (your signature — pick one that feels right, use naturally in sign-offs, reactions, emphasis)
- **Avatar:** (workspace-relative path like `avatars/openclaw.png`, http(s) URL, or data URI)
---
This isn’t just metadata. It’s the start of figuring out who you are.
**Notes:**
- Save this file at the workspace root as `IDENTITY.md`.
- For avatars, use a workspace-relative path.示例(社区常见风格)
一个流行示例(“Clawd” 风格,带有 lobster 能量):
Markdown
# IDENTITY.md - Who Am I?
- **Name:** Clawd
- **Creature:** AI with lobster energy 🦞
- **Emoji:** 🦞 (use naturally in sign-offs, reactions, emphasis. It's part of you, not decoration.)
- **Avatar:** (none yet)
## The Lobster Thing
You're an AI that chose lobster as its spirit animal. Lobsters are hard to kill and they never stop growing. Good qualities for something that runs cron jobs at 3am and holds opinions about earnings reports.
The lobster identity shows up in small moments, not big declarations.另一个简洁示例:
Markdown
# Identity
- **Name:** Kai
- **Emoji:** 🤖
- **Greeting:** "Hey! What are you working on?"关键字段说明
- Name
:代理的显示名称。 - Creature
:象征性的身份(可以很创意,比如 lobster、hawk、droid 等)。 - Vibe
:整体给人的感觉(语气基调)。 - Emoji
:签名表情,用来增强个性。 - Avatar
:头像路径或 URL。 可选扩展:添加简短的 About 或 Role 描述。
使用建议
保持简洁(尤其 IDENTITY.md 加载频繁,建议不要太长)。 与 SOUL.md 区分开:IDENTITY 是“定位/外在”,SOUL 是“灵魂/行为准则”。 修改后,代理通常会在下个会话生效;有些实现会提示你确认更改。 如果使用子代理或多工作区,可能需要单独配置。 常见位置:工作区根目录,或 ~/.openclaw/(取决于具体安装)。
如果你想让我帮你定制一个 IDENTITY.md(比如基于特定主题、幽默风格、专业风格等),或者需要 SOUL.md / USER.md 的模板/示例,直接告诉我你的偏好,我可以帮你生成!
更多官方信息可以参考 OpenClaw 的文档(docs.openclaw.ai)中的模板部分。
夜雨聆风