Memory infrastructure
for AI agents
Store facts, decisions, and context as memories. Retrieve them later — semantically, across graph edges, not just by keyword. Works with any LLM stack.
Direct HTTP from any language or curl. Best for custom integrations, scripts, and backend services.
Local server exposing memory as MCP tools. Works natively in Cursor, Claude Code, and Agno.
Auto-recall before every AI turn and auto-capture after. Install once, never think about memory again.
Agentic API guide
One Markdown file: HTTP auth, async jobs, search modes, regex tag scoping, tool wrappers, and copy-ready prompts for LangChain, Vercel AI SDK, AutoGen, or your own stack.
curl blocks use bash style (line breaks with \). The HTTP API is the same on every OS — only the shell differs. PowerShell: $env:MEMBRAIN_API_KEY="mb_live_..." · CMD: set MEMBRAIN_API_KEY=mb_live_... · Or use Git Bash / WSL for copy-paste identical to macOS/Linux, or run curl as a single line (no \).Sign in to the Mem-Brain access portal and create a key. Keys start with mb_live_.
curl -X POST https://mem-brain-api-cutover-v4-production.up.railway.app/api/v1/memories \
-H "X-API-Key: mb_live_xxx" \
-H "Content-Type: application/json" \
-d '{"content": "User prefers dark mode", "tags": ["type.preference", "domain.ui"]}'202 Accepted with a job_id. The playground below polls it automatically.curl -X POST https://mem-brain-api-cutover-v4-production.up.railway.app/api/v1/memories/search \
-H "X-API-Key: mb_live_xxx" \
-H "Content-Type: application/json" \
-d '{"query": "What UI preferences does this user have?", "k": 5, "response_format": "interpreted"}'response_format: "interpreted" to get a plain-language LLM summary — inject directly into a system prompt.CRUD, search, polling, and graph exploration in one place
Paste your API key once, then create memories, poll ingest jobs, run graph operations, and inspect your own graph live.
X-API-Key.curl -X POST https://mem-brain-api-cutover-v4-production.up.railway.app/api/v1/memories \
-H "X-API-Key: mb_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark mode and keeps notes in Obsidian",
"tags": [
"type.preference",
"domain.workflow"
],
"category": "user-prefs"
}'Run an operation to see the live response here.Click a node or edge to inspect it. The latest created memory is highlighted in green when present.
The key concepts behind storage and retrieval
Every memory is embedded and stored as a node in a knowledge graph. Related memories are linked automatically at write time.
Search combines vector similarity with graph traversal — so related memories surface even when the wording doesn't match.
Tag memories with dot-separated keys like type.preference or domain.ui to filter results and scope searches precisely.
POST /memories returns 202 with a job_id. Poll the job until completed — or let the MCP client handle polling for you.
{
"content": "Project uses Turborepo + pnpm workspaces",
"tags": ["type.project-config", "tech.turborepo"],
"category": "project"
}Download the full Markdown — tools, prompts, HTTP examples.
All endpoints, request shapes, and response formats.
Use Mem-Brain as tools inside your AI coding environment.
Persistent memory inside OpenCode with zero manual wiring.