Skip to content
Documentation

From empty project to an agent that remembers, in four minutes

Mnemo is six REST endpoints with SDKs on top. This page covers the install, the two calls you will use constantly, and the concepts worth knowing before you go to production.

Quickstart

Install the client, set your key, write one memory, read it back. That is the whole loop.

  1. 1Install the client

    terminal
    npm install @mnemo/sdk # orpip install mnemo
  2. 2Set your API key

    terminal
    # Every request is authenticated with a single bearer token.# Keep it server-side. Public keys are scoped read-only. export MNEMO_API_KEY="mk_live_9f2c...c41d"
  3. 3Write your first memories

    Text, a file or a URL all go to the same place. Mnemo picks the parser, chunks the content and extracts entities before it embeds anything.

    ingest.ts
    // Text, a file buffer or a URL. Mnemo picks the right parser.await mnemo.add({    scope: "team_acme",    content: "Q3 roadmap: ship shared memory, then the audit log.",    source: "notion/roadmap-q3",    tags: ["roadmap", "planning"]}) await mnemo.addUrl({    scope: "team_acme",    url: "https://acme.com/changelog"}) await mnemo.addFile({    scope: "team_acme",    file: contractPdf,    filename: "vendor-agreement.pdf"})
  4. 4Recall inside your model call

    Ask in plain language and set a token budget. Mnemo returns ranked, deduplicated memories that already fit the space you gave it.

    recall.ts
    const { memories, latencyMs } = await mnemo.recall({    scope: "team_acme",    query: "what did we promise the vendor about uptime?",    limit: 8,    tokenBudget: 1200,    filters: { tags: ["contract"], after: "2026-01-01" }}) // Drop straight into your prompt, citations includedconst context = memories    .map((m) => "[" + m.source + "] " + m.content)    .join("\n")

Core concepts

Four ideas cover almost everything you will run into.

Scope
The boundary a memory lives in. A scope is usually a user, a team or an agent. Recall never crosses a scope unless you explicitly ask it to, which is what keeps one customer's context out of another's answers.
Memory
A single durable fact, passage or event, with its embedding, entities, confidence and source. Long documents become many memories that stay linked to the original file.
Provenance
Where a memory came from: the file, the URL, the channel, the author and the exact span. Every recall result carries it, so citations and audits are free.
Decay
The weight a memory loses over time when nothing reconfirms it. Decay is why a price quoted last March stops outranking the one quoted last week.

API reference

Base URL https://api.mnemo.dev. All requests take and return JSON.

  • POST/v1/memoriesWrite a memory from text, a file or a URL.
  • POST/v1/recallRetrieve ranked, cited memories for a natural language query.
  • GET/v1/memories/:idFetch a single memory with its full provenance chain.
  • POST/v1/scopes/:scope/forgetDelete a scope everywhere, including the vector index.
  • GET/v1/graphTraverse entities and relationships extracted from memories.
  • POST/v1/exportStream every memory and embedding as newline-delimited JSON.

SDKs

First-party clients with typed responses, retries and streaming recall built in.

TypeScript

npm install @mnemo/sdk

Node, Bun, Deno and edge runtimes.

Python

pip install mnemo

Sync and async clients, 3.9 and up.

MCP server

npx -y @mnemo/mcp

Works with any MCP-compatible client.

MCP server

Add this to any MCP client and the assistant gains memory with no code at all. It exposes four tools.

mcp.json
{  "mcpServers": {    "mnemo": {      "command": "npx",      "args": ["-y", "@mnemo/mcp"],      "env": {        "MNEMO_API_KEY": "mk_live_your_key_here",        "MNEMO_SCOPE": "user_8f21"      }    }  }}
  • mnemo_rememberWrite what the conversation just established.
  • mnemo_recallRetrieve ranked, cited context for the current turn.
  • mnemo_forgetDrop a memory or an entire scope on request.
  • mnemo_graphWalk entities and relationships around a subject.

Ready to run it for real? Grab a key and the free plan covers ten thousand memories.

Get your API key
Made with Modulify