# agentdb-persistent-memory-patterns

agentdb-persistent-memory-patterns is a Claude Code skill that structures AI agent memory in AgentDB, from session data to long-term storage. It also covers retrieving records and finding patterns through clustering.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 492 repo stars
- Author: claude-flow
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aiskillstore/marketplace/tree/HEAD/skills/dnyoussef/agentdb-persistent-memory-patterns/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/agentdb-persistent-memory-patterns

## What it does

This skill lays out an AgentDB memory design with episodic, semantic, and procedural layers. Its examples cover session storage, moving selected working-memory records into long-term storage, retrieving entries by query, and finding patterns with clustering. The code uses `AgentDB` and `MemoryManager` from `agentdb-memory`.

The workflow moves from schema and storage design through implementation, testing, performance tuning, and documentation. You’ll need familiarity with AgentDB, memory management, and database schema design to apply the patterns. Without those basics, adapting the examples to an existing system will take extra work.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add aiskillstore/marketplace --skill agentdb-persistent-memory-patterns -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add aiskillstore/marketplace --skill agentdb-persistent-memory-patterns -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add aiskillstore/marketplace --skill agentdb-persistent-memory-patterns -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install aiskillstore/marketplace skills/dnyoussef/agentdb-persistent-memory-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/agentdb-persistent-memory-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add aiskillstore/marketplace --skill agentdb-persistent-memory-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/aiskillstore/marketplace --path skills/dnyoussef/agentdb-persistent-memory-patterns
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add aiskillstore/marketplace --skill agentdb-persistent-memory-patterns -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/aiskillstore/marketplace/tree/HEAD/skills/dnyoussef/agentdb-persistent-memory-patterns/SKILL.md

## When to use it
- retain agent memory across restarts
- separate session data from long-term records
- move selected facts into persistent storage
- find patterns in episodic memories
- retrieve context for a query

## Example prompts
- Design AgentDB memory for my agent, including session data and long-term storage.
- Show how to consolidate important records from working memory into long-term memory.
- Add clustering to discover patterns in episodic memory.

## Similar
- [AgentDB Memory Patterns](https://affpapa.org/en/nevibecode/skills/agentdb-memory-patterns.md) — skill · 1100 installs
- [ReasoningBank with AgentDB](https://affpapa.org/en/nevibecode/skills/reasoningbank-with-agentdb.md) — skill · 1100 installs
- [memory-specialist](https://affpapa.org/en/nevibecode/agents/memory-specialist.md) — subagent · ★ 189 repo stars
- [context-memory](https://affpapa.org/en/nevibecode/plugins/context-memory.md) — plugin · ★ 1013 repo stars
- [memory-management](https://affpapa.org/en/nevibecode/skills/zcf0508-memory-management.md) — skill · 1 install
- [c-memory](https://affpapa.org/en/nevibecode/skills/c-memory.md) — skill · ★ 179 repo stars

From the same set: [aiskillstore/marketplace](https://affpapa.org/en/nevibecode/by/aiskillstore/marketplace.md) — 18 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
