Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Workspace Files and Health Checks  ›  Lesson

AGENTS.md and Other Workspace Files

AGENTS.md 12 minEach recognised workspace file answers one question, such as roles in AGENTS.md, tools in TOOLS.md, start-up tasks in BOOT.md and heartbeat tasks in HEARTBEAT.md, so place each note by when it should be read.

AGENTS.md and Other Workspace Files

Open a well-used OpenClaw workspace and you may find a dozen markdown files. It looks cluttered until you notice that each recognised name answers exactly one question, and that the name also tells you when the file matters.

The rule

Each workspace file answers one question; its name tells you which.

File The question it answers
SOUL.md Who is the agent: personality, tone, ground rules?
IDENTITY.md The agent's persona again: an alternative or complement to SOUL.md
USER.md Who are you?
AGENTS.md Which agents are there, what role does each play, and how do they work together?
TOOLS.md Which tools are available, and how should they be used?
MEMORY.md Which lasting facts has the agent learned?
memory/YYYY-MM-DD.md What happened on that day?
HEARTBEAT.md What should be checked on each heartbeat?
BOOT.md What should be done once, when the Gateway starts?

AGENTS.md earns a closer look. It holds the working rules and roles: how the agent is meant to operate, and, once you run several agents, who does what and how they relate. Without it, two agents with overlapping jobs can end up duplicating or contradicting each other.

The files that shape the agent, such as SOUL.md, USER.md, AGENTS.md and TOOLS.md, are loaded into its context automatically at the start, so they cost space in every conversation. The memory files are there for the agent to consult and search. Beyond all these, you can keep any other markdown file in the workspace, such as project notes, reference documents or instructions for one particular task, for the agent to read when a job calls for it. Skills have their own home too: each lives in a skills/ folder with its SKILL.md.

The shortcut

File each note by when it should be read. Every conversation: a recognised file such as SOUL, USER, AGENTS or TOOLS. Once at start-up: BOOT.md. On each heartbeat: HEARTBEAT.md. Only when a task needs it: an ordinary markdown file.

Setting up a household agentStep 1 of 4
  1. "When the Gateway restarts, tell me you are back."

    Once, at start-up: BOOT.md.

Drills

Answer fast — trust the rule.

quick drill

Which file holds instructions the agent runs once, when the Gateway starts?

quick drill

You run a research agent and a writing agent. Which file sets out their roles and how they work together?

quick drill

Which file describes the tools available and how to use them?

quick drill

Why not paste a 40-page manual into a recognised workspace file?

quick drill

What is IDENTITY.md?

Remember

  • Each workspace file answers one question; its name tells you which.
  • File each note by when it should be read: every chat, at start-up, on each heartbeat, or only when needed.
  • Trap: stuffing long reference material into files that load into every conversation.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhere does this note go?

You have four notes for your agent: a message to send whenever the Gateway starts, how to use the office printer, what to check every hour, and a 30-page project handbook. Explain which workspace file or kind of file each belongs in and why.