# stash-ai-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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 299 installs · ★ 98 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/stash-ai-memory/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/stash-ai-memory

## What it 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.

## Requirements
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/stash-ai-memory/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/stash-ai-memory/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/stash-ai-memory/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/stash-ai-memory/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills skills/stash-ai-memory
```

2. **Manually: put the files in place**
- File: `.github/skills/stash-ai-memory/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/stash-ai-memory
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/stash-ai-memory/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill stash-ai-memory -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/stash-ai-memory/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [Memory Vault](https://affpapa.org/en/nevibecode/mcp/memory-vault.md) — MCP server · ★ 67 repo stars
- [Provena Agent Memory](https://affpapa.org/en/nevibecode/mcp/provena-agent-memory.md) — MCP server · ★ 8 repo stars
- [nlqdb — analytical memory for AI agents](https://affpapa.org/en/nevibecode/mcp/nlqdb-analytical-memory-for-ai-agents.md) — MCP server · ★ 2 repo stars
- [memory-industry](https://affpapa.org/en/nevibecode/mcp/memory-industry.md) — MCP server · ★ 30 repo stars
- [RE-call MCP Memory Server](https://affpapa.org/en/nevibecode/mcp/re-call-mcp-memory-server.md) — MCP server · ★ 7 repo stars
- [vector-database-ops](https://affpapa.org/en/nevibecode/skills/vector-database-ops.md) — skill · 345 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 211 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
