Module 2: Setup Like a ProLesson 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 state

config.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: ./logs

workspace/ — 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

FilePurposeLoaded
SOUL.mdAgent identityAlways
USER.mdInfo about youAlways
AGENTS.mdOperating rulesAlways
MEMORY.mdKnowledge indexAlways
TOOLS.mdTool notesOn demand
HEARTBEAT.mdPeriodic tasksOn heartbeat

Memory Directory

PathPurpose
memory/WORKING.mdCurrent task state
memory/daily/*.mdDaily logs
memory/people/*.mdInfo about people
memory/projects/*.mdProject details
memory/knowledge/*.mdLessons, 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.