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.

Pillar What it covers Spec reference
Detection 25+ PII patterns plus optional ML NER, fail-closed under scanner errors 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, semantic search, auto-extraction with PII rescan on injection, federated cross-brain sharing API Reference
Visibility Audit log with SHA-256 hash chain, encrypted PII mapping, GDPR export + right-to-erasure, alert engine (webhook + Slack), Prometheus /metrics 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), full MCP governance Configuration
Trust Multi-tenant isolation across cache / MCP registry / audit / knowledge, RBAC, OIDC SSO + SCIM, peppered API-key hashing, atomic key rotation 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 Mode Multi-actor coordination — JIT team context, queue + agent SDK, pinned threads, task coordination
MCP Governance Model Context Protocol proxy + policy enforcement