Skip to main content
Mem0VFS mounts the memories of one Mem0 scope, a user, an agent or a run, read-only. Each memory is one <memory_id>.json file. Set up the API key and the scope as in Mem0 setup.

Install

Configure

An agent or run scope sets agent_id or run_id instead of user_id. host (default https://api.mem0.ai) points at another Mem0 API host.

Fields

float
default:"30"
Seconds a request may wait to connect, or between two reads of its answer, before it fails; a download that keeps flowing is never cut off.
str
required
secret
Mem0 Platform API key.
str
default:"'https://api.mem0.ai'"
Mem0 API base URL.
str
Mount this user’s memories. Set exactly one of user_id, agent_id and run_id.
str
Mount this agent’s memories. Set exactly one of user_id, agent_id and run_id.
str
Mount this run’s memories. Set exactly one of user_id, agent_id and run_id.
int
default:"100"
Memories fetched per request while listing the scope.
int
default:"10"
How many results search returns unless the line sets top_k.
Fields marked secret are redacted in snapshots.

Authentication

The mount sends a Mem0 Platform API key, created on the dashboard’s API Keys page; the organization and project come from the key. Exactly one of user_id, agent_id and run_id is set. A pair is refused: Mem0 splits a memory added with both into separate memories, so a combined filter matches nothing.

Layout

The tree is flat: one file per memory in the scope, named by memory id. A file holds the full record, memory, categories, metadata, created_at, updated_at, structured_attributes and the rest:

Behavior

  • Read-only: no command changes the memories.
  • Times: stat reports updated_at, or created_at when unset, as the modified time, and shows both.
  • grep: grep and rg search the JSON that cat prints, so a match can come from metadata such as categories and timestamps. Plain grep needs -r or a glob on the mount; rg recurses by default.
  • Freshness: the first ls fetches every memory in the scope, and reads reuse it until the cache expires. search always asks Mem0.
  • Snapshots: a snapshot keeps the config, and loading it needs the mount handed back through mounts=.
The search CLI runs Mem0’s semantic search in the same scope. Register it on the workspace before ws.close():
--top-k defaults to default_search_limit (10). --threshold is between 0 and 1. Each hit prints its file and score, then the memory, ranked by score:

VFS.md

The VFS.md an agent reads with Mem0 mounted at /<path>.
Virtual FilesystemVFS Layout/<path>
Supported Unix Commands for VFSUnix commands work on each path as on a local filesystem, as far as the path supports them:Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.