You have learned about the command center, the engine, and the memory. Now it’s time to meet the main character: the Agent itself.
If you have been following this series from the beginning, you now have a solid mental model of the three systems that make OpenClaw tick. In Core Concepts #2: What Is the Gateway?, you learned that the Gateway is the always-on infrastructure layer — the executive assistant that routes every incoming message to the right destination. In Core Concepts #1: What Is the Agentic Loop?, you discovered that the Agentic Loop is the six-stage engine — intake, context assembly, model inference, tool execution, streaming replies, persistence — that turns a single message into a completed task. And in Core Concepts #3: How OpenClaw’s Memory System Works, you saw that Memory is the plain-text filing system that gives your AI genuine continuity across sessions.
But there is a concept we have been orbiting around without fully defining. We kept saying “the agent does this” and “the agent decides that” — and you probably nodded along, with a rough intuition of what we meant.
Today we make that intuition precise.
What exactly is an OpenClaw agent? What is it made of? How do you shape it, scale it, and — critically — how do you run more than one?
Let’s find out.
The Simplest Possible Definition
Here is the one-sentence version you can use at a dinner party:
An OpenClaw agent is a persistent, autonomous AI assistant that lives in a folder on your computer — defined entirely by a small set of plain text files — and can take real actions in the world through your messaging apps, tools, and connected services.
Every single word in that sentence is doing important work. Let’s unpack the ones that matter most.
Persistent — unlike a regular chat session, the agent does not disappear when you close the window. It keeps running.
Autonomous — it can initiate actions on its own, not just respond to your messages.
Lives in a folder — there is no hidden database, no cloud sync, no opaque configuration panel. The agent is a directory on your machine.
Defined by plain text files — this is the design choice that makes everything else possible. 1OpenClaw agents don’t live in databases or configuration panels. They live in plain text files inside a workspace folder. When OpenClaw starts an agent session, it reads these files and assembles the agent’s identity, behavior rules, memory, and task schedule on the fly.
Can take real actions — not just generating text, but actually doing things: sending messages, reading files, browsing the web, calling APIs, writing code.
An Agent Is Not a Chatbot. Here Is the Difference.
Before we go deeper, let us be absolutely clear about the distinction that makes the Agent concept meaningful.
Most AI tools you have used are reactive. You type. They respond. You type again. They respond again. The conversation ends when you close the tab.
An OpenClaw agent is fundamentally different on three dimensions:
It acts without being asked. 8This is what makes OpenClaw feel like an assistant rather than a tool. It does things without you asking. On each heartbeat, the agent reads a checklist from HEARTBEAT.md in the workspace, decides whether any item requires action, and either messages you or responds HEARTBEAT_OK. You wake up to a morning briefing you never requested. Your deployment monitor texts you when something breaks. Your inbox has been triaged while you slept. None of this required a message from you.
It remembers who you are. As we covered in Core Concepts #3, 7this is the part that makes OpenClaw different from just using the Claude app. Every session, your agent wakes up fresh. It doesn’t remember yesterday’s conversation. But it does read its memory files. So at the end of each day, your agent writes notes to memory/YYYY-MM-DD.md: what happened, what it learned, decisions that were made. Over time, it curates the important stuff into MEMORY.md, long-term memory that persists indefinitely.
It executes multi-step plans. As we covered in Core Concepts #1, the agentic loop runs through think → act → observe → repeat until the task is complete. A chatbot answers once and stops. An agent keeps going until the job is done.
What an Agent Is Actually Made Of: The Five Files
Here is the part that surprises most newcomers: an OpenClaw agent is not a piece of software you install. It is a collection of five core text files living in a workspace directory. The files are the agent.1 This means you can edit your agent with any text editor. Version-control it with Git. Copy it to another server and have an identical agent running in minutes. The files are the agent.
Let’s walk through each one:
1. SOUL.md — The Personality
1 SOUL.md defines your agent’s personality, values, tone, and behavioral boundaries. It’s the first file OpenClaw injects into the agent’s context at the start of every session. Think of it as the “character sheet.” 1 Without it, your agent is just a raw language model with no persistent identity.
This is where you define who your agent is: its name, its communication style, its hard limits, and its core principles. A well-written SOUL.md is the difference between an AI that feels like a generic chatbot and one that feels unmistakably yours.
Here is a minimal but effective SOUL.md for a personal assistant:
## Who You Are
You are Aria, a sharp and direct personal assistant.
You cut through noise and give concrete answers.
## Tone
Direct, warm, never condescending.
Admit when you don't know something.
## Hard Limits
- Never share private files or API keys
- Never send external messages without explicit confirmation
- Always ask before taking irreversible actions
4 A soul file captures who you are in a format AI agents can embody. Not a chatbot that talks about you — an AI that thinks and speaks as you.
2. AGENTS.md — The Operating Manual
6 AGENTS.md is your Standard Operating Procedure. It tells the agent how to behave: what rules to follow, how to route messages, what security policies to enforce, what scope boundaries to respect.
Think of the relationship between SOUL.md and AGENTS.md this way: 1personality in SOUL, procedures in AGENTS. SOUL defines who the agent is. AGENTS defines how it operates.
One critical distinction you must understand: 6rules in bootstrap files are advisory. The AI model follows them because you asked it to, not because a system enforces them. If you need a rule that can’t be broken, use tool policy or sandboxing, not a strongly worded paragraph. In other words, “Never execute shell commands” written in AGENTS.md is a request. Disabling the exec tool in your configuration is enforcement. Use both, but know which one actually stops the behavior.
3. USER.md — The Context Card
1 USER.md gives the agent context about the human it’s working with. This is what makes an agent feel like it actually knows you, rather than starting cold every session. 1 This file stays static until you manually update it. It’s not a live database — it’s a context card the agent reads each session.
A practical USER.md includes your name, timezone, working hours, communication preferences, and any standing context the agent needs to know about your projects. It is the difference between an agent that has to ask “what timezone are you in?” every week and one that already knows.
4. TOOLS.md — The Equipment List
1 TOOLS.md documents which tools your agent has access to and any usage notes specific to your setup. It’s part documentation, part instruction set.
Where SOUL.md defines personality and AGENTS.md defines behavior, TOOLS.md documents the equipment. Which tools are enabled? Are there any quirks in your specific environment the agent should know about? (For example: “The exec tool is available but requires sudo for anything in /opt/homebrew.”) This is where you document those details so the agent doesn’t have to figure them out by trial and error.
5. MEMORY.md — The Long-Term Brain
As we covered in detail in Core Concepts #3, MEMORY.md is the curated, long-term knowledge base — the distillation of everything the agent has learned about you, your preferences, and your projects across all previous sessions. 8MEMORY.md is for durable facts: “User prefers TypeScript.” “Production database is PostgreSQL.” Things that should never be forgotten.
Together, these five files form a complete specification of your agent. Change SOUL.md, and your agent’s personality changes. Update USER.md, and it has new context about you. Add a rule to AGENTS.md, and the agent follows it from the next session onward. The agent is, in the most literal sense, what these files say it is.
The Anatomy of a Complete Agent Workspace
Here is the full picture of a production-ready agent workspace, with every file in its proper place:
~/.openclaw/workspace/
│
├── SOUL.md ← Who the agent is (personality, values, hard limits)
├── AGENTS.md ← How the agent operates (rules, routing, security policies)
├── USER.md ← Who you are (name, timezone, preferences, context)
├── TOOLS.md ← What tools are available (environment notes)
├── IDENTITY.md ← Agent name, avatar, display emoji
├── HEARTBEAT.md ← Scheduled tasks (the agent's proactive checklist)
│
├── MEMORY.md ← Long-term curated knowledge (durable facts and patterns)
└── memory/
├── 2026-04-08.md ← Today's raw session log
├── 2026-04-07.md ← Yesterday's log
└── archive/ ← Logs older than 30 days
One rule that trips up almost every new user: 6OpenClaw loads every bootstrap file into context on every session, so file size directly affects token cost and available context. Keep each file focused on its one job. The moment AGENTS.md starts accumulating personality notes that belong in SOUL.md, or SOUL.md starts growing tool configuration that belongs in TOOLS.md, you are wasting tokens on duplicated instructions and creating confusion when one copy gets updated and the other doesn’t.6 Every bootstrap file has one job. When content ends up in the wrong file, you get duplicated instructions, conflicting guidance, and wasted tokens.
One Agent vs. Many: The Multi-Agent Architecture
Now comes the concept that unlocks the full power of the OpenClaw platform: you are not limited to a single agent.11 The Gateway can host one agent (default) or many agents side-by-side. 10 OpenClaw’s multi-agent system lets you run multiple independent AI agents simultaneously from one installation, each fully isolated with its own workspace, credentials, session storage, personality, model selection, and tool permissions.
Think about what this makes possible. You could run:
- A personal assistant on your personal WhatsApp, casual and warm, with access to your calendar and notes
- A work agent on Slack, professional and concise, focused on your projects and team context
- A coding agent on Discord, specialized with development tools, repo access, and a SOUL.md tuned for technical precision
- A family bot on a family group chat, friendly and limited, able to answer questions but never write or delete files
10 This means you can have a personal assistant, a work agent, a coding helper, and a family-friendly bot — all running on the same OpenClaw Gateway without any data or credential crossover.
How Routing Works: Bindings
The system that decides which agent handles which message is called Bindings. 10Bindings tell OpenClaw which agent handles which messages using a most-specific-wins priority system — from exact peer matches (highest) down to channel-level defaults and the fallback default agent (lowest).
Here is what a simple multi-agent binding configuration looks like in openclaw.json:
{
"agents": {
"list": [
{
"id": "personal",
"workspace": "~/.openclaw/workspace-personal",
"model": "anthropic/claude-sonnet-4-6"
},
{
"id": "work",
"workspace": "~/.openclaw/workspace-work",
"model": "anthropic/claude-opus-4-6"
},
{
"id": "coding",
"workspace": "~/.openclaw/workspace-coding",
"model": "anthropic/claude-opus-4-6"
}
]
},
"bindings": [
{ "agentId": "work", "match": { "channel": "slack" } },
{ "agentId": "personal","match": { "channel": "whatsapp" } },
{ "agentId": "coding", "match": { "channel": "discord" } }
]
}
14 The system uses deterministic routing rules based on channel, account ID, and peer matching. For example, you can route different WhatsApp direct messages to entirely different agents while using a single phone number. This level of granular control transforms a simple AI wrapper into a robust orchestration engine.
The Isolation Guarantee
Each agent in a multi-agent setup is completely isolated from every other. 14This isolation is critical for preventing auth collisions and ensuring that a coding agent does not accidentally pull context from your personal grocery list.
The three layers of isolation are:
- Workspace isolation — each agent has its own directory with its own SOUL.md, AGENTS.md, USER.md, MEMORY.md, and memory logs
- Credential isolation — each agent has its own
agentDirwith separate authentication profiles - Session isolation — each agent has its own session store under
~/.openclaw/agents/<agentId>/sessions
There is one rule you must never break: 10never reuse the agentDir path across agents. Sharing state directories causes authentication collisions and session corruption.
Skills Are Per-Agent
Skills — the plugins that give your agent its “hands and feet,” which we will cover in depth in a future article — follow a clear precedence hierarchy in multi-agent setups. 11Skills are loaded from each agent workspace plus shared roots such as ~/.openclaw/skills, then filtered by the effective agent skill allowlist when configured. Use agents.defaults.skills for a shared baseline and agents.list[].skills for per-agent replacement.
This means your coding agent can have access to the exec tool and a GitHub skill, while your family bot can be completely locked down to read-only operations. Same Gateway. Completely different capability profiles.
Choosing the Right Model Per Agent
One of the most powerful — and often overlooked — features of multi-agent OpenClaw is the ability to assign different AI models to different agents based on their purpose and cost requirements.16 Give each agent a distinct SOUL.md — professional tone for work, casual for personal. Assign different models based on agent role and cost tolerance.
A practical approach:
| Agent | Recommended Model | Reason |
|---|---|---|
| Personal assistant | Claude Sonnet | Good balance of intelligence and cost |
| Work / professional | Claude Opus | Maximum reasoning for complex tasks |
| Coding agent | Claude Opus | Complex multi-step code requires top-tier reasoning |
| Family / read-only bot | Claude Haiku | Low cost, fast, sufficient for simple Q&A |
| Monitoring / alerts | Claude Haiku | Runs frequently, keep cost minimal |
Remember: since Anthropic’s April 2026 policy change (which we covered in our earlier article on the OpenClaw subscription cutoff), all of these models must be accessed via direct API keys rather than Claude subscription credits. This actually makes per-agent model selection more important, since you are now paying directly for every token consumed.
What Happens at the Start of Every Session: The Boot Sequence
Every time a message arrives and a new agent session spins up — as you learned in the Gateway and Agentic Loop articles — the agent goes through a predictable boot sequence. Understanding this sequence is essential for debugging unexpected behavior.2 Read SOUL.md, USER.md, and today and yesterday in memory/. Read MEMORY.md when present; only fall back to lowercase memory.md when MEMORY.md is absent.
In plain English, the boot sequence looks like this:
Session starts
↓
Load SOUL.md (who am I?)
↓
Load AGENTS.md (how do I operate?)
↓
Load USER.md (who am I talking to?)
↓
Load TOOLS.md (what equipment do I have?)
↓
Load MEMORY.md (what do I remember long-term?)
↓
Load today + yesterday daily logs (what happened recently?)
↓
Load skills compact list (what skills can I call on?)
↓
Agentic Loop begins
2 You are a fresh instance each session; continuity lives in these files. The model has no memory between sessions beyond what these files contain. This is why, as we emphasized in [Core Concepts #3](https://haiai.world/openclaw-core-concepts-3-memory/), the golden rule of OpenClaw memory is: if it is not written to a file, it does not exist.
Three Practical Patterns for Building Your First Agent
Now that you understand the theory, let’s ground it in three real-world patterns you can use starting today.
Pattern 1: The Personal Life OS
Goal: A single, general-purpose assistant that handles your daily life — calendar, email, research, reminders.
Setup:
- One agent, one workspace
- Connect WhatsApp and Telegram
- Write a warm, direct SOUL.md with your personal preferences
- Add HEARTBEAT.md with a morning briefing task and evening summary task
- Install Gmail and Calendar skills from ClawHub
Model: Claude Sonnet for the balance of capability and cost.
Pattern 2: The Work + Personal Split
Goal: Keep your professional and personal AI contexts completely separate, with different personalities and data access.
Setup:
- Two agents:
workandpersonal - Route Slack and Microsoft Teams to
work; route WhatsApp and Telegram topersonal - Write separate SOUL.md files — professional tone for
work, casual forpersonal - Give
workaccess to your project management tools; restrictpersonalto personal services
16 Give each agent a distinct SOUL.md — professional tone for work, casual for personal.
Pattern 3: The Functional Team
Goal: A specialized “team” of agents, each an expert in one domain.
Setup: 12OpenClaw supports true multi-agent team workspaces where each agent gets isolated memory, unique skills, and a separate identity. A team of 5 runs 5 specialized AI agents — research, email, coding, social, scheduling.
This is the setup used by power users and small teams. Each agent is deeply specialized — better SOUL.md, sharper AGENTS.md, narrower skills — and far more effective in its domain than a single general-purpose agent trying to do everything.12 The real threshold is functional diversity — if your team’s AI workload spans 3+ distinct domains, isolated agents outperform a shared agent regardless of headcount.
One Important Limitation: Sequential, Not Parallel
Multi-agent OpenClaw is powerful, but there is one architectural constraint worth knowing upfront.19 It supports some degree of multi-agent routing with isolated workspaces, but the fundamental execution model is sequential. One task completes, then the next begins. For a personal assistant handling discrete requests one at a time, this works well.
If you need true parallel execution — multiple agents working simultaneously on different parts of a complex workflow — you will hit the limits of OpenClaw’s current architecture. 12Direct agent-to-agent calling is on the OpenClaw roadmap but not yet in the stable release as of March 2026.
For personal and small-team use cases, the sequential model is rarely a bottleneck. For enterprise-scale workflows that require concurrent multi-agent orchestration, you may need to look at more specialized frameworks — which is a topic we will explore in a future article.
The Security Surface Grows With Every Agent You Add
As you add agents, you are not just adding capability — you are adding attack surface. 18Multi-agent makes isolation easier but it also increases surface area. You have more bot tokens, more skills, more auth profiles. The usual “review third-party skills” advice still applies and it matters more here because you can accidentally install a skill into a shared directory that becomes eligible for every agent. Security reporting in early 2026 covered malicious skills in public registries and why reviewing SKILL.md and scripts is non-negotiable.
The three rules that protect a multi-agent setup:
- Never share agentDir paths. Each agent gets its own isolated state directory, full stop.
- Apply per-agent tool restrictions. A family bot should never have write access. A monitoring agent should never have browser access. Scope each agent’s tools to the minimum it actually needs.
- Review every third-party skill before installing it to a shared directory. A skill installed to
~/.openclaw/skills/is available to every agent. Treat it like installing system software.
The Three-Sentence Summary
If you take only three things away from this article, make it these:
- An OpenClaw agent is just a folder. Five plain text files — SOUL.md, AGENTS.md, USER.md, TOOLS.md, and MEMORY.md — are the complete specification of an agent’s identity, behavior, knowledge, and capabilities. Edit the files, and you change the agent. Copy the folder, and you clone the agent.
- One Gateway can host many agents simultaneously. Each agent is fully isolated — separate workspace, separate credentials, separate session history. Bindings route incoming messages to the right agent using a deterministic most-specific-wins priority system. You can have a personal assistant, a work agent, and a coding helper all running on the same machine, with zero data crossover.
- The agent’s power comes from the loop, memory, and Gateway working together. The agent definition (the files) tells the system who the agent is. The Gateway tells the system where messages go. The Agentic Loop tells the system how the agent acts. And the Memory system tells the system what the agent remembers. Together, they make something genuinely new: not a chatbot, not a script, but a persistent, autonomous presence that shows up for you every single day.
📬 Subscribe to the haiai.world newsletter for weekly AI breakdowns — no fluff, just clarity.
Up next: OpenClaw Core Concepts #5 — Skills: How to give your agent “hands and feet” with ClawHub, SKILL.md, and the skill resolution system.
More in This Series:
- OpenClaw Core Concepts #3: How OpenClaw’s Memory System Works
- OpenClaw Core Concepts #2: The Agentic Loop — The Engine That Makes Your AI Actually Do Things
- OpenClaw Core Concepts #1: The Gateway — OpenClaw’s “Command Center”
- Anthropic Just Cut Off OpenClaw From Claude Subscriptions — Here’s What That Really Means for You
- OpenClaw vs. Claude Code: Two Philosophies of AI Agents Collide—and Then One Got Its Source Code Leaked
- Beyond Prompting: Why “Harness Engineering” is the Most Important AI Skill of 2026
- AI Glossary: 40 Essential AI Terms Every Beginner Needs to Know
References
- Roberto Capodieci (Medium) — AI Agents 003 — OpenClaw Workspace Files Explained: SOUL.md, AGENTS.md, HEARTBEAT.md and More (March 2026) https://capodieci.medium.com/ai-agents-003-openclaw-workspace-files-explained-soul-md-agents-md-heartbeat-md-and-more-5bdfbee4827a
- OpenClaw Official Docs — Default AGENTS.md Reference https://docs.openclaw.ai/reference/AGENTS.default
- GitHub (mergisi) — awesome-openclaw-agents: 162 production-ready AI agent templates https://github.com/mergisi/awesome-openclaw-agents
- GitHub (aaronjmars) — soul.md: The best way to build a personality for your agent https://github.com/aaronjmars/soul.md
- Stack Junkie — How to Write AGENTS.md, SOUL.md, and TOOLS.md for OpenClaw https://www.stack-junkie.com/blog/openclaw-system-prompt-design-guide
- Aman Khan (Substack) — How to Make Your OpenClaw Agent Useful and Secure (February 17, 2026) https://amankhan1.substack.com/p/how-to-make-your-openclaw-agent-useful
- A B Vijay Kumar (Medium) — OpenClaw: A Deep Agent Realization (March 2026) https://abvijaykumar.medium.com/openclaw-a-deep-agent-realization-14125bbd5bad
- Bibek Poudel (Medium) — How OpenClaw Works: Understanding AI Agents Through a Real Architecture (February 18, 2026) https://bibek-poudel.medium.com/how-openclaw-works-understanding-ai-agents-through-a-real-architecture-5d59cc7a4764
- OpenClaw Official Docs — Multi-Agent Routing https://docs.openclaw.ai/concepts/multi-agent
- RemoteOpenClaw — How to Set Up OpenClaw Multi-Agent: Complete Step-by-Step Guide (2026) https://remoteopenclaw.com/blog/how-to-set-up-openclaw-multi-agent
- Blink Blog — OpenClaw for Teams: Multi-Agent Workspace Setup Guide (2026) https://blink.new/blog/openclaw-for-teams-multi-agent-workspace-2026
- Skywork AI — The Ultimate Guide to OpenClaw Multiple Agents: Architecture, Comparison, and Deployment in 2026 https://skywork.ai/skypage/en/ultimate-guide-openclaw-agents/2037035796206010368
- VibeClaw — Multi-Agent Routing — Run Multiple OpenClaw Agents https://vibeclaw.net/docs/multi-agent/
- ClawDocs — Multi-Agent Workflows https://clawdocs.org/guides/multi-agent/
- LumaDock — OpenClaw Multi-Agent Setup With Multiple AI Assistants (February 21, 2026) https://lumadock.com/tutorials/openclaw-multi-agent-setup
- LobeHub — OpenClaw Team Setup Skill (March 29, 2026) https://lobehub.com/skills/qiujiahong-nick-skills-openclaw-team-setup
- NerdBot — OpenClaw vs Eigent: Choosing the Right Open Source AI Agent in 2026 (April 7, 2026) https://nerdbot.com/2026/04/07/openclaw-vs-eigent-choosing-the-right-open-source-ai-agent-in-2026/
- GitHub (openclaw/openclaw) — Official OpenClaw Repository https://github.com/openclaw/openclaw