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.

v1Auth: X-API-Key
User Preferences

User prefers dark mode and uses VSCode

user-prefs
type.preferencedomain.ui
Project Setup

Project uses Turborepo + pnpm workspaces

project
Auth Flow

Auth flow uses JWT with refresh tokens

architecture
Ways to use Mem-Brain

Get started in 3 steps

1
Set your API key
Sign in to the Mem-Brain access portal and create a key. Keys start with mb_live_.
bash
export MEMBRAIN_API_KEY="mb_live_xxx"
2
Store a memory
bash
curl -X POST https://api.mem-brain.io/api/v1/memories \\  -H "X-API-Key: $MEMBRAIN_API_KEY" \\  -H "Content-Type: application/json" \\  -d '{"content": "User prefers dark mode", "tags": ["type.preference", "domain.ui"]}'
Returns 202 Accepted with a job_id. The playground below polls it automatically.

How it works

prefuiauthconfigstack

Semantic storage

Every memory is embedded and stored as a node in a knowledge graph. Related memories are linked automatically at write time.

Agentic API Guide

One Markdown file: HTTP auth, async jobs, search modes (including scope, rerank, full_scope), tool wrappers, and copy-ready prompts for LangChain, Vercel AI SDK, AutoGen, or your own stack.

Download .md