Skip to content

MemBrain — The Cognitive Layer for AI

Memory, judgment, threat detection, and recall — the brain functions your LLMs are missing.

MemBrain is a self-hosted cognitive layer that sits between your applications and LLM providers. It gives you full visibility and control over every AI interaction — without changing a line of code.

What MemBrain does — the seven pillars

This is the canonical feature taxonomy. Every other doc in this site maps back to these pillars; if a feature isn't covered by one of them, it isn't shipped.

The community build is licensed under Apache 2.0. Features marked ★ Enterprise require a licensed add-on.

Pillar What it covers Spec reference
Detection 25+ PII patterns, fail-closed under scanner errors. Optional ML NER (BERT-based) with hybrid regex + NER mode — ★ Enterprise. Configuration
Enforcement Six policy modes (pass / log / alert / redact / block / confirm), tool-policy fnmatch globs, human-in-the-loop approval Configuration
Memory Knowledge store on pgvector with semantic search; saved and reflected entries land pending and private, and require human approval and an explicit owner share before teammates see them, with attribution; PII rescan on injection API Reference
Visibility Audit log with a tamper-evident HMAC-SHA256 hash chain, encrypted PII mapping, GDPR export + right-to-erasure, Prometheus /metrics. Alert engine (webhook + Slack) — ★ Enterprise. API Reference
Routing Multi-provider (Anthropic, OpenAI, Claude CLI, Ollama, LiteLLM 100+ models), tier / cost / privacy-based, fallback chains, exact + semantic response cache Providers
Coverage Three ingress modes — application proxy, transparent network proxy (TLS termination + SNI). MCP governance — ★ Enterprise. Configuration
Trust Multi-tenant isolation across cache / MCP registry / audit / knowledge, RBAC, peppered API-key hashing, atomic key rotation. OIDC SSO + SCIM — ★ Enterprise. API Reference

Quick Start

curl -fsSL https://membrn.ai/install.sh | bash

Point your AI client at MemBrain:

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8001/v1")
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}]
)

See the Quickstart Guide for full setup instructions.

Documentation

Section Description
Quickstart Get up and running in 5 minutes
Configuration All settings and environment variables
API Reference Complete endpoint documentation
Providers Supported AI providers and routing
Python SDK Drop-in OpenAI SDK replacement
Team knowledge sharing Two-gate model — saved and reflected entries land pending and private; a human approves, then the owner explicitly shares with the team; shared entries carry owner attribution