Stash
Persistent memory layer for AI agents that stores episodes, facts, and working context in Postgres with an MCP server included. Self-hosted, open source, works with any MCP-compatible agent.
At a Glance
Fully free and open source under Apache License 2.0. Self-host with no restrictions.
Engagement
Available On
Alternatives
Listed Apr 2026
About Stash
Stash is an open-source, self-hosted persistent memory layer for AI agents, solving the problem of LLMs starting every conversation from zero. It stores episodes, facts, and working context in Postgres with pgvector, and ships with a built-in MCP server. An 8-stage consolidation pipeline transforms raw observations into structured knowledge — covering facts, relationships, causal links, goal tracking, failure patterns, hypothesis verification, and confidence decay.
- Persistent Memory — Gives AI agents memory that survives across sessions, so users never have to re-explain context.
- 8-Stage Consolidation Pipeline — Automatically turns raw observations into structured knowledge: facts, relationships, causal links, goals, failure patterns, hypotheses, and confidence decay.
- MCP Server Included — Ships with a built-in Model Context Protocol server; works with Claude Desktop, Cursor, Windsurf, Cline, Continue, OpenAI Agents, Ollama, OpenRouter, and any MCP-compatible agent.
- Self-Hosted & Single Binary — Runs entirely on your own infrastructure with no cloud dependency; deploy with a single
docker compose upcommand. - Postgres + pgvector Backend — Uses battle-tested Postgres with the pgvector extension for semantic storage and retrieval.
- Background Consolidation — Each pipeline stage only processes new data since the last run, keeping memory fresh and efficient.
- Open Source (Apache 2.0) — Freely available to use, modify, and distribute under the Apache License 2.0.
- Quick Setup — Clone the repo, copy
.env.example, add your API key and model, then rundocker compose up— migrations and all services start automatically.
Community Discussions
Be the first to start a conversation about Stash
Share your experience with Stash, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open source under Apache License 2.0. Self-host with no restrictions.
- Persistent memory layer for AI agents
- 8-stage consolidation pipeline
- Built-in MCP server
- Postgres + pgvector backend
- Self-hosted, no cloud required
Capabilities
Key Features
- Persistent cross-session memory for AI agents
- 8-stage knowledge consolidation pipeline
- Built-in MCP server
- Postgres + pgvector storage backend
- Self-hosted, no cloud required
- Single binary deployment
- Docker Compose setup
- Background consolidation processing
- Fact and relationship extraction
- Causal link tracking
- Goal tracking
- Failure pattern recognition
- Hypothesis verification
- Confidence decay
- Works with Claude Desktop, Cursor, Windsurf, Cline, Continue, OpenAI Agents, Ollama, OpenRouter
