Skip to main content

4. Your Agent's Brain

Action Step

Complete this before moving on.

Ask your OpenClaw agent "What do you know about me?" and review what it returns from USER.md. Correct anything that's wrong or add something it's missing about your role.

Comment in Slack

Post your answer in your onboarding channel.

How is your agent's memory system (SOUL.md, USER.md, daily notes) similar to what you learned about CLAUDE.md and MEMORY.md in Claude Code?


Training Guide

You just learned HOW your agent works. Now let's look at what makes it... it.

The Three Files That Define Your Agent

Your agent's entire personality, knowledge, and memory lives in plain text files on the server. You've seen this pattern before — CLAUDE.md in Claude Code, MEMORY.md for auto-memory. Same idea, different files.

SOUL.md — The Personality File

This is WHO your agent is — its tone, style, rules, boundaries. Think of CLAUDE.md from Claude Code. SOUL.md is the same concept — instructions the agent follows every conversation.

Examples of what goes in SOUL.md:

  • "You are a professional assistant for a LeanScale team member"
  • "Always respond concisely — no fluff"
  • "Never delete files without asking first"
  • "When asked about project status, check Teamwork first"

You can customize this — tell your agent to change its personality by asking it to update its SOUL.md. This is where you make it yours.

USER.md — What It Knows About You

Grows automatically as you interact. Stores your preferences, habits, context about your work. Remember auto-memory in Claude Code? Same thing. The more you use it, the more it learns about how you work.

Examples: "User prefers bullet points," "User works with BrightLoop on Salesforce optimization," "User's manager is Rachel"

You can ask your agent: "What do you know about me?" — it'll reference USER.md. You can also tell it to forget things or update incorrect information.

MEMORY.md + Daily Notes — The Long-Term Notebook

Every day, your agent writes notes to memory/YYYY-MM-DD.md — a log of what happened, what was discussed, what decisions were made. Over time, it curates the most important stuff into MEMORY.md.

This is why your agent can reference a conversation from two weeks ago — it wrote it down. Remember handoff documents? Your agent is doing that automatically. Every day, it writes its own handoff doc.

The difference from Claude Code:

  • Claude Code: you manually create handoff docs before clearing
  • OpenClaw: it writes daily notes automatically + saves before compaction
  • Same pattern, one is manual, one is automatic

But it's not magic — the 200k token window is still the limit per conversation. Memory files are just how it works around that limit.

The Honest Tradeoff

Automatic memory is convenient — but it has a cost. Every time your agent starts a conversation, it loads SOUL.md + USER.md + recent memory. That eats into your 200k token budget before you even say anything.

Remember lazy loading vs eager loading? Claude Code is lazy — you choose what to load. OpenClaw is eager — it loads everything upfront. Convenient, but less efficient.

If your MEMORY.md gets huge, it takes more tokens just to start a conversation. This is why the tech team prunes memory periodically — same reason you'd clean out a filing cabinet.