openclaw claws
A Claw is a versioned setup for one new OpenClaw agent. It can describe the
agent’s portable identity, workspace files, skills, plugins, MCP servers, and
cron jobs. Harness-specific agent settings may be carried in a referenced
package profile. A Claw does not replace or modify an existing agent.
Claws are experimental. Their schema, command output, and lifecycle may change.
Enable the command surface explicitly:
CLAW.md, or grouped JSON manifest.
Publishing, searching, and installing whole Claws through ClawHub are a
separate registry track and are not part of this command surface yet.
Create a Claw package
A package containspackage.json, a CLAW.md manifest, and any profiles or
workspace sidecars referenced by that manifest:
CLAW.md starts with YAML frontmatter. A non-empty Markdown body is the
portable agent prompt. OpenClaw applies it as the Claw-managed SOUL.md for
the new agent:
metadata is a string-to-string map for portable consumer hints. OpenClaw’s
openclaw.config key points to an optional, package-relative YAML profile. The
exported default is profiles/openclaw.yml; the pointer is normative, so a
package may choose another safe relative .yml or .yaml path.
metadata.openclaw.config pointer rather than
embedding a second copy of the OpenClaw profile. The remaining schema fragments
on this page use JSON, with equivalent keys available in CLAW.md frontmatter.
The OpenClaw package profile may select any built-in tool profile registered by
the running OpenClaw version, then refine it with alsoAllow, deny, and
tools.fs.workspaceOnly: true. A Claw cannot set that field to false and
weaken host filesystem confinement. tools.allow remains available as an
explicit allowlist but cannot be combined with alsoAllow. A Claw may also set
memory.search.enabled, choose the portable memory and sessions sources,
and opt into cross-conversation memory with rememberAcrossConversations.
Declaring the sessions source requires that opt-in.
Host policy still constrains these settings, and Claws do not carry custom
profile definitions, providers, credentials, bindings, or local memory paths.
The referenced profile is limited to 256 KiB, must be JSON-compatible YAML, may
not use aliases, anchors, tags, or merge keys, and must be a regular,
non-symlinked, non-hardlinked file inside the package.
Package and workspace paths must remain inside the package root. Manifests are
limited to 1 MiB, package metadata to 256 KiB, and workspace sources enforce
separate per-file and aggregate limits. Workspace sources also reject symlinked
parents.
The CLAW.md body is the preferred portable source for SOUL.md; do not also
declare a SOUL.md sidecar when the body is non-empty. Other bootstrap files
use named entries, while additional files use package-relative sources and
workspace-relative targets:
mcp.servers configuration model:
Inspect and preview
Validate the source without planning local changes:planIntegrity
digest. Capability records show the exact package, MCP, scheduled-work, sandbox,
tool, or heartbeat effect. Review the plan before creating the agent:
--yes alone is insufficient. OpenClaw rebuilds the plan and rejects consent
when the source, destination, or live configuration changed after preview. Use
--agent-id or --workspace during both preview and apply when package
defaults collide with local state. For disposable profiles and parallel validation,
pass an explicit --workspace; OPENCLAW_STATE_DIR relocates runtime state but
does not change the default workspace location.
Adding a Claw creates the new agent and workspace configuration, writes declared
workspace files, installs or reuses declared skill and plugin artifacts, and
records package, MCP, and cron provenance. Existing files are not overwritten,
and retries fail closed when owned content drifted.
Inspect installed state
status compares the installed agent and its recorded workspace, package, MCP,
and cron provenance with current state. It reports incomplete installs, missing
resources, and drift without changing local state. openclaw doctor adds
Claw-specific diagnostics for incomplete ownership records, unsafe managed
files, and cron jobs that cannot be corroborated with live Gateway inventory.
Claw provenance distinguishes two relationships:
- Managed: the Claw introduced and currently manages the resource. It is a cleanup candidate when unchanged and no conflicting owner remains.
- Referenced: the resource existed independently or is shared. Removal releases this Claw’s reference and retains the resource by default.
Update an installed Claw
By default, update uses the source recorded when the Claw was added. Use--from when that source moved or when testing another package directory:
! lines with exact redacted effects in
human output. Resolved package integrity, install identity, and any trust
warning are included. Removing a package declaration releases this Claw’s edge
without uninstalling the artifact during update. The eventual
exact planIntegrity confirmation binds that disclosed set as well as ordinary
content changes. Hosts may use the same records for a separate dialog or an
aggregate multi-agent review. Apply the exact reviewed plan with explicit
consent:
update_partial with structured
status: partial, preserves uncertain provenance,
and stops. Inspect claws status, the affected resource, and openclaw doctor;
then preview again before retrying or removing anything.
Remove an installed Claw
Preview removal before selecting cleanup:--yes never broadens
them. Globally installed plugins are retained while this Claw’s reference is
released; use the ordinary plugin lifecycle separately when you intend to
uninstall a process-wide plugin.
To remove unchanged Claw-introduced references that have no other current
owner, include --remove-unused in both preview and apply. To select exact
referenced resources instead, repeat --remove-referenced:
--force-referenced only after reviewing the displayed dependents,
independent owners, and pre-existing origin. It allows selected cleanup despite
those conflicts; it does not skip plan-integrity consent.
Export an installed agent
Export creates a new package directory and fails if the destination exists or managed state has drifted:package.json, canonical CLAW.md, and managed workspace
sidecars. Managed SOUL.md content is emitted as the CLAW.md body when it is
non-empty UTF-8 and the combined document fits the manifest limit. Otherwise,
export retains it as an explicit sidecar so the package remains importable. It
is a portable Claw package, not a whole-instance backup: unrelated agents,
credentials, sessions, and unowned local state are excluded.
Command reference
Use
--json for experimental machine-readable output.