OpenClaw agents are shaped by a set of bootstrap files that define their persona, knowledge, and behavior. SOUL.md is the primary file that defines who the agent is -- its personality, tone, boundaries, and core instructions. IDENTITY.md provides factual information about the agent itself, and USER.md stores knowledge about the user. Together with AGENTS.md and other bootstrap files, they form the system prompt architecture that makes each agent unique and consistent.
Master openclaw soul.md & agent persona
Take the Personalizing Your OpenClaw Agent course with hands-on lessons and challenges.
This SOUL.md creates a focused, professional coding assistant. The personality section controls tone. Boundaries define hard limits the agent will never cross. Code style preferences ensure consistent recommendations. Every conversation this agent has will be informed by these instructions.
IDENTITY.md gives the agent factual answers to self-referential questions. When a user asks 'what can you do?', the agent references this file. Listing limitations explicitly prevents the agent from overpromising capabilities it does not have.
USER.md personalizes the agent's responses. Instead of generic advice, the agent knows Sarah uses TypeScript with Next.js and can tailor its suggestions accordingly. This avoids repetitive 'what stack are you using?' questions at the start of every conversation.
This is the complete workspace layout for an agent. Bootstrap files in the workspace directory are loaded in order and compose the system prompt. Sessions store conversation history. Auth holds authentication profiles for tools that need credentials. Optional files like BOOT.md and TOOLS.md add specialized startup behavior and custom tool definitions.
The order matters. SOUL.md comes first because persona instructions should take precedence in the model's attention. MEMORY.md comes last because it changes most frequently. The openclaw agent prompt command lets you preview the fully assembled system prompt for debugging.
Writing a SOUL.md that is too long and detailed, causing the system prompt to consume most of the token budget and leaving little room for conversation
Keep SOUL.md focused and concise. Aim for 200-500 words. Every instruction should be essential. If you find yourself writing paragraphs of edge cases, simplify. The model follows clear, short instructions better than long documents.
Defining boundaries that are too vague, like 'be helpful' or 'be safe', instead of specific actionable rules
Write concrete boundaries: 'Never execute rm -rf without explicit user confirmation' is actionable. 'Be safe with commands' is vague and unreliable. Models follow specific instructions more consistently than abstract guidelines.
Putting user-specific context in SOUL.md instead of USER.md, making the agent hard to share or repurpose for different users
SOUL.md defines the agent's universal persona. USER.md holds per-user context. This separation lets you share the same SOUL.md across multiple agent instances while customizing USER.md for each user.
Never updating SOUL.md after initial creation, even when the agent consistently misbehaves in certain scenarios
SOUL.md is a living document. Monitor agent conversations, identify patterns of unwanted behavior, and update the persona file iteratively. The best agents are refined over weeks of observation.
OpenClaw agents are defined by bootstrap files: SOUL.md (persona and boundaries), IDENTITY.md (self-knowledge), USER.md (user context), AGENTS.md (tool instructions), and MEMORY.md (persistent knowledge). These files compose the system prompt in a defined order, with SOUL.md taking precedence. Keep SOUL.md concise with specific, actionable instructions. Separate persona from user context. Iterate on your persona based on real conversations. Version-control all bootstrap files.
Interactive lessons and challenges on Stanza, practice in VS Code, Cursor, or the web.
Interactive lessons and challenges, right in your code editor.
Check the free courses. No credit card.