10 · Workspace Files — The Agent's Persistent Self
Source: the
nemoclaw-user-workspaceskill.Every other doc in this set is about plumbing — how OpenClaw, OpenShell, and NemoClaw fit together. This doc is about the thing the plumbing is for: the agent has state. A persona, a user model, memory. That state lives in a specific set of Markdown files inside the sandbox, and losing it is the single worst outcome of a mis-clicked
destroy.
The six files
All of them live at /sandbox/.openclaw/workspace/ inside the sandbox. Note that's a hidden directory (.openclaw) — the files are not at /sandbox/SOUL.md, and that trips up newcomers who try to grab them from the wrong path.
| File | What it controls |
|---|---|
SOUL.md |
Core personality, tone, behavioral rules |
USER.md |
Preferences, context, and facts the agent has learned about you |
IDENTITY.md |
Agent name, creature type, emoji, self-presentation |
AGENTS.md |
Multi-agent coordination, memory conventions, safety guidelines |
MEMORY.md |
Curated long-term memory, distilled from daily notes |
memory/YYYY-MM-DD.md |
Daily note files for session continuity |
Directory layout:
/sandbox/.openclaw/workspace/
├── SOUL.md
├── USER.md
├── IDENTITY.md
├── AGENTS.md
├── MEMORY.md
└── memory/
├── 2026-03-18.md
├── 2026-03-19.md
└── ...
The agent reads these at the start of every session. That's why editing USER.md mid-conversation doesn't immediately take effect — the agent already loaded its view. Start a new session and it re-reads.
Persistence truth table — the part you must internalize
| Event | Workspace files |
|---|---|
Sandbox restart (reboot, gateway restart, nemoclaw onboard --resume) |
✅ Preserved — the sandbox PVC retains its data |
nemoclaw <name> destroy |
❌ Gone — PVC deleted, no recovery |
nemoclaw onboard that recreates the sandbox |
❌ Gone — same wipe as destroy under the hood |
The two "gone" cases are irrecoverable without a prior backup. The first time you learn this the hard way will hurt. Don't learn it the hard way.
When you don't need to back up:
- Rebooting Docker / the host / the gateway
- Resuming a half-finished onboard (
nemoclaw onboard --resumewithout--recreate-sandbox) nemoclaw <name> connect/disconnect/logs/status— all read-only with respect to workspace state
When you must back up first:
- Before
nemoclaw <name> destroy - Before any
nemoclaw onboardthat will recreate the sandbox (policy changes that touch static layers, image bumps,--recreate-sandboxflows) - Before major NemoClaw version upgrades where the blueprint digest moves
- Periodically, if you've invested real time customizing your agent
Backup and restore
Two paths: raw OpenShell primitives (portable, scriptable, verbose) or the convenience script the NemoClaw repo ships (what you'll use 95% of the time).
Path 1 — manual via openshell sandbox download/upload
Backup:
SANDBOX=my-assistant
BACKUP_DIR=~/.nemoclaw/backups/$(date +%Y%m%d-%H%M%S)
mkdir -p "$BACKUP_DIR"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/SOUL.md "$BACKUP_DIR/"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/USER.md "$BACKUP_DIR/"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/IDENTITY.md "$BACKUP_DIR/"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/AGENTS.md "$BACKUP_DIR/"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/MEMORY.md "$BACKUP_DIR/"
openshell sandbox download "$SANDBOX" /sandbox/.openclaw/workspace/memory/ "$BACKUP_DIR/memory/"
Restore: symmetric — openshell sandbox upload "$SANDBOX" "$BACKUP_DIR/SOUL.md" /sandbox/.openclaw/workspace/ for each file, and the memory/ subdir as a whole.
Don't forget the memory/ directory. It's where daily notes live, and it's easy to miss because it's not one of the capitalized top-level files.
Path 2 — the convenience script
The NemoClaw repo ships scripts/backup-workspace.sh which does all six items in one call:
./scripts/backup-workspace.sh backup my-assistant
# → Backup saved to /home/you/.nemoclaw/backups/20260320-120000/ (6 items)
./scripts/backup-workspace.sh restore my-assistant # restore latest
./scripts/backup-workspace.sh restore my-assistant 20260320-120000 # restore specific
Backups always land at ~/.nemoclaw/backups/YYYYMMDD-HHMMSS/. Each run creates a new directory, so you get a natural rollback history.
Verifying a backup
ls ~/.nemoclaw/backups/20260320-120000/
# Expected:
# AGENTS.md IDENTITY.md MEMORY.md SOUL.md USER.md memory/
Six entries. If you're missing one, the restore won't fully rehydrate the agent — the missing file will come back empty and the agent will behave as though it had never learned whatever was in that file.
Editing workspace files
Three ways, from least to most invasive:
- Ask the agent. "Remember that I'm on Pacific time" or "update your USER.md to note I prefer concise answers" — this is the natural path. The agent edits the file in-place. Least friction, takes effect on next session load.
- Connect and edit directly.
Useful for bulk changes, bootstrapping from a template, or fixing something the agent got wrong.nemoclaw my-assistant connect sandbox$ vim /sandbox/.openclaw/workspace/USER.md - Upload from the host.
For version-controlling your agent's persona in a git repo on your host and pushing updates.openshell sandbox upload my-assistant ./my-curated-SOUL.md /sandbox/.openclaw/workspace/SOUL.md
The one-paragraph rule
The sandbox is disposable. The workspace is not. Treat /sandbox/.openclaw/workspace/ as the only thing in the sandbox you actually care about keeping. Everything else — installed packages, config, the image itself — can be recreated from a nemoclaw onboard. The workspace is the only thing that holds what you've taught your agent and what your agent has learned about you. Back it up before any destructive operation, and consider treating your backups directory as something worth including in your normal backup hygiene.
Cross-references
- Doc 03 —
03-command-map.md— thenemoclaw <name> destroyrow in the lifecycle cheat-sheet points here - Doc 05 —
05-nemoclaw.md— explains the/sandbox/.openclaw-datavs/sandbox/.openclawsplit at the filesystem-policy level (the workspace dir actually lives under.openclaw-datawith a symlink, so that it's writable while the rest of.openclawstays immutable) - Doc 09 —
09-application-layer-defenses.md— mentions "synced-folder leak detection" as one ofopenclaw security audit's checks; if your~/.nemoclaw/backups/ends up inside an iCloud / Dropbox / OneDrive folder, the audit will flag it. For persona-and-memory backups containing conversations, you probably don't want them in a third-party cloud sync
← Back to 00-INDEX.md