# Build AgentDB Memory for AI Agents

Stateful agents need reliable memory across sessions. This skill shows AgentDB patterns for storing messages, facts, learned patterns, and retrieved context.

## Install

```bash
npx skillstore add ruvnet/agentdb-memory-patterns
```

## Metadata

- Status: approved
- Slug: ruvnet-agentdb-memory-patterns
- Skillstore revision: r1
- Version status: missing
- Tree hash: 330a2f3325d4d4a65300209fd322df80f2fa0dd9417b4832b5b7c9b436b37a62
- Author: ruvnet
- GitHub username: ruvnet
- License: MIT
- Repository: https://github.com/ruvnet/claude-flow/tree/main/.claude/skills/agentdb-memory-patterns
- Ref: dbe0e719813583400773166a0621f8a9b8185c72
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 75
- Public page: https://skillstore.pages.dev/skills/ruvnet-agentdb-memory-patterns
- Manifest: https://skillstore.pages.dev/api/skills/ruvnet-agentdb-memory-patterns/manifest

## Capabilities

- Shows AgentDB initialization commands for local vector databases.
- Demonstrates session memory storage and history retrieval patterns.
- Explains long-term fact storage for user preferences and agent context.
- Provides pattern learning examples for successful interaction reuse.
- Covers ReasoningBank migration and AgentDB adapter setup.
- Lists CLI operations for query, import, export, stats, benchmarks, and plugins.

## Use Cases

- Add chat memory: Use session and long-term memory patterns to preserve context between conversations.
- Migrate ReasoningBank data: Follow the adapter and migration examples to move legacy memory stores into AgentDB.
- Prototype learning agents: Use pattern learning and plugin examples to test memory-assisted agent behavior.

## Prompt Templates

### Map a basic memory store

```
Using the AgentDB Memory Patterns skill, outline a simple session memory design for a chat agent. Include stored fields and retrieval flow.
```

### Add long-term facts

```
Use this skill to design long-term fact storage for user preferences. Include confidence, source tracking, and update rules.
```

### Plan ReasoningBank migration

```
Use this skill to plan a migration from ReasoningBank to AgentDB. Include data validation, rollback, and testing steps.
```

### Review memory safety

```
Use this skill to audit an AgentDB memory design for privacy, retention, export, and command execution risks. Recommend mitigations.
```

## Limitations

- Does not include runnable project files or automated tests.
- Relies on external AgentDB packages and their installed behavior.
- Does not define privacy policies for stored user memory.
- Performance claims come from the skill text and are not independently verified.

## Best Practices

- Pin AgentDB package versions before running setup or MCP commands.
- Store only necessary user memory and define retention rules before launch.
- Validate exports, migrations, and plugin changes in a test database first.

## Anti Patterns

- Running latest package commands automatically without human confirmation.
- Saving raw conversation data without consent, redaction, or deletion controls.
- Treating benchmark claims as production results without local testing.

## Security Audit

- Audited at: 2026-07-20T03:42:20.985\+00:00
- Summary: Most static findings are false positives caused by Markdown code fences, TypeScript template literals, local database paths, and documentation URLs. Nine command examples invoke npx agentdb@latest, which can execute an unpinned remote package and therefore retain a medium supply-chain risk. No prompt injection, credential exfiltration, or hidden network behavior was found.

## Stats

- Views: 204
- Downloads: 10
- Favorites: 0
- Popularity score: 0
