
Stash gives your AI agents a Postgres-backed memory layer that persists across sessions. It stores raw episodes, then runs an 8-stage consolidation pipeline that extracts facts, relationships, causal patterns, and goals from observations. Works with Claude Desktop, Cursor, Windsurf, and anything MCP-compatible. The Docker setup is straightforward: clone, add your LLM API key to .env, and compose up. You get semantic search over memories, working context storage, and automatic confidence decay on stale facts. If you're building agents that need to remember user preferences or learn from past interactions instead of starting fresh every time, this is a solid self-hosted option that doesn't lock you into a vendor.
$ npx -y skills add aradotso/trending-skills --skill stash-ai-memory --agent claude-codeInstalls into .claude/skills of the current project.
Skill by ara.so — Daily 2026 Skills collection.
Stash is a self-hosted persistent memory layer for AI agents. It stores episodes, facts, and working context in Postgres with pgvector, runs an 8-stage consolidation pipeline to turn raw observations into structured knowledge, and exposes everything via an MCP server that works with any MCP-compatible agent (Claude Desktop, Cursor, Windsurf, Cline, Continue, OpenAI Agents, Ollama, OpenRouter).
Agent ──► MCP Server ──► Postgres + pgvector
│
└──► Background Consolidation Pipeline
(Episodes → Facts → Relationships →
Causal Links → Goals → Failures →
Hypotheses → Confidence Decay)
git clone https://github.com/alash3al/stash.git
cd stash
cp .env.example .env
# Edit .env with your LLM API key and model
docker compose up
This starts Postgres with pgvector, runs migrations, and launches the MCP server with background consolidation.
Sponsors