Module 2: Setup Like a Pro•Lesson 3 of 6
Repo & Config Structure
Repo & Config Structure
Understanding where everything lives is crucial.
The Directory Structure
my-agent/
├── config.yaml # Main configuration
├── workspace/ # Your agent's brain
│ ├── SOUL.md # Agent identity
│ ├── USER.md # Info about you
│ ├── AGENTS.md # Operating instructions
│ ├── MEMORY.md # Knowledge index
│ ├── TOOLS.md # Tool-specific notes
│ ├── HEARTBEAT.md # Periodic task config
│ └── memory/ # Persistent memory
│ ├── WORKING.md # Current state
│ ├── daily/ # Daily logs
│ ├── people/ # People info
│ ├── projects/ # Project details
│ └── knowledge/ # Lessons, playbooks
├── logs/ # Session logs
└── .openclaw/ # Internal stateconfig.yaml — The Control Center
# Provider configuration
providers:
anthropic:
apiKey: "sk-ant-..."
# Model configuration
models:
default: anthropic/claude-sonnet-4
aliases:
opus: anthropic/claude-opus-4
sonnet: anthropic/claude-sonnet-4
# Channel configuration
channels:
telegram:
botToken: "..."
allowlist: [123456789]
# Feature flags
features:
memory: true
heartbeat: true
cron: true
# Paths
workspace: ./workspace
logs: ./logsworkspace/ — The Brain
This is where your agent lives. These files are:
- Loaded at session start
- Editable by you AND the agent
- Persistent across restarts
Core Files
| File | Purpose | Loaded |
|---|---|---|
| SOUL.md | Agent identity | Always |
| USER.md | Info about you | Always |
| AGENTS.md | Operating rules | Always |
| MEMORY.md | Knowledge index | Always |
| TOOLS.md | Tool notes | On demand |
| HEARTBEAT.md | Periodic tasks | On heartbeat |
Memory Directory
| Path | Purpose |
|---|---|
| memory/WORKING.md | Current task state |
| memory/daily/*.md | Daily logs |
| memory/people/*.md | Info about people |
| memory/projects/*.md | Project details |
| memory/knowledge/*.md | Lessons, playbooks |
The Golden Rule
Everything important should be in workspace/
If it's not in workspace, it won't survive a reinstall. If it's not in memory/, it won't be remembered.