AgentDB Memory Patterns

Implement persistent memory patterns for AI agents using AgentDB vector storage.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/dmuhoro/EasyTutor --skill agentdb-memory-patterns-dmuhoro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: AgentDB Memory Patterns
Source: https://github.com/dmuhoro/EasyTutor/tree/main/archive/.claude/skills/agentdb-memory-patterns
Command: npx skills add https://github.com/dmuhoro/EasyTutor --skill agentdb-memory-patterns-dmuhoro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agentdb, agentic-flow.

What problem does it solve? AI agents lose context between sessions and cannot learn from past interactions. This Skill provides memory management patterns using AgentDB so agents can store conversations, retrieve relevant context via vector search, and learn from successful interactions. ## Core Features & Use Cases - Session and Long-Term Memory: Store chat history, user facts, and preferences with confidence scores and retrieval APIs. - Pattern Learning with ReasoningBank: Record successful interaction patterns, retrieve them with MMR-based vector search, and train learning plugins such as Decision Transformer and Q-Learning. - CLI and MCP Integration: Initialize databases, run queries, import/export vectors, and expose memory to Claude Code through an MCP server. - Use Case: Build a support chatbot that remembers each user's preferences across sessions and retrieves the top-k relevant past interactions to ground its replies. ## Quick Start Initialize an AgentDB database and set up session memory for my chat agent so it can store and retrieve conversation history.

Frequently Asked Questions about AgentDB Memory Patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to an AI agent?

Initialize an AgentDB database with npx agentdb init, then use the createAgentDBAdapter API to store interaction patterns with embeddings. Retrieve relevant context with retrieveWithReasoning using vector similarity and MMR ranking.

How to store conversation history with AgentDB?

Use the session memory pattern: store each message with a sessionId, role, content, and timestamp, then query by sessionId ordered by timestamp. The Skill provides a SessionMemory class template for this workflow.

Does AgentDB work with Claude Code?

Yes, AgentDB ships an MCP server that integrates with Claude Code. Run npx agentdb mcp and register it once with claude mcp add agentdb to expose memory operations to the agent.

Can I migrate from legacy ReasoningBank to AgentDB?

Yes, the migrateToAgentDB function migrates patterns from a legacy .swarm/memory.db file into AgentDB with validation. It reports how many patterns were migrated and keeps full API backward compatibility.

Why is my AgentDB memory database growing too large?

Large databases result from storing raw embeddings without compression. Enable binary quantization for 32x reduction or scalar for 4x reduction, and run memory consolidation to prune low-scoring patterns.

What learning algorithms does AgentDB support?

AgentDB includes nine learning plugins: Decision Transformer, Q-Learning, SARSA, Actor-Critic, Active Learning, Adversarial Training, Curriculum Learning, Federated Learning, and Multi-task Learning. Create them with the create-plugin CLI wizard.