Stash is an open-source, self-hosted persistent memory layer for AI agents. It sits between an agent and its environment, synthesizing conversations and experiences into a structured knowledge graph using PostgreSQL and pgvector. Unlike RAG, which is document retrieval, Stash actively learns from agent interactions, detects contradictions, tracks goals, and builds a deepening model of the user over time. It integrates natively via the MCP protocol, works with any OpenAI-compatible backend (Claude, ChatGPT, Ollama, OpenRouter, local LLMs), and deploys via Docker Compose. It offers 28 tools covering memory operations from basic recall to causal chains and hypothesis management, with hierarchical namespaces for organizing user, project, and agent self-knowledge.

4m read timeFrom alash3al.github.io
Post cover image

Sort: