OpenClaw Memory & Personality: Make Your Agent Actually Useful
SOUL.md, AGENTS.md, USER.md, MEMORY.md — these workspace files are the difference between a generic chatbot and an AI agent that actually knows your business. Here's how to write them well.
Most OpenClaw bots are useless. Not because the tech is bad — because the workspace files are empty.
You spin up a container, connect Telegram, send a message, and get a response that sounds like every other AI chatbot. "Hello! I'm an AI assistant. How can I help you today?" Useless.
The difference between a chatbot and an agent is the workspace. These are the files that give your bot a personality, knowledge, boundaries, and memory. Here's how each one works and how to write them well.
The workspace files
OpenClaw reads several Markdown files from your agent's workspace directory:
| File | Purpose | Analogy |
|---|---|---|
SOUL.md | Core personality and identity | The agent's DNA |
AGENTS.md | Specific instructions and capabilities | The job description |
USER.md | Information about who it's talking to | The contact book |
MEMORY.md | Persistent facts it has learned | The notebook |
IDENTITY.md | Name, avatar, metadata | The business card |
You don't need all of them. But the more you invest in these files, the better your agent performs.
SOUL.md — The most important file
This is the core of your agent. It defines WHO the bot is — personality, tone, values, and boundaries. Everything the agent says flows through this file.
Bad SOUL.md (generic, useless)
You are a helpful AI assistant. Be friendly and professional.
Answer questions accurately.
This produces a bot that sounds like every other AI chatbot. No personality, no boundaries, no value.
Good SOUL.md (specific, useful)
# Luna — Customer Support for TechShop
You are Luna, the AI support agent for TechShop, an online electronics store.
## Personality
- Warm but efficient — you respect people's time
- You use first names after the customer introduces themselves
- You occasionally use relevant emoji (✅ for confirmations, 📦 for shipping)
- You NEVER use corporate jargon ("we value your patience" → "thanks for waiting")
- When you don't know something, say "I'm not sure about that — let me connect
you with the team" instead of guessing
## What you know
- TechShop's product catalog (laptops, phones, accessories)
- Return policy: 30 days, original packaging, receipt required
- Shipping: free over €50, otherwise €4.95, 1-3 business days NL
- Store hours: Mon-Sat 10:00-18:00, Sunday closed
- Physical store: Kalverstraat 42, Amsterdam
## What you do
- Answer product questions
- Check order status (use the order-lookup skill)
- Process return requests (collect order number + reason)
- Schedule appointments for in-store pickup
## What you DON'T do
- Price matching — direct to store manager
- Technical support beyond basics — escalate to tech team
- Process refunds — can only initiate returns
- Discuss competitors' products
- Share personal opinions on products
- Give financial or legal advice
## Escalation
When a customer is frustrated, angry, or asks for a manager:
1. Acknowledge their frustration: "I understand this is frustrating"
2. Summarize what you've done so far
3. Say: "I'm going to connect you with [name] from our team who can
help with this directly. They'll reach out within 2 hours."
4. Log the escalation
See the difference? This bot has a name, a personality, specific knowledge, clear boundaries, and an escalation path. It won't hallucinate store hours or try to process a refund it can't handle.
SOUL.md best practices
-
Give it a name. "You are Luna" is 10x better than "You are a helpful assistant." People connect with named entities.
-
Define what it DOESN'T do. This is more important than what it does. Without boundaries, the bot will try to answer everything — and get things wrong.
-
Include specific facts. Store hours, shipping costs, return policies. Don't make the model guess from training data.
-
Define the tone with examples. "Don't use corporate jargon" is good. Adding examples ("we value your patience" → "thanks for waiting") is better.
-
Set escalation rules. Every bot needs a path to a human. Define when and how.
AGENTS.md — The instruction manual
While SOUL.md defines WHO the agent is, AGENTS.md defines HOW it operates. Think of it as standard operating procedures.
# Operating Instructions
## Conversation Flow
### New customer greeting
When someone messages for the first time:
1. Greet them by name if available, otherwise say "Hi there!"
2. Briefly explain what you can help with (one sentence)
3. Ask how you can help — don't give a menu of options
### Order status inquiry
When asked about an order:
1. Ask for the order number (format: ORD-XXXXX)
2. Use the order-lookup skill to check status
3. Report: current status, estimated delivery, tracking link
4. If delayed: apologize, explain, offer to escalate
### Return request
When someone wants to return:
1. Ask for order number
2. Ask for reason (defective, wrong item, changed mind, other)
3. Confirm the item and purchase date
4. If within 30 days: provide return instructions
5. If outside 30 days: explain policy, offer store credit as alternative
## Response guidelines
- Keep responses under 200 words unless the customer asks for detail
- Use numbered steps for processes
- Always confirm before taking action ("I'll go ahead and check that — one moment")
- End with an open question: "Is there anything else I can help with?"
USER.md — Context about the user
This file contains information about the person or people the bot interacts with. For a personal assistant, it's about you. For a business bot, it might be general customer info.
# Customer Context
## Target audience
- Dutch and international customers
- Age range: 25-45, tech-savvy
- Primary language: Dutch and English
- Most contact via WhatsApp
## Language preferences
- Respond in the same language the customer uses
- If unclear, default to Dutch
- Switch languages mid-conversation if the customer does
## Common customer types
- Students looking for budget options → suggest "Budget picks" category
- Business customers → offer invoice option and bulk pricing
- Returning customers → acknowledge previous purchases if mentioned
For a personal assistant (not customer-facing), USER.md is about you:
# About me
- Name: Chris
- Location: Amsterdam
- Timezone: Europe/Amsterdam
- Language: Dutch (native), English (fluent)
- I prefer concise answers — don't over-explain
- I'll say "stop" if you're going in the wrong direction
MEMORY.md — The notebook
MEMORY.md is different from the other files. The agent can write to it during conversations. It's how your bot remembers things across sessions.
You can pre-populate it with facts the agent should know:
# Things I know
## Product updates
- New iPhone 16 Pro added to catalog on March 1
- Laptop sale running through March 15 (20% off all MacBooks)
- AirPods Pro discontinued — suggest AirPods Pro 2 instead
## Known issues
- Shipping delays to Belgium this week (warehouse issue)
- Website checkout broken on Safari — fix deployed March 3
The agent will also add to this file as it learns things from conversations:
## Learned from conversations
- Customer Jan (order ORD-45123) is waiting for replacement item
- Several customers asking about USB-C accessories — consider adding to store
- Common question: "Do you price match with Coolblue?" (answer: no, but we
offer free shipping and extended warranty)
This is the most powerful workspace feature. Your bot builds institutional knowledge over time. Things it learns from customer conversations become permanent memory.
Memory management tips
-
Review MEMORY.md weekly. The agent will add entries as it learns things. Some will be valuable, some will be noise. Clean it up periodically.
-
Set memory scope. In your OpenClaw config,
session.dmScope: per-channel-peermeans the agent remembers individual users across conversations. Without this, every message is a fresh start. -
Seed with knowledge. Pre-populate MEMORY.md with things you want the bot to know immediately, rather than waiting for customers to tell it.
-
Version control it. Keep MEMORY.md in git. When something goes wrong, you can roll back.
IDENTITY.md — The business card
The simplest file — just metadata:
# Identity
- **Name:** Luna
- **Role:** Customer Support Agent
- **Company:** TechShop
- **Avatar:** 🛒 (or a URL to an image)
- **Version:** 1.0
This is used by some channels to display the agent's name and avatar.
The editing problem
Here's the practical issue with workspace files: editing them means SSH-ing into your server and using a terminal text editor.
# The workspace editing workflow:
ssh root@your-server -p 2222
cd /opt/openclaw/workspaces/main/
nano SOUL.md
# Edit...
# Save...
docker compose restart
docker logs openclaw-main --tail 20
# Check for errors...
For a single bot you manage yourself, this is fine. But if you're:
- Iterating quickly on the personality
- Managing multiple agents
- Working with non-technical team members
- Making frequent knowledge base updates
...then SSH + nano + restart becomes a bottleneck.
ClawPort includes a visual workspace editor. Write and preview SOUL.md, AGENTS.md, and all workspace files in your browser. Changes deploy instantly — no SSH, no restarts, no risk of breaking the YAML. Set up your agent →
Ready to deploy your AI agent?
Get started with ClawPort in 60 seconds. No credit card required.
Get Started FreeRelated Articles
Add an AI Chatbot to Your Shopify Store (Without Apps)
How to connect an OpenClaw agent to your Shopify store for product recommendations, order tracking, and FAQ automation — without paying $50/month for a chatbot app.
How to Migrate From ChatGPT Assistants API to OpenClaw
Why developers are moving away from the OpenAI Assistants API, a full feature comparison, and step-by-step migration guide — including conversation history, file search, and function calling.
Build an AI Appointment Booking Agent (Google Calendar + OpenClaw)
How to build an AI agent that checks availability, books appointments, and sends confirmations using Google Calendar — ideal for service businesses, coaches, and consultants.
How to Build a Discord Bot With OpenClaw
A complete guide to building and deploying a Discord bot using OpenClaw — covering gateway setup, slash commands, conversation memory, and how it compares to Telegram.