Skip to main content
The Mem0 resource exposes the memories of a single scope — a user_id, agent_id, or run_id — as JSON files mounted at a prefix such as /memory/. Each memory is one file named <memory_id>.json. For API key setup, see Mem0 Setup.

Config

The resource is read-only and does not support snapshots. Set exactly one of user_id, agent_id, or run_id (see Setup).

Filesystem Layout

The tree is flat: the mount root lists one <memory_id>.json file per memory in the configured scope.
cat returns the full memory JSON, including memory, categories, metadata, created_at, updated_at, and structured_attributes:
stat reports updated_at (falling back to created_at) as the modified time and exposes both timestamps.

Reading Memories

grep and rg search the JSON files

grep and rg follow normal filesystem semantics and search the same JSON bytes that cat returns. A match can therefore come from the memory text or from metadata such as categories and timestamps. Because the mount is a directory, plain grep needs -r (or a glob); rg recurses by default:
The search command calls Mem0’s semantic search API within the configured scope. Use it when meaning matters more than exact text.
top-k defaults to default_search_limit (10). threshold must be between 0 and 1. Results are emitted one hit per block, ranked by score:

Cache

The resource uses Mirage’s index cache for the virtual tree. The first ls fetches the scope’s memories (following Mem0 pagination) and primes the cache; read commands reuse the cached metadata and rendered bytes until the cache expires or the workspace is recreated. search always calls the Mem0 API directly and is not cached.

Example

Shell Commands