Architecture

Local-first memory,
on your machine.

Cogitent sits between your AI host and a database you control. Memory is stored and processed locally; recalled context is shared only with the AI host you choose. Nothing about the memory layer requires a cloud round-trip.

The stack, top to bottom

Four layers. The host you already use speaks the Model Context Protocol to Cogitent's server; the substrate does the cognitive work; Postgres is the authoritative, append-only store on your own disk.

AI hosts

Claude Desktop, Claude Code, Codex CLI, OpenCode, VS Code Copilot Chat — MCP-compatible AI hosts and major providers.

MCP server

cogitent-mcp exposes store, recall, and inspect over stdio + HTTP. One server, every host.

Substrate

Episodic store, five-axis salience, sleep-based consolidation, and the governance gate on every read.

Postgres + pgvector

The authoritative, append-only symbolic memory — on your machine, under your row-level security.

The data boundary

The whole substrate runs where you run it. Episodes — the atomic units of memory: text, provenance, salience, embeddings — are written to your local Postgres and never centralized.

Memory is stored and processed locally; recalled context is shared only with the AI host you choose. When your agent asks to recall, the context that surfaces travels to that host and no further. There is no Cogitent cloud in the loop, no third-party memory service, no cross-border transfer of your memories.

The symbolic substrate is authoritative. Learned models enrich retrieval but never overwrite what you stored, and raw memories never leave their owner.

What the substrate does

Cogitent is not a vector database with a fact-extraction prompt bolted on. It is a cognitive memory layer that continuously reorganizes what it holds.

Episodic store

Every interaction becomes an episode with provenance and embeddings. Episodes survive across sessions, workspaces, and host restarts.

Five-axis salience

Importance, urgency, novelty, confidence, and affect weigh what surfaces first — the Affective Context Packet attached to each recall.

Sleep-based consolidation

A background cogitent-sleep daemon replays, decays, and consolidates memories between sessions — the primary learning mechanism.

Governance overlay

Per-memory use-class, sensitivity, and sharing rules held in append-only overlay tables and enforced by one fail-closed gate on every read surface. A memory is evidence by default; promoting it to instruction-grade takes an explicit human confirmation. Ships off by default, with a shadow mode for sizing the blast radius first.

Surprise signal observable but inert

The substrate derives a prediction-error signal during sleep. It is recorded and inspectable, and it currently influences nothing — every consumer is separately gated. The latent ranking layer we set out to build did not clear its pre-registered bar; the roadmap records the three NO-GOs.

How recall resolves

Recall runs on two observable paths — a fast System 1 cache and a hybrid System 2 retrieval that blends pgvector similarity with reranking. Every result is explainable: you can inspect why a memory surfaced.

<1 ms
Cache-hit recall
<50 ms
Semantic recall, p50

See the benchmarks methodology for how retrieval quality is measured, and the numbers we do and don't claim.

Scaling to a team

The same substrate runs as a self-hosted, multi-tenant deployment (shipped in v2): row-level security, tenant isolation, and hosted MCP over a shared Postgres — still on infrastructure you control, with full self-host always supported.