↖ Back to builds

Selected build

Context Memory Service

A local memory layer for coding agents. Archive the conversation, carry context between tools, and reuse what an earlier investigation discovered.

TypeScript / PostgreSQL / pgvector / MCP

How it fits together

The next session starts too far behind

An agent session holds more than its final answer. It holds the failed queries, the exceptions, and the evidence that changed the approach. Losing that history means paying for the same discovery twice.

I built Context Memory Service to keep that work outside any one agent. It archives conversations from Claude Code, opencode, and pi into a local PostgreSQL database. Semantic and keyword search make earlier sessions available to both me and the next agent through a CLI and MCP server.

An archive is not a summary

The original records stay separate from the searchable text. Tool calls and results remain available as evidence without flooding every search with tool output. Evicted Claude Code transcripts can be restored byte-for-byte for resume.

Moving between agents is a different job. A provider-neutral handoff packet carries the visible conversation, tool calls, and results, with a manifest declaring what was left out. It transfers context without pretending one agent can resume another’s native session.

Reuse the investigation, not only the answer

A distillation pipeline turns past support investigations into knowledge cards: the symptom, a checkable signature, and the diagnostic steps that worked. Distinct cases must corroborate a card before it becomes active. Contradicting findings supersede older cards without erasing their history.

Cards are leads, not authority. The next agent can check the signature and follow citations back to the evidence. A local review bench records human corrections separately so a rebuild cannot erase them. Promotion into knowledge-base drafts requires a human validation by default.

SupportTopics connects recurring issues across tickets. This service preserves the investigative work behind them. Both are ways of making what survives between sessions useful the next time the problem appears.

Want to compare notes on a similar problem? Get in touch ↗