traqr.dev·working document·sheet 02 — memory

A memory database for coding agents.

TraqrDB is the piece I built first and the piece everything else leans on. Agents store what they learn while they work — bug root causes, conventions, your preferences — and load it back before the same mistake happens twice. It’s a schema and twelve MCP tools on top of your Postgres. No service, no account; nothing leaves your database.

packagetraqr-memory-mcp
version0.2.22 · checked 2026-06-10
protocolMCP
storageyour Postgres 15+ · pgvector
clientsClaude Code · Cursor · Codex
embeddings5 providers, or BM25-only
licenseMIT, open source
costfree

§ 00·the loop

Store. Search. Context.

The three calls an agent makes most. A gotcha goes in mid-session as a one-liner; weeks later a different agent asks a vague question and gets it back, ranked and cited.

fig. 1 — the shape of each call. Illustrative session; the tool output format is the real one.

traqrdb — store
$

§ 01·the record

Not a text dump.

Each memory is a structured record. You hand the store call one string; the rest is derived on write, so search has something better than raw prose to rank against.

content + summarywhat you stored, plus an auto-derived one-liner for cheap scanning
category · topic · tagsderived from the content on write — gotcha, fix, preference, pattern
entitiesnames extracted and linked, so “Vercel” connects across memories
confidence0–1, defaults low on purpose — bad context is worse than none
version chaincorrections supersede instead of overwrite; the history stays readable
memories in the production instance behind this site, checked 2026-06-106,588

§ 02·the tools

Twelve tools.

Everything the server registers, verified against the source before printing. Capture, retrieval, and the hygiene tools that keep a long-lived database honest — including hard-delete for when honest means gone.

capturewrite the record3
memory_storestore a learning; category, tags, topic auto-derived
memory_enhanceextend a topic with a new connected memory
memory_pulsebatch capture + search + update in one call
retrieveread it back4
memory_searchsearch by meaning; semantic + BM25 fused
memory_readexpand one memory: content, versions, relations
memory_contextassemble principles, preferences, gotchas for a task
memory_browsenavigate by facet; zero embedding cost
maintainkeep it honest5
memory_auditsystem health, stats, quality metrics
memory_archivehide stale content that was once correct
memory_correctstore the fix, archive the wrong one, link them
memory_forgethard-delete one memory; audit trail kept
memory_purgeright-to-delete a whole namespace, export first

§ 03·your infrastructure

One SQL file, your database.

Setup is setup.sql applied to a Postgres you already run — Supabase, RDS, Cloud SQL, a Docker container. Embeddings come from OpenAI, Gemini, Bedrock, or Ollama running locally; or skip embeddings entirely and run BM25-only.

fig. 2 — what setup actually creates, counted from setup.sql on 2026-06-10.

terminal — setup
$ psql -f setup.sql
9 tables created
14 functions deployed
pgvector HNSW indexes built
$ npx traqr-memory-mcp --install
12 tools registered
TraqrDB ready.

§ 04·install

Start here.

The memory server stands alone — most people start with it. It’s also the first thing the full harness installs.