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 agentId or runId instead of userId. host (default https://api.mem0.ai) points at another Mem0 API host.

Fields

number
default:"DEFAULT_TIMEOUT"
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.
string
required
secret
Mem0 Platform API key.
string
default:"'https://api.mem0.ai'"
Mem0 API base URL.
string
default:"null"
Mount this user’s memories. Set exactly one of userId, agentId and runId.
string
default:"null"
Mount this agent’s memories. Set exactly one of userId, agentId and runId.
string
default:"null"
Mount this run’s memories. Set exactly one of userId, agentId and runId.
number
default:"100"
Memories fetched per request while listing the scope.
number
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 userId, agentId and runId 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 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.
  • grep: grep and rg search the JSON that cat prints, so a match can come from metadata such as categories and timestamps.
  • Freshness: the first ls fetches every memory in the scope, and reads reuse it until the cache expires. search always asks Mem0.
The search CLI runs Mem0’s semantic search in the same scope. Register it on the workspace before ws.close():
--top-k defaults to defaultSearchLimit (10). --threshold is between 0 and
  1. Each hit prints its file and score, then the memory, ranked by score.

Browser

The same Mem0VFS runs in the browser from @struktoai/mirage-browser.
  • A Mem0 API key is a secret. Never put a Platform key in a public browser bundle; a browser app calls a server-side proxy instead.

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.