Quickstart
Connect to a memory in your account, store a fact, and read it back, using curl or MCP.
This takes about a minute. You need curl and a memlane account (you can create one in step 1). Examples use a POSIX shell. In PowerShell, set the variable with $env:MEMLANE_KEY = "om_...".
1. Get a key
Ask to connect. This needs no key:
curl -s -X POST https://api.memlane.sh/v1/connect -H 'content-type: application/json' -d '{"name":"my-script"}'{
"device_code": "omd_...",
"user_code": "WDJB-MJHT",
"verification_uri_complete": "https://api.memlane.sh/connect?code=WDJB-MJHT",
"interval": 5,
"expires_in": 600
}Open verification_uri_complete in a browser. Sign in, or create an account (an email and a password). Pick a memory, or start a new one, and approve. Then collect the key:
curl -s -X POST https://api.memlane.sh/v1/connect/token -H 'content-type: application/json' -d '{"device_code":"omd_..."}'{
"space_id": "sp_...",
"member_id": "mb_...",
"name": "my-script",
"role": "owner",
"api_key": "om_...",
"next": "Send the key as 'Authorization: Bearer <api_key>'. Start with GET /v1/context ..."
}Before you approve, this returns authorization_pending: run it again. The key is shown once. Only a hash of it is stored, so it cannot be shown again. Keep it somewhere safe, such as an environment variable:
export MEMLANE_KEY="om_..."Lost it? Connect again: you pick the same memory from your account. See Accounts.
Connecting an app that signs in with OAuth (ChatGPT, claude.ai, Claude Desktop, Claude Code, Cursor, Grok)? It needs no key: it signs in and you pick the memory there.
A new memory's timezone comes from your browser. It decides what "today" means for the journal and when nightly dreaming runs. Change it with PATCH /v1/space.
2. Remember a fact
Send the key as Authorization: Bearer <key> (or X-API-Key: <key>):
curl -s -X POST https://api.memlane.sh/v1/memories \
-H "Authorization: Bearer $MEMLANE_KEY" \
-H 'content-type: application/json' \
-d '{"subject":"Sam","text":"Prefers code reviews on Thursdays","origin":"user","tier":"core"}'The response is 201 with {"memory": {...}, "created": true}. Sending the same subject and text again returns the existing fact with 200 and "created": false.
3. Recall it
curl -s "https://api.memlane.sh/v1/memories?q=thursday" \
-H "Authorization: Bearer $MEMLANE_KEY"Recall finds facts by their words and by their meaning, best matches first. Word search is case- and accent-insensitive, works in any script, and matches prefixes (thurs finds "Thursdays"). Meaning search (English) also finds facts that share no words with the question, so q=when does Sam like meetings finds the same fact once the vector index catches up, usually about two minutes after it is stored. The response's search field says which ran.
See everything it stored
Leave out q to list every fact, with who wrote it (origin):
curl -s "https://api.memlane.sh/v1/memories?limit=100" -H "Authorization: Bearer $MEMLANE_KEY"The response has total, and next_cursor when there's another page: pass it as cursor. Facts that were replaced or have expired aren't listed. GET /v1/export includes them.
4. Load context at the start of a run
curl -s "https://api.memlane.sh/v1/context" -H "Authorization: Bearer $MEMLANE_KEY"One bounded read returns pinned and core facts, due records, open actions, the recent journal, the latest weekly digest, and the last dream report. See Concepts.
Or connect over MCP
Point any MCP client that supports Streamable HTTP at https://mcp.memlane.sh with the header Authorization: Bearer <key>. For Claude Code:
claude mcp add --transport http memlane https://mcp.memlane.sh \
--header "Authorization: Bearer $MEMLANE_KEY"Then ask the agent to call get_context. Guides for other clients are under Agent guides.
This lists four tools: get_context, remember, recall, and forget. To list all 43, add ?tools=all to the URL. Chat apps use ?tools=chat, which lists twelve.
Next
- Agent quickstart: let your agent do all of this itself.
- Concepts: what else a space holds.
- Your own OpenAI key: your own allowance for meaning search, billed to you.
- API reference and MCP tools.
Overview
The easiest memory setup, for any agent. One account for all your agents, no LLM on our side, and you can see exactly what it stored.
Agent quickstart
A copy-paste prompt that makes your agent connect to a memory in your account, store its key safely, and use memory on every task. Works for coding agents, personal agents and bots, and chat apps like ChatGPT, Claude, and Grok.