stash-ai-memory — Claude Code skill for persistent agent memory
The stash-ai-memory skill guides setup of Stash, a persistent memory service for AI agents. Use it when an agent needs to retain observations and working context across sessions.
no license 299 installs ★ 98 updated 2026-10-09
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a claude-codeWhat stash-ai-memory does
Stash keeps episodes, extracted facts, and working context in Postgres with pgvector. Its MCP server gives agents tools to save observations, search memories by meaning, query consolidated facts, manage session context, and remove selected entries.
A background pipeline turns new observations into facts, relationships, causal links, goals, failure patterns, and hypotheses. It also lowers confidence in stale facts. For the Docker setup, clone the Stash repository, copy .env.example to .env, configure an LLM key and model, then run docker compose up. You need Postgres with pgvector and an LLM endpoint or Ollama; without one configured, the pipeline has no model to process observations.
MCP clients connect through http://localhost:8080/mcp. The guide also covers building a Go binary and calling the service from Go. Installing this skill does not install the Stash server itself.
What it helps with
- retain agent observations across sessions
- search stored memories by meaning
- retrieve facts derived from earlier observations
- keep in-progress task context
- remove selected agent memories
Example prompts for the agent
- Set up Stash as an MCP server and give my agent memory across sessions.
- Save this project observation in Stash so I can retrieve it later.
- Search Stash for facts about the current task and the user's preferences.
How to install stash-ai-memory
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a claude-code2Manually: put the files in place
~/.claude/skills/stash-ai-memory/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/stash-ai-memory/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a codex2Manually: put the files in place
.agents/skills/stash-ai-memory/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a cursor2Manually: put the files in place
.cursor/skills/stash-ai-memory/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills skills/stash-ai-memory2Manually: put the files in place
.github/skills/stash-ai-memory/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/stash-ai-memoryManually: put the files in place
.devin/skills/stash-ai-memory/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about stash-ai-memory
How do I install stash-ai-memory in Claude Code?
Run npx skills add reason-machines/trending-skills --skill stash-ai-memory -a claude-code. The skill file is placed at ~/.claude/skills/stash-ai-memory/SKILL.md.
What does stash-ai-memory do?
It guides setup of Stash as persistent memory for an AI agent. Stash stores data in Postgres with pgvector and exposes MCP tools for saving and retrieving it.
What does the Stash server need to run?
It needs Postgres with pgvector and an LLM, either through an OpenAI-compatible endpoint or Ollama. In the Docker setup, configure these in .env.