> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mem0

> Mount scoped Mem0 Platform memories as JSON files from Node or the browser.

`Mem0VFS` is a browser-safe, read-only view of one Mem0 user, agent, or run scope. Every memory is rendered as `<memory-id>.json`; `search` performs semantic search in that same scope.

<Warning>
  Mem0 API keys are secrets. Use this VFS from Node or another trusted runtime; do not embed a Platform API key in a public browser bundle. Browser applications should call a server-side proxy instead.
</Warning>

```ts theme={null}
import { Mem0VFS, MountMode, Workspace } from '@struktoai/mirage-node'

const memories = new Mem0VFS({
  apiKey: process.env.MEM0_API_KEY!,
  userId: 'alex',
})

const ws = new Workspace({ '/memories': memories }, { mode: MountMode.READ })
await ws.shell('ls /memories/')
await ws.shell('search --top-k 5 "quarterly planning" /memories/')
```

Exactly one of `userId`, `agentId`, or `runId` is required.

| Field | Default | Notes |
| - | - | - |
| `apiKey` | required | Mem0 Platform API key. Redacted in snapshots. |
| `host` | `https://api.mem0.ai` | Mem0 API base URL. |
| `userId`, `agentId`, `runId` | one required | Scope filter applied to listing and search. |
| `defaultPageSize` | `100` | Page size while listing memories. |
| `defaultSearchLimit` | `10` | Default semantic result count. |

The TypeScript VFS mirrors the [Python Mem0 VFS](/python/vfs/mem0), including pagination, JSON rendering, score formatting, path-limited search, and `--threshold`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.