Skip to main content

What is Membrane?

Membrane gives long-lived LLM agents structured, revisable memory with built-in decay, trust-gated retrieval, and audit trails. Instead of an append-only context window or flat text log, agents get typed memory records that can be consolidated, revised, contested, and pruned over time. Most LLM/agent “memory” is either ephemeral (context windows that reset each turn) or an append-only text log stuffed into a RAG pipeline. That gives you retrieval, but not learning: facts get stale, procedures drift, and the system cannot revise itself safely. Membrane makes memory selective and revisable. It captures raw experience, promotes it into structured knowledge, and lets you supersede, fork, contest, or retract that knowledge with evidence. The result is an agent that can improve over time while remaining predictable, auditable, and safe.

Mental model

1

Ingest

Capture events, tool outputs, observations, and working state as episodic memory records.
2

Consolidate

Background jobs promote episodic traces into semantic facts, competence records, and plan graphs.
3

Retrieve

Query memory in layers with trust gating and salience ranking — agents only see what they’re allowed to see.
4

Revise

Update knowledge with explicit operations (supersede, fork, merge, contest, retract) and a full audit trail.
5

Decay

Salience decreases over time unless reinforced by success, keeping memory lean and relevant.

Key features

Typed memory

Five distinct memory types (episodic, working, semantic, competence, plan_graph) with explicit schemas and lifecycle rules — not a flat text store.

Revisable knowledge

Supersede, fork, retract, merge, and contest records with full provenance tracking and audit trails.

Competence learning

Agents learn how to solve problems — procedures with success rate tracking — not just what happened.

Trust-aware retrieval

Sensitivity levels (public, low, medium, high, hyper) with graduated access control and redacted responses.

Decay and consolidation

Time-based salience decay keeps memory useful; background consolidation extracts structured knowledge from raw experience.

Vector-aware retrieval

With Postgres + pgvector, competence and plan-graph applicability are scored with embedding similarity.

gRPC API

15-method gRPC service with TypeScript and Python client SDKs, or use Membrane as an embedded Go library.

Security and operations

SQLCipher encryption at rest, optional TLS, API key authentication, configurable rate limiting, full audit logs.

Deployment tiers

Membrane scales from a zero-infrastructure SQLite default to a full Postgres + pgvector + LLM pipeline:
TierBackendEmbeddingLLMBehavior
1SQLiteZero-infra default, confidence-based applicability fallback
2PostgresConcurrent writers, JSONB storage, same retrieval semantics as tier 1
3Postgres + pgvectorYesEmbedding-based applicability scoring for competence and plan_graph selection
4Postgres + pgvectorYesYesFull system with LLM-backed episodic to semantic extraction

Get started

Quickstart

Build and run Membrane in under 5 minutes.

Architecture

Understand how the subsystems fit together.

Memory types

Learn the five memory types and their lifecycle rules.

Go library

Embed Membrane directly in your Go application.

Build docs developers (and LLMs) love