AgentDB Memory Patterns
Practical patterns for giving AI agents session memory, long-term storage, pattern learning and context management with AgentDB and ReasoningBank.
Dev & CodingAdvanced★ 348⑂ 27AI score 8/10Last updated: Jul 28, 2026
What it does
- Walks through AgentDB CLI usage (
npx agentdb@latest init/query/stats/export/benchmark) to create and operate a vector database. - Provides TypeScript patterns for session memory, long-term facts, pattern learning, hierarchical memory and memory consolidation.
- Covers ReasoningBank integration via
createAgentDBAdapter, migration from legacy.swarm/memory.db, and the nine learning plugins (Decision Transformer, Q-Learning, Actor-Critic, etc.). - Adds best practices (quantization, caching, batch inserts) plus a troubleshooting section for bloated or slow memory stores.
Who it's for
- Developers building chatbots or agents that must remember conversations and user preferences.
- Teams already on (or evaluating) the AgentDB / agentic-flow / ReasoningBank stack.
- Engineers experimenting with vector-search long-term memory and RL-style learning plugins.
Example uses
- "My agent forgets everything between sessions" → get a session-memory + long-term fact schema with working code.
- "Memory DB is growing out of control" → check with
stats, enable binary/scalar quantization, run consolidation. - "Migrate my legacy ReasoningBank DB" → follow
migrateToAgentDBand the migrate CLI flow.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/spencermarx/open-code-review/HEAD/.claude/skills/agentdb-memory-patterns/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/agentdb-memory-patterns folder from the GitHub repo spencermarx/open-code-review into my ~/.claude/skills/agentdb-memory-patterns/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/spencermarx/open-code-review.git && mkdir -p ~/.claude/skills && cp -r open-code-review/.claude/skills/agentdb-memory-patterns ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal in your working directory.
- Clone the repo:
git clone https://github.com/spencermarx/open-code-review.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r open-code-review/.claude/skills/agentdb-memory-patterns ~/.claude/skills/ - Confirm Node.js 18+ is installed:
node -v - (Optional) Initialize a database:
npx agentdb@latest init ./agents.db - (Optional) Register the MCP server with Claude Code:
claude mcp add agentdb npx agentdb@latest mcp - Restart Claude Code and ask something like "design persistent memory for my agent with AgentDB" to trigger the skill.
View source on GitHub ↗License: Apache-2.0