Usage
machine-memory history <id> (--local|--remote) [--limit <n>] [--offset <n>]
machine-memory restore <id> --revision <revision_id> --expected-update-count <n> (--local|--remote)History
history lists previous revisions of a memory, newest first.
Each update automatically saves a complete snapshot of the previous memory row, including its content, metadata, attribution, and timestamps.
machine-memory history 42 --remoteThe response includes:
results: List of historical revisions, each containing itsrevision_id,snapshot_at, and previous metadata.current_update_count: The current update count of the live memory, used when restoring.- Pagination fields:
count,total_count,offset,limit, andhas_more.
Historical revisions are text records and are not indexed for search.
Restore
restore reverts an existing memory to a previous revision in place, preserving its ID and repository.
machine-memory restore 42 --revision 123 --expected-update-count 5 --remoteProvide the revision_id and the memory’s current_update_count (obtained from history). If the memory was modified concurrently and the count does not match, the restore is rejected.
When restored:
- The content and metadata revert to the selected snapshot.
- The memory’s
update_countincrements, and the state prior to restoration is saved as a new snapshot so the restore can be undone. - If the restored memory is active, it is automatically re-embedded for search.
Deleting a memory permanently purges all of its history snapshots; restore cannot recover deleted memories.
Output flags
Both commands accept --brief, --json-min, and --quiet for compact machine-readable output.