← Back to Guides
Configuration Guide

The Configuration Quartet

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. Most users only edit one or two. Here's why you should understand all four, and how to make them work in harmony.

SOUL.md

Who your agent IS. Identity, personality, tone, values.

This is the most underrated file. Without it, your agent is a generic AI assistant. With it, your agent has a distinct voice and set of priorities. The community consensus: spend at least an hour on your first SOUL.md.

Identity

You are Jarvis, a calm and slightly sarcastic AI assistant for a senior software engineer.

Communication Style

Use technical language when discussing code. Use casual language for personal topics. Never use emojis.

Values

Privacy first. Never share personal info with 3rd parties. Always ask before making purchases >$30.

Boundaries

Never send messages on behalf of the user without explicit approval. Never modify financial accounts.
Lock SOUL.md as read-only at runtime to prevent prompt injection overrides
Review and update quarterly as your preferences evolve
Include timezone, language preferences, and working hours

AGENTS.md

Roles and routing. Who handles what.

Defines specialized agent roles for multi-agent setups. Even single-agent users benefit from defining their default role. The key: each role specifies which model it uses, which channels it monitors, and which tools it has access to.

Default Agent

model: claude-sonnet-4
channels: all
tools: calendar, reminders, web-browse

Code Agent

model: claude-opus-4.5
channels: #github
tools: git, terminal, code-review

Routing Rules

If message contains code/PR/commit β†’ route to Code Agent. Otherwise β†’ Default Agent.
Start with a single default agent before adding specialists
Each agent should have its own memory context
Don't over-specialize β€” 2-3 agents covers most needs

TOOLS.md

What your agent CAN DO. Capabilities and permissions.

Defines available tools, cron schedules, and permission levels. This is where you enable browsing, set up automations, and control what actions require approval.

Available Tools

- calendar: read+write
- web-browse: read-only (starting URL required)
- terminal: blocked (security policy)

Cron Jobs

- daily-briefing: 8am, provider: anthropic, model: sonnet-4
- price-monitor: every 2h, provider: google, model: flash

Approval Rules

Auto-approve: read operations, reminders
Require approval: sending messages, spending >$10, new tool installs
Use tiered approval β€” read=auto, write=confirm, financial=always-confirm
Set token limits per cron job to prevent cost overruns
Never auto-approve terminal commands in production

memory.md

What your agent KNOWS. Facts, preferences, context.

The agent's long-term memory file. Contains facts about you, your preferences, recurring context, and structured data. This is the most-edited file β€” it grows organically as you interact.

Personal Facts

- Name: Alex Chen
- Timezone: PST
- Partner: Jamie (shared calendar)
- Dog: Luna (needs medication 2x daily)

Preferences

- Email drafts: formal for work, casual for friends
- Morning routine: briefing before 8am, no interruptions 8-10am
- Food: allergic to shellfish, prefer Thai cuisine

Work Context

- Company: Acme Corp (Series B)
- Role: Staff Engineer, Platform team
- Current project: migrating from K8s to Nomad
Keep under 2K tokens β€” move structured data to SQLite when it grows
Don't store sensitive credentials here β€” use env vars
Let the agent suggest additions after conversations

How They Work Together

SOUL.md→memory.mdIdentity shapes how memories are stored and recalled
AGENTS.md→TOOLS.mdEach agent role gets different tool permissions
TOOLS.md→memory.mdCron jobs read memory for context, write results back
SOUL.md→AGENTS.mdAgent personality is inherited from SOUL.md defaults

Configuration Checklist

βœ… SOUL.md: Identity, communication style, boundaries defined
βœ… AGENTS.md: At least a default agent role with model specified
βœ… TOOLS.md: Available tools listed with permission levels
βœ… TOOLS.md: At least one cron job (daily briefing recommended)
βœ… memory.md: Top 20 personal facts populated
βœ… All files tracked in Git for version history
βœ… SOUL.md locked as read-only at runtime