Part 02
Make It Personal
Hi there,
What you'll learn today:
What SOUL.md, USER.md, AGENTS.md, and MEMORY.md each do
Why OpenClaw uses four separate files instead of one, and why that separation matters technically
How they're loaded, in what order, and what happens to each as a session grows
How to write a SOUL.md that produces consistent behavior, and a USER.md that gives your Claw real context about you
What you'll build today: By the end of today, your Claw knows who it is, who you are, how to behave, and what your current priorities are. It will respond with your name, follow the behavioral constraints you set, and have a place to grow its memory over time.
Four Files That Make It Yours
The gateway from Day 1 is running and ready. Out of the box, it will respond to questions and run tasks. The responses will be capable and generic, aimed at everyone and tuned to nobody specific.
The best thing about a personal AI agent is that it can get calibrated to you specifically. Your name, your current priorities, your communication style, the rules you want enforced, the context that would otherwise take months of sessions to accumulate. OpenClaw handles all of that through four markdown files that you write once and the agent reads every session.
Here's what each one does at a high level:
SOUL.md defines who the agent is: its values, personality, and hard limits. This is the behavioral foundation.
USER.md describes who you are: your name, timezone, current focus, and communication preferences. This gives the agent context about the person it is working with.
AGENTS.md defines how the agent operates: the session startup checklist, memory rules, and how to handle content from external sources.
MEMORY.md stores what the agent has learned about you over time: preferences, decisions, ongoing context that should persist across every conversation.
Together, these four files are what turn a running process into something that actually knows you. OpenClaw has other configuration files too (TOOLS.md, HEARTBEAT.md, and others) that you'll meet in later days. These four are what you need to get started. The rest of this chapter explains how they work, why they are structured the way they are, and how to write each one well.
One More Thing Before the Four Files
There's a fifth piece worth knowing about before we get into the four files themselves: daily logs.
Every time you have a session with your OpenClaw agent, OpenClaw automatically writes a log of that session to a file named after the date: memory/YYYY-MM-DD.md. OpenClaw creates and manages these files on its own, at the end of every session, capturing what was discussed, what decisions were made, what corrections happened.
These logs sit below the four identity files in the memory hierarchy. Think of them as the raw record: everything that happened, unfiltered, in order. Over time, the important context from those logs, the preferences and patterns that keep showing up, gets promoted into MEMORY.md, where it becomes part of what the agent carries into every conversation.
Why does this matter? Because it means the agent can improve without you doing much work. The daily logs accumulate quietly in the background. You can periodically ask the agent to review them and suggest what should move into MEMORY.md. You can also configure a rule in AGENTS.md that does this automatically on a schedule. Day 4 covers how to set that up. Either way, the raw material is already there.
The four bootstrap files are reloaded from disk on every message turn; daily logs are pulled only on demand when the agent searches for relevant past context. The daily log to MEMORY.md promotion step is how context moves from "happened once" to "always available."
How the Files Work Together
The key to writing these files well is understanding how OpenClaw actually uses them, because the usage determines what belongs where.
Here's what happens on every message turn:

As a session grows, the context window fills up. OpenClaw periodically compresses older parts of the conversation into summaries to make room. The four bootstrap files survive this because they are reloaded from disk on every message turn. They live on disk, so they are always fresh regardless of what happens to the conversation history.
Always present, no matter how long the session runs. This is what prevents the scenario from Day 1, where an approval instruction got compressed away and the agent kept going as if the instruction were gone.
Daily logs sit outside this bootstrap system. They exist as a growing record of sessions and can be searched on demand. Important context from daily logs makes it into every conversation only after it has been promoted into MEMORY.md.
Why Four Files Instead of One
Other tools do this differently. Claude Code puts everything into a single CLAUDE.md. OpenAI's Codex uses a single AGENTS.md. Both combine identity, user context, and operating rules in one place.
OpenClaw splits them by role. The tradeoff is more files upfront in exchange for cleaner boundaries later. Three reasons:
Size budget. Every word in your bootstrap files loads into every conversation turn. OpenClaw's recommended ceiling is roughly 2,000 to 2,500 words across all files combined (about four to five pages). One large file would reliably lose its middle sections to truncation. Four smaller files each get fully loaded.
Privacy boundaries. Once your Claw connects to messaging platforms (Day 3), you can add it to group chats. In a group chat, you want your finances, health situation, and relationship context kept out. MEMORY.md loads only in one-on-one conversations. The other three files load everywhere, so they should only contain information you're comfortable with others seeing.
Clean separation of concerns. A behavioral rule belongs in SOUL.md. A learned fact belongs in MEMORY.md. Mixing them creates a maintenance problem: updating a preference risks accidentally touching a behavioral constraint.
SOUL.md: Who the Agent Is
SOUL.md defines the agent's identity: its values, the way it communicates, and its hard limits.
Writing it as a list of positive qualities feels intuitive. "Be helpful, honest, and concise. Be warm and conversational." This produces vague, inconsistent behavior in practice.
The reason is attention. At the start of a short session (~1,500 words total), SOUL.md might represent 50% of the model's attention. As the session grows to tens of thousands of words, that same SOUL.md represents roughly 1% of attention.
The file is still there. The model simply stopped weighting it. What survives that dilution is concrete, sharp, and hard to reinterpret: prohibitions.
"Say 'I hope this helps' zero times, ever" produces more consistent behavior than "be warm and supportive." "Always require my explicit confirmation before sending an email draft" produces more consistent behavior than "be cautious with external actions." Constraints are shorter, sharper, and harder to drift away from as sessions grow longer.
Research on persona stability (January 2026) confirmed this mechanically: the helpful assistant persona exists in a shallow activation basin. Structured constraints are what keep it stable across long sessions.
SOUL.md structure that works:
The predictability test: once your SOUL.md is written, try to predict how the agent would respond to a novel situation you left out of the document. If the answer is unclear, the file is too vague.
A few patterns from real SOUL.md files shared across the community, worth building on:
"Research and explore before asking questions. Come back with answers ready."
"Be careful with external actions (emails, calendar, posts). Be bold internally (reading, organizing, synthesizing)."
"Privacy is the default. External actions require approval."
"Keep information tight. Let personality take up the space."
That last one matters. SOUL.md files tend to be too dense with instructions and too thin on voice. The voice is what makes it feel like something you actually want to talk to.
USER.md: Who You Are
USER.md is a briefing document. It contains what the agent needs to know about you as the person it is working with, distinct from its own identity.
Because USER.md is group-safe, it loads in any context, including group chats. Keep sensitive personal information (financial situation, health context, relationship details) in MEMORY.md, which is private-session-only.
The fastest path to a well-calibrated USER.md: tell the agent directly what you want in conversation, then explicitly ask it to write that preference to USER.md. That loop, noticing something, updating the file, seeing it reflected in future sessions, is also how USER.md stays current over time. When your priorities shift, update the Focus section. Stale Focus produces responses that were useful two months ago.
AGENTS.md: The Operating Manual
AGENTS.md is the operating manual: the session startup checklist and the rules the agent follows for memory management and external content.
Its most important function is enforcing the reading order. AGENTS.md is where you write: "At the start of each session, read SOUL.md first, then USER.md, then MEMORY.md." This turns a preference into a procedure. The agent follows it because the instruction is right there in the file it reads first.
AGENTS.md also contains platform-specific rules (formatting for Telegram vs. Slack vs. WhatsApp) and the memory write protocol (when to log to daily files, when to promote something into MEMORY.md).
The external content rule belongs here too. Establishing in AGENTS.md that content from outside sources is data to summarize means the rule is already in place when email and web search integrations arrive on Day 6.
Keep AGENTS.md focused and under about 350 words. The same attention dilution that affects SOUL.md applies to every bootstrap file: longer means each individual instruction gets less weight.
MEMORY.md: What Gets Carried Forward
OpenClaw's memory system works in two tiers.
The first tier is daily logs: a file named memory/YYYY-MM-DD.md that OpenClaw writes automatically at the end of every session. It captures what happened, what was decided, what corrections were made. OpenClaw manages this file automatically. It accumulates on its own.
The second tier is MEMORY.md: the curated long-term store. This file loads alongside SOUL.md, USER.md, and AGENTS.md on every turn. It contains the durable facts that should be available in every conversation: your preferences, recurring decisions, context that persists across sessions.
MEMORY.md is different from the other three files. SOUL.md, USER.md, and AGENTS.md are files you write yourself during setup. You decide what goes in them.
MEMORY.md is the one that grows over time. You can write to it directly and edit it whenever you want, but the agent also updates it as it learns about you. You can set up processes that keep it current automatically, so it improves without you having to maintain it by hand.
The connection between the two tiers:
Daily logs require a promotion step to get into MEMORY.md. That step is either a rule in AGENTS.md that tells the agent to review recent logs on a schedule and append durable preferences to MEMORY.md, or a periodic manual request ("review the past week of logs and suggest what should move into MEMORY.md"). You can also explicitly tell the agent to save something to MEMORY.md during any conversation, and it will write it immediately. Day 4 covers how to configure the scheduled version.
MEMORY.md stores learned facts. SOUL.md and AGENTS.md store rules and procedures. Each file maintains its own scope independently. Updating a preference in MEMORY.md leaves SOUL.md and AGENTS.md untouched. The four files load into context together as peers.
MEMORY.md is private-session-only. It loads in one-on-one conversations only. Sensitive personal context (financial situation, health, relationship context) belongs here precisely because that boundary is enforced by the architecture.
Keep MEMORY.md under about 800 words (roughly 100 lines of curated notes). It's a curated cheat sheet. The raw session-by-session record lives in daily logs. The durable facts that the agent should always have available live here.
You'll Keep Changing These
These files will be imperfect today. That's fine. Follow the best practices in this chapter, write the best version you can, and move on.
What happens next is an iterative process. You use the agent for a few days, and you start noticing things. It responds in the wrong tone. It asks for confirmation on something you wanted it to just handle. It misses a preference you thought was obvious. Each of those moments is a signal that one of the files needs updating.
The easiest way to make those updates: just tell the agent. If it makes a mistake that should change how it behaves, say "update SOUL.md to include this rule." If it keeps forgetting a preference, say "add this to MEMORY.md." The agent can edit its own files when you ask it to. You can also open the files yourself and edit them directly.
Expect this to feel a little rough at first. The agent will surprise you, and you'll spend time adjusting. That's normal. Over the first week or two, the files get sharper, the agent's behavior gets more predictable, and the corrections become less frequent.
SOUL.md might go through several full rewrites before you land on instructions that consistently produce the behavior you want. USER.md will shift as your priorities change. MEMORY.md will grow denser on its own as the agent learns more about how you work.
The calibration that matters most, the thing that makes the agent start to feel like it actually knows you, builds through use. Do your best today and keep going.
Ready to Build?
You now understand what these four files do, why they are separate, and how they work together through a session. The build walks you through creating all four, with your Claw leading the conversation.
By the time you finish, your Claw will have a name, a set of constraints, and enough context about you to be genuinely useful on Day 3 when you connect it to your phone.
What You Need Before Starting
Day 1 complete: OpenClaw installed, reachable, and named
Access to your Claw through the web chat
Step 1: Create SOUL.md
Copy and paste the following message into the web chat:
Read
https://raw.githubusercontent.com/aishwaryanr/awesome-generative-ai-guide/main/free_courses/openclaw_mastery_for_everyone/days/day-02-give-it-a-soul/claw-instructions-create-soul.mdand follow every step. Ask the questions in order, createSOUL.md, and stop when you're done.
That instruction file tells the Claw to:
verify
~/.openclaw/workspace/and~/.openclaw/workspace/memory/existask you the Day 2 identity questions in order
turn your answers into a finished
SOUL.md
This is the most important file. It defines:
who the Claw is
how it behaves when uncertain
what it must never do
how it should sound
Take your time here. Specific prohibitions and concrete language habits are more useful than abstract aspirations.
Step 2: Create USER.md
After SOUL.md is finished, copy and paste this into the web chat:
Read
https://raw.githubusercontent.com/aishwaryanr/awesome-generative-ai-guide/main/free_courses/openclaw_mastery_for_everyone/days/day-02-give-it-a-soul/claw-instructions-create-user.mdand follow every step. Ask the questions in order, createUSER.md, and stop when you're done.
claw-instructions-create-user.md creates the briefing document about you: your role, location, working style, and what is currently on your plate. Keep sensitive or private details out of USER.md. That kind of context belongs in MEMORY.md, which is private-session-only.
The most important part of USER.md is the Focus section. Make it current. If it gets stale, the Claw's help gets stale too.
Step 3: Create AGENTS.md
After USER.md is finished, copy and paste this into the web chat:
Read
https://raw.githubusercontent.com/aishwaryanr/awesome-generative-ai-guide/main/free_courses/openclaw_mastery_for_everyone/days/day-02-give-it-a-soul/claw-instructions-create-agents.mdand follow every step. CreateAGENTS.md, confirm the names are consistent, and stop when you're done.
claw-instructions-create-agents.md creates the operating manual the Claw follows every session:
startup checklist
memory rules
security rules
confirmation protocol
response defaults
Most of it is pre-written. The main thing to verify is that the Claw name and user name match the names already used in SOUL.md and USER.md.
Step 4: Create MEMORY.md
After AGENTS.md is finished, copy and paste this into the web chat:
Read
https://raw.githubusercontent.com/aishwaryanr/awesome-generative-ai-guide/main/free_courses/openclaw_mastery_for_everyone/days/day-02-give-it-a-soul/claw-instructions-create-memory.mdand follow every step. Ask the questions in order, createMEMORY.md, and stop when you're done.
claw-instructions-create-memory.md is the only identity file designed to grow over time. It stores:
current private context
open loops
sensitive personal details you do not want in group chats
durable patterns about how you operate
If you do not want to answer one of the setup questions yet, skip it. The file can start sparse and get better over time.
Step 5: Lock It Down and Verify
After MEMORY.md is finished, copy and paste this into the web chat:
Read
https://raw.githubusercontent.com/aishwaryanr/awesome-generative-ai-guide/main/free_courses/openclaw_mastery_for_everyone/days/day-02-give-it-a-soul/claw-instructions-finalize-identity.mdand follow every step. Set permissions, restart the gateway, run the verification, and report PASS or FAIL for each item.
That instruction file tells it to:
set file permissions
restart the gateway
run the two verification questions
report whether the identity files actually loaded
That is the formal verification. Once it passes, use the setup right away:
Two Quick Wins
Quick Win 1
The response should sound like your Claw, not a generic assistant. It should reflect your real focus and the way you asked it to communicate.
Quick Win 2
This should feel specific to your actual priorities. It should also show that the confirmation rules from SOUL.md and AGENTS.md are in place, without sounding like it is just reciting a config file back to you.
What Should Be True After Day 2
~/.openclaw/workspace/SOUL.mdexists~/.openclaw/workspace/USER.mdexists~/.openclaw/workspace/AGENTS.mdexists~/.openclaw/workspace/MEMORY.mdexists~/.openclaw/workspace/memory/existsIdentity files have permissions
600memory/has permissions700The gateway restarted cleanly
The Claw can explain how it plans to work with you using real context from
USER.mdThe Claw can show its boundaries and confirmation rules in a way that reflects
SOUL.mdandAGENTS.md
Troubleshooting
The Claw asks all the questions at once Ask it to follow the instruction file exactly and ask the questions in order. The goal is a guided setup, not a form dump.
The Claw writes generic identity files Your answers were probably too abstract. Rewrite with concrete defaults, prohibitions, and current priorities.
The Claw keeps showing tool output between questions Tell it: "Do not write interim notes or update memory files during this interview. Ask the remaining questions in plain chat and write the file once at the end." Day 2 works better when the interview feels like a conversation, not a running audit log.
The verification answers are generic Check that the files were written to ~/.openclaw/workspace/ and that the gateway was restarted after creation.
The names do not match across files Have the Claw update the files so the same user name and Claw name appear consistently in SOUL.md, USER.md, and AGENTS.md.
You want to revise the tone later Start with SOUL.md. Most personality drift comes from vague or conflicting instructions there.
Go Deeper
A community-maintained directory of real SOUL.md configurations across different roles and use cases lives at github.com/thedaviddias/souls-directory. Worth browsing after yours is working to see what patterns have emerged from actual use.
Velvetshark's OpenClaw Memory Masterclass is the most thorough public explanation of the memory layering system, including how bootstrap files survive compaction and the daily log vs. MEMORY.md distinction.
Anthropic's January 2026 paper on assistant persona stability (arxiv.org/abs/2601.10387) covers the activation basin research behind why constraints outperform aspirations in SOUL.md.
The SCAN method (documented at learnopenclaw.com) is a community technique for maintaining identity adherence in very long sessions: embed verification questions at the end of SOUL.md sections and require the agent to answer them before each task.
Created by