Multi-threaded conversation memory organized by topic instead of by date. Enables seamless context switching, compaction resilience, and sub-agent tracking — all file-based, no code changes to OpenClaw. Use when you want your agent to maintain separate conversation threads per project/topic, survive context compaction without losing the thread, track sub-agent spawns with model/task/duration, and output a structured conversation-map.json for visualization clients.
Organize conversation memory by topic rather than by date. Each subject gets its own folder with a conversation thread, status summary, and artifacts. A master timeline tracks all context switches, compaction events, and sub-agent spawns.
Run the bootstrap script to create the directory structure:
bash scripts/bootstrap.shThen add the context memory instructions to your AGENTS.md (see below).
memory/
├── CONTEXT_LOG.md # Master timeline (reverse chronological)
├── conversation-map.json # Structured event graph for client apps
├── contexts/
│ ├── <topic-name>/
│ │ ├── THREAD.md # Curated conversation excerpts
│ │ ├── STATUS.md # Current state (<1KB, always fresh)
│ │ └── artifacts/ # Work products
│ └── ...
├── YYYY-MM-DD.md # Daily logs (unchanged, still works)
└── session-state.md # Compact recovery (enhanced with active context)Add this section to your AGENTS.md under Memory:
Every message belongs to a context. Determine which:
job-searchjob-searchmkdir -p memory/contexts/<name>/artifactsEvery context switch gets a unique ID: ctx-{DD}-{seq} (e.g. ctx-08-001). Sub-agents inherit their parent: ctx-08-001-a1. Sequence resets daily.
memory/contexts/<new>/STATUS.md, log switch to memory/CONTEXT_LOG.mdmemory/conversation-map.json with any new eventsmemory/CONTEXT_LOG.md (last ~30 entries) — understand what's been happeningmemory/session-state.md if exists — compact recoveryLog to both CONTEXT_LOG.md and conversation-map.json:
memory/session-state.md with current active context name[COMPACTION] to CONTEXT_LOG.md with list of active contextsjob-search, project-voxbench, htmx-4project- for code, client- for client work, biz- for business# Context Log
## 2026-02-08
### 05:31 — [CONTEXT: openclaw-memory-design] triggered by: user message
- Designed file-based memory system for OpenClaw
- Created Notion design doc
- ctx-08-001-a1: Sonnet, 3m42s, wrote Notion page
### 00:00 — [COMPACTION]
- Active contexts at compaction: project-voxbench, stukennedy-com# Job Search — Status
**Last Updated:** 2026-02-07 18:00
## Active
- **Paradigm Talent** — Staff SWE, £140-220k, remote UK
- Status: CV sent, awaiting response
## Next Actions
- [ ] Follow up if no response by Feb 10# Job Search Thread
## Active Since: 2026-02-06
### Latest (2026-02-07)
**User:** Any updates on the Paradigm role?
**Agent:** Anthony McCabe received your LinkedIn message. No response yet.
### Earlier Context
- SwitchUp: €120K max, gap too large{
"version": 1,
"contexts": {
"<name>": { "name": "Display Name", "color": "#hex", "created": "ISO", "lastActive": "ISO", "status": "active|dormant" }
},
"events": [
{ "id": "ctx-08-001", "type": "context_switch", "context": "<name>", "trigger": "user_message", "timestamp": "ISO", "summary": "..." },
{ "id": "ctx-08-001-a1", "type": "agent_spawn", "parentId": "ctx-08-001", "model": "...", "task": "...", "durationMs": 0, "result": "ok", "artifacts": [] },
{ "id": "ctx-07-015", "type": "compaction", "timestamp": "ISO", "activeContexts": ["project-x", "job-search"] }
]
}8d2a2a1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.