Agent Capsule

Home / Guides

How to Back Up OpenClaw and Companion Agents with Rollback

If you run a companion persona, a roleplay character, or a local work agent (OpenClaw, Hermes, or similar), you have probably lost state after a reset, a model swap, or a machine migration. Chat logs are not enough. You need a structured checkpoint—identity, boundaries, skills, workflow rules, and recovery instructions—stored as versioned JSON you can roll back.

What you are backing up (and what you are not)

Back upSkip
Self-summary, traits, relationship modelFull chat transcripts
Memory anchors (labels + content)API keys, tokens, .env contents
Recovery instructionsRaw server dumps you cannot reproduce
Work: SOUL.md / AGENTS.md summaries, skills, tools (names only)Secrets inside checkpoint JSON

Agent Capsule stores checkpoints you or your runtime produce. It does not automatically read OpenClaw or companion backends.

Persona vs Work: pick one agent type

  • Persona Agent — companions, roleplay characters, personal agents. Identity, boundaries, memory anchors, relationship continuity.
  • Work Agent — OpenClaw-style ops assistants, local automation. Skills, tools, workflow, recovery checklist.

Create a free account and register the agent you already use. Agent Capsule does not create agents from scratch.

Step 1: Generate JSON inside the source runtime

The checkpoint must come from the agent you are backing up, using its model and its loaded context (system prompt, persona files, session memory, project files).

  1. In the dashboard, open Import checkpoint for your agent.
  2. Copy the checkpoint prompt (Persona or Work).
  3. Run that prompt inside the companion session, OpenClaw workspace, or local runtime—not in a blank generic chat with no prior context.
  4. Ask the model to return only JSON (no markdown wrapper).

Pasting an old character card into a new chat is a fallback reformat. It can help, but it is not a live self-backup from runtime state.

Step 2: Import, validate, and save a version

Paste or upload JSON. Agent Capsule rejects chat-shaped payloads, validates schema, scores completeness, flags possible secrets, and saves an immutable version (v1, v2, …) with optional pin.

Free plan: one protected agent, three retained versions per agent. See pricing for more agents, larger checkpoints, and API push.

Step 3: Roll back when something drifts

  1. Open Version history.
  2. Compare versions (completeness badge, evolution notes).
  3. Pin a known-good baseline before risky changes.
  4. Export an older version's recovery prompt or kit for restore elsewhere.

Unpinned oldest versions may be pruned when you exceed your plan limit.

Step 4: Restore elsewhere

  • Recovery prompt export — deterministic text; no LLM required.
  • Recovery kit download — Work agents include structured file outlines (e.g. SOUL.md, AGENTS.md).
  • One-turn recovery preview — optional sanity check on another model; not a guarantee of identical behavior.

Optional: API and CLI (Pro)

Create an agent-scoped API token, then POST /api/agents/:agentId/snapshots with validated JSON, or use the agentcapsule CLI (validate / push, beta). Paste import works on every plan.

Common mistakes

  • Backing up in the wrong chat—a new generic thread without agent context.
  • Uploading chat logs instead of structured checkpoints.
  • Skipping recovery instructions before you need to restore.
  • Putting secrets in JSON (blocked or flagged).

Try it in five minutes

  1. Sign up free
  2. Back up agent → choose Persona or Work.
  3. Import checkpoint JSON from your runtime (or start from the in-app prompt).
  4. Open the version → export recovery prompt or kit.

Early access: code LPSIHSPL66 at checkout for first month Pro free, then standard billing. Refund policy

Questions? support@agentcapsule.app