$ ssh clawdbot.space --loading...
$ ssh clawdbot.space --loading...
These four files control everything about your OpenClaw agent. Master them and you master your agent. This guide decodes each file with examples from real-world deployments.
OpenClaw's power comes from four configuration files that work together as a system. Most users only edit one or two β and that's why most users get only a fraction of OpenClaw's potential. SOUL.md gives your agent its personality. AGENTS.md defines who does what. TOOLS.md sets the boundaries of what's allowed. memory.md stores everything your agent has learned about you. The configuration quartet is also where things go wrong. A blank SOUL.md produces a generic, forgettable assistant. An over-permissive TOOLS.md creates security risks. A bloated memory.md slows context retrieval. This guide walks through each file in depth β with concrete examples, structural recommendations, and the mistakes real users have made in production deployments.
Who your agent IS. Identity, personality, tone, values.
SOUL.md is the most underrated file in the entire OpenClaw configuration system. Without it, your agent is an interchangeable AI assistant that gives the same kind of answer anyone else's agent would give. With a well-written SOUL.md, your agent develops a distinct voice, knows when to be brief and when to elaborate, and approaches decisions in a way that reflects your actual values and priorities. The community consensus is clear: spend at least an hour on your first SOUL.md. Users who invest this time report dramatically different quality interactions within the first week β agents that push back appropriately, that remember to ask before acting, and that communicate in the register that actually suits the context.
You are Jarvis, a calm and slightly sarcastic AI assistant for a senior software engineer.
Use technical language when discussing code. Use casual language for personal topics. Never use emojis.
Privacy first. Never share personal info with 3rd parties. Always ask before making purchases >$30.
Never send messages on behalf of the user without explicit approval. Never modify financial accounts.
Roles and routing. Who handles what.
AGENTS.md defines the specialized roles in your OpenClaw deployment and the routing logic that decides which agent handles which message. Even users running a single agent benefit from an explicit role definition β it prevents the agent from trying to be everything at once, and it establishes a clear contract for which model handles which type of work. In multi-agent setups, AGENTS.md is what prevents a high-cost Opus agent from being invoked for simple reminders that a Haiku agent could handle at 1/15th the price. The key design principle: each role should specify exactly which model it uses, which channels it monitors, which tools it has access to, and what kind of requests trigger routing to it versus another agent.
model: claude-sonnet-4 channels: all tools: calendar, reminders, web-browse
model: claude-opus-4.5 channels: #github tools: git, terminal, code-review
If message contains code/PR/commit β route to Code Agent. Otherwise β Default Agent.
What your agent CAN DO. Capabilities and permissions.
TOOLS.md is the capability manifest β it defines what your agent is allowed to do, on what schedule, and with how much autonomy. This is where you enable web browsing with URL constraints, set up daily cron automations, and establish the approval rules that determine when your agent can act independently versus when it needs to stop and check with you. The permission model in TOOLS.md follows a three-tier pattern used by the most experienced community members: read-only operations (calendar reads, web searches, database queries) get auto-approved because they carry no side effects; write operations (sending emails, updating records, modifying files) require confirmation; financial or irreversible operations always require explicit approval regardless of context.
- calendar: read+write - web-browse: read-only (starting URL required) - terminal: blocked (security policy)
- daily-briefing: 8am, provider: anthropic, model: sonnet-4 - price-monitor: every 2h, provider: google, model: flash
Auto-approve: read operations, reminders Require approval: sending messages, spending >$10, new tool installs
What your agent KNOWS. Facts, preferences, context.
memory.md is the agent's long-term memory file β the foundation that transforms each conversation from a cold start into a continuation of an ongoing relationship. It stores facts about you, your preferences, recurring context that the agent should always have available, and structural data that informs how it makes decisions. This is the most actively-edited file in a healthy setup, growing organically as the agent accumulates knowledge from real interactions. The critical management challenge is keeping it lean: memory.md is loaded into context on every conversation, so an oversized file degrades response quality by consuming tokens that should go toward the actual task. The recommended practice is a 2,000-token ceiling, with overflow migrating to the SQLite backend for on-demand retrieval rather than always-on context.
- Name: Alex Chen - Timezone: PST - Partner: Jamie (shared calendar) - Dog: Luna (needs medication 2x daily)
- Email drafts: formal for work, casual for friends - Morning routine: briefing before 8am, no interruptions 8-10am - Food: allergic to shellfish, prefer Thai cuisine
- Company: Acme Corp (Series B) - Role: Staff Engineer, Platform team - Current project: migrating from K8s to Nomad