Skip to content

Pause, export, purge

Terminal window
agent-mem pause --for 2h # 30m, 2h, 1d …
agent-mem pause # until resume
agent-mem resume

While paused nothing is recorded in any project. Recall keeps working: briefings, matches and MCP tools still read the memory. The session panel says Recording paused until 00:13. agent-mem resume turns it back on.

Terminal window
agent-mem export --output memory.json
agent-mem export --project ~/code/calc --output calc.json

One JSON file, readable only by you:

{
"version": 2,
"exported_at": "2026-10-13T20:13:06.157Z",
"projects": [ … ],
"sessions": [ … ],
"turns": [ {"id": 1, "prompt": "…", "answer": "…", "outcome": "ok", "files_json": "[\"calc.py\"]", … } ],
"memories": [ {"id": 2, "kind": "decision", "title": "…", "body": "…", "trust": "agent", "invalid_at": null, … } ],
"recipes": [ … ],
"rules": [ … ],
"profile": [ … ]
}

Retired memories are included with their invalid_at and superseded_by. Tool events are not.

Deletes for good: from the database, the search index, the vectors, the spool and quarantine, and (on the next observer run) the fact index.

CommandDeletes
agent-mem purge --id T12one request, its events, the facts and lessons drawn from it, and its session’s summary
agent-mem purge --id M3one memory
agent-mem purge --project ~/code/calceverything of that project (give its root folder)
agent-mem purge --before 2026-01-31everything older than the date
agent-mem purge --allthe database, spool, quarantine and logs; config.json and models stay

Add --yes in scripts; a terminal asks first, a script without --yes is refused:

$ agent-mem purge --all
Refusing to delete ALL agent-mem data without --yes.

After a purge the database is vacuumed so the deleted text is not left in free pages. An offline snapshot page written by agent-mem view --output is discarded too.