Skip to main content
← Back to Help Center

How Unimatrix Works

Unimatrix treats memory as an intelligence pipeline rather than a simple database write. This page details how context flows from AI clients into persistent memory and back.

The 7-Step Memory Pipeline

When an AI client or user sends context to Unimatrix, it passes through 7 distinct pipeline stages:

1. CAPTURE — Ingest via MCP, Browser Extension, REST, Tool Calls, or Mobile.
2. UNDERSTAND — Normalize and extract atomic fact triples.
3. ORGANIZE — Categorize into canonical Spaces → Locations.
4. RESOLVE — Cross-check against Veritas graph for contradictions.
5. ENCRYPT & STORE — Persist with AES-256-GCM encryption at rest.
6. RETRIEVE — Run hybrid vector (pgvector) + keyword (tsvector) search.
7. DELIVER — Format and inject relevant memory payload into the AI client.

1. Capture

Context enters Unimatrix explicitly. In MCP clients (Claude Desktop, Cursor, Windsurf, Continue, VS Code), AI assistants invoke tools like unimatrix_store_memory. In web LLMs, the Manifest V3 browser extension captures highlighted text. Custom agents use the Fastify REST endpoints.

2. Understand

Raw transcripts are processed by the Librarian Intelligence Engine. It extracts atomic semantic triples (Subject → Predicate → Object), generates summaries, and calculates confidence scores. Local HuggingFace ONNX embeddings (BGE-small) create 384-dimensional vector representations.

3. Organize

Memories are assigned to hierarchical containers: Spaces → Locations → Memories. This prevents domain context from bleeding between unrelated projects.

4. Resolve

The Veritas Lineage Graph uses Dempster-Shafer belief mass tracking to compare new facts against existing beliefs. If a fact contradicts previous entries, belief mass shifts without erasing historical lineage.

5. Encrypt & Store

Memory content is encrypted at rest using application-layer AES-256-GCM with per-record HKDF key derivation and stored in PostgreSQL with pgvector. Dashboard composer memories can optionally be encrypted client-side in your browser.

6. Retrieve

When a query is received, Unimatrix executes hybrid retrieval: semantic vector search over pgvector, full-text keyword search over PostgreSQL tsvector, and graph traversal over Veritas belief edges. Results are re-ranked using adaptive reliability-weighted temporal decay (ARTD).

7. Deliver

The formatted memory payload is delivered back to the requesting AI client via MCP streamable-http, extension overlay, or REST API response.

Glossary of Technical Terms

Memory

One saved piece of context — a fact, a decision, a preference, a snippet of a conversation. The atomic unit of memory in Unimatrix.

Space

A top-level container that groups related memories, usually one per project, organization, or domain.

Location

A themed directory or semantic container inside a Space (e.g., "Architecture Decisions", "API Specifications").

Context

Everything an AI needs to know to be useful in a session. Unimatrix dynamically retrieves relevant context so you do not have to copy-paste background information.

The Librarian / Intelligence Engine

The background process that normalizes, decomposes, categorizes, and cross-checks memories against past beliefs.

Veritas Lineage Graph

The Dempster-Shafer belief tracking graph that tracks evidence for/against facts and preserves historical supersession chains.

Embedding

A numeric vector representation of text meaning. Unimatrix uses local HuggingFace ONNX embeddings (BGE-small) for fast vector retrieval in pgvector.

MCP

Model Context Protocol — an open standard enabling AI clients (Claude Desktop, Cursor, Windsurf, Continue) to invoke memory tools directly.