Agent skill · software engineering · aradotso
stash-ai-memory
Persistent memory layer for AI agents using Postgres/pgvector with MCP server support
Why this skill is useful
Adds executable scripts and a complete setup for a self-hosted persistent memory layer using Postgres and MCP server that significantly enhances AI agent capabilities.
What it needs
Requires docker, go installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
Stash AI Memory 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). Architecture Quick Start (Docker — Recommended) This starts Postgres with pgvector, runs migrations, and launches the MCP server with background consolidation. Environment Configuration Binary / Manual Install Connecting MCP Clients Claude Desktop (~/Library/Application Support/Claude/claudedesktopconfig.json) Cursor / Windsurf / Cline (.cursor/mcp.json or equivalent) Continue (~/.continue/config.json) MCP Tools Exposed to Agents Stash exposes these tools via MCP that agents call automatically: Tool Purpose ------ --------- stashremember Store an episode or observation stashrecall Semantic search across memory stashfacts Query consolidated facts stashcontext Get/set working context stashforget Remove specific memories Using Stash Programmatically (Go) Docker Compose (Full Reference) Consolidation Pipeline The 8-stage pipeline runs on a configurable interval (default 5 minutes) and processes only new data since the last run: 1. Episodes — raw observations stored by agents 2. Facts — discrete true/false statements extracted from episodes 3. Relationships — links between facts and entities 4. Causal Links — cause-and-effect patterns 5. Goal Tracking — inferred agent/user goals 6. Failure Patterns — what went wrong and why 7. Hypothesis Verification — testing inferred beliefs against new data 8. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/stash-ai-memory