Install
openclaw skills install letheUse Lethe persistent memory for startup orientation, recall, logging, flags, and session compaction.
openclaw skills install letheLethe is the primary long-term memory source. Prefer it over memory files, scratch pads, and the Library for prior decisions, open work, flags, and user/project context.
The plugin handles bootstrap, context assembly, and automatic session events. This skill covers explicit orientation, search, recording, flags, compaction, and recovery.
On the first real user message of a session, orient before answering:
curl -s "http://localhost:18483/api/sessions/${SESSION_KEY}/summary"
curl -s "http://localhost:18483/api/flags"
Use the results to answer:
SESSION_KEY should be injected by the plugin. If it is empty or returns 404, create a new session and use the returned session_id only for the current session:
curl -s -X POST "http://localhost:18483/api/sessions" \
-H "Content-Type: application/json" \
-d '{"agent_id": "archimedes", "project_id": "default"}'
Never hardcode session IDs or query routes without /api.
Search Lethe before answering when the user asks about prior work, decisions, preferences, status, open threads, or says things like "remember", "did we", "what was", "last time", or "log this".
curl -s "http://localhost:18483/api/events/search?q=<terms>&limit=10" | jq '.events[] | {event_type, content, created_at}'
curl -s "http://localhost:18483/api/sessions/${SESSION_KEY}/events?limit=20"
If search finds the answer, cite the recorded event plainly. If not, broaden the search once; after that say it is not in memory. Do not invent prior context.
Use lethe-log for durable events:
~/.openclaw/workspace/skills/lethe-memory/lethe-log record "Decision: use X because Y"
~/.openclaw/workspace/skills/lethe-memory/lethe-log log "Fixed: X failed because Y; changed Z"
~/.openclaw/workspace/skills/lethe-memory/lethe-log flag "Risk: X may fail if Y changes"
~/.openclaw/workspace/skills/lethe-memory/lethe-log task "Deploy v2" --status done
Record immediately after:
Use event types this way:
record: decisions, conclusions, commitmentslog: fixes, discoveries, status updates, completed workflag: unresolved risk or uncertainty needing human reviewtask: durable work item stateDo not record casual chat, secrets, raw credentials, or routine facts with no future value. If sensitive data is accidentally logged, delete it through the API or UI.
Check unresolved flags at startup and before continuing old work:
curl -s "http://localhost:18483/api/flags" | jq '.'
Surface relevant unresolved flags to the user. When a flag is resolved, log the resolution; the original flag remains historical.
Compact when a session has many events, the summary is stale before a long continuation, or you are closing out significant work:
curl -s -X POST "http://localhost:18483/api/sessions/${SESSION_KEY}/compact"
Compaction writes a narrative summary and may prune old raw events. It does not erase the summary; the plugin prepends it on later resumes.
curl --max-time 3; if still down, continue without memory and flag/log when Lethe is reachable again.LETHE_API unset unless the user explicitly asks; setting it can send memory data off-host.curl -s "http://localhost:18483/api/sessions/${SESSION_KEY}/summary"
curl -s "http://localhost:18483/api/flags"
curl -s "http://localhost:18483/api/events/search?q=<terms>&limit=10"
curl -s -X POST "http://localhost:18483/api/sessions/${SESSION_KEY}/compact"
open http://localhost:18483/ui/