Skip to main content
An OpenClaw agent is a workspace directory. Its Markdown files become the agent’s instructions, and a built-in coding toolchain — a shell, file editing, git, and search — is available without any declaration. AGENTS.md is the agent: what you write there is what the model is told about who it is and how to behave. Use this agent type when the work is best expressed as written instructions rather than code or a schema, and when the agent needs to read and edit files, run commands, or work in a repository as part of doing its job.

Create an OpenClaw agent

The scaffold includes:
Replace the template AGENTS.md with your agent’s instructions, then save and run the agent like you would any other Guild agent.

Workspace files

Every file you commit is placed in the agent’s workspace. AGENTS.md is the only required one; the rest are optional, and a committed file always wins — Guild fills a gap but never overrides what you ship. Two consequences of the committed-file-wins rule are worth knowing, because both are useful rather than accidental:
  • Committing a USER.md opts the agent out of workspace context injection.
  • Committing an IDENTITY.md that differs from the agent’s Guild record is not an error. The record drives the Agent Hub listing and the session UI; the file drives what the model believes about itself.
The workspace is rebuilt for each task from the version’s committed files, and versions are immutable, so the agent can write to its workspace freely without affecting later tasks.

Skills

A skill is a directory under skills/ containing a SKILL.md whose frontmatter carries a name and description:
The agent loads a skill’s instructions only when the task calls for it, so skills add depth without spending context on every turn. Commit as many as you need; they are discovered from the workspace at run time.
A skills/<name>/ directory with no SKILL.md is a build error. Without that file the skill is silently never discovered, so the build rejects it rather than letting the agent run as though the skill was never written.

Tools

An OpenClaw agent has two separate sources of tools. The coding toolchain is built in. A shell, file editing, git, and search are always available and need no declaration. Guild-brokered tools are declared in guild.yaml at the root of the agent’s version files, exactly as they are for Goose agents. Each integration operation, sub-agent, and built-in tool you declare becomes a tool the agent can call. Omit guild.yaml when the agent needs none of them.
The built-in services available to an OpenClaw agent are: The field rules and validation for integrations, sub_agents, and builtins are the same as for Goose agents — see Integrations and sub-agents.
The environment field is not supported for OpenClaw agents. An OpenClaw agent always runs in the standard guildai~lobsterpot image.

Input and output

OpenClaw agents have a fixed text contract: they take text in and return text out. Unlike a Goose recipe, there are no declared parameters and no response JSON schema — the input and output schemas are applied for you at build time.

Build-time validation

Guild validates the agent when you save a version. The workspace is checked first, because an unrunnable workspace fails the build before any tool validation runs:
  1. Validate agent workspaceAGENTS.md is present and non-empty, every committed path stays inside the workspace, and every skills/<name>/ directory has a SKILL.md.
  2. Validate Guild integrations — each integration in guild.yaml resolves to a published version, and any listed tools map to real operations on it.
  3. Validate Guild subagents — each sub-agent resolves to a published version.
  4. Validate Guild builtins — each service is one of console, ui, or guild, and each listed tool is permitted for that service.
  5. Store Guild tools — the resolved tool manifest is recorded on the version.
A public agent cannot depend on a private integration or a private sub-agent. See Versions for the full dependency visibility rules.