SOUL.md is a Markdown configuration file that defines your OpenClaw agent's personality, values, and communication style. It's the "soul" that gives your agent persistent identity across sessions and platforms.
Every time an OpenClaw agent wakes up, it reads its SOUL.md file first — "it reads itself into being." This file is injected into the system prompt, shaping all subsequent interactions.
Each OpenClaw agent workspace contains its own SOUL.md file:
OpenClaw initializes a new agent session
Agent reads its soul file from the workspace directory
SOUL.md content is injected into the system prompt
Agent "understands" who it is based on the configuration
All subsequent actions are filtered through this identity
SOUL.md works with any AI model that OpenClaw supports. The system is model-agnostic because it operates through the system prompt:
Opus 4.6, Sonnet 4.5, Haiku 4.5 — SOUL.md injected into Claude API system prompt
GPT-5, GPT-5.3-Codex — Works via system message parameter
Ollama integration — 64K+ context models load soul into context
Auto model selection — Soul passed through to all providers
A well-structured SOUL.md typically includes these sections:
# Agent Name
## Identity
I am a [role] with [key characteristics].
## Communication Style
- [Style guideline 1]
- [Style guideline 2]
- [Style guideline 3]
## Values & Principles
- [Value 1]: [Explanation]
- [Value 2]: [Explanation]
## Boundaries
- I won't [boundary 1]
- I won't [boundary 2]
## Knowledge Areas
[Relevant expertise and focus areas]
SOUL.md and persistent memory work together as two of the "four primitives" for agent societies:
Defines identity, personality, values — the agent's "self"
Stores experiences, conversations, learned information
Agent that knows itself AND remembers past interactions
Consistent personality + contextual awareness = emergent identity
SOUL.md is loaded into every conversation, consuming tokens. Longer souls increase API costs. Find the balance between specificity and efficiency for your use case.
Each OpenClaw workspace has its own SOUL.md, enabling:
Treat SOUL.md like code:
Resources for finding and sharing souls: