Your AI's external hard drive, self-hosted in one command
Stash gives LLM agents persistent memory across sessions by stuffing episodes, facts, and a 9-stage consolidation pipeline into Postgres.

What it does
Stash is a memory layer that sits between your AI agent and Postgres. It stores episodes (raw interactions), distills them into facts, and runs a background pipeline to consolidate those into relationships, patterns, and even tracked goals. Your agent calls it through the MCP protocol — the same standard Cursor, Claude Desktop, and Windsurf already speak — so integration is just pointing them at a local SSE endpoint.
The interesting bit
The consolidation pipeline is the unusual part: nine stages that chew on new data since the last run, turning noise into structured knowledge rather than just embedding and retrieving. The author also runs a separate cloud version at usestash.io, but stresses it shares zero code with this repo — a refreshingly honest admission that the two will diverge.
Key highlights
- Single
docker compose updeploys Postgres + pgvector, migrations, and MCP server - Fully local option via Ollama for embeddings and reasoning — no cloud API required
- MCP over SSE means it plugs into Cursor, Claude Desktop, Windsurf, Cline, Continue, OpenAI Agents, and others without custom adapters
- 9-stage pipeline: facts → relationships → causal links → patterns → contradictions → goal tracking → failure patterns → hypothesis verification
- Apache 2.0, Go-based, ~710 stars
Caveats
- The README is heavy on poetry (“patterns become wisdom”) and light on concrete API details — you’ll need to dig into the docs for actual schema or latency expectations
- The cloud and open-source versions are explicitly divergent codebases, so feature parity is not guaranteed
Verdict
Worth a look if you’re building agents that need to remember context across long horizons and you want to keep data in-house. Skip it if you just need simple RAG — this is closer to a cognitive architecture than a vector search wrapper.