# Build Adaptive Agent Memory with AgentDB

Agents often lose useful lessons from prior tasks. This skill shows how to store, judge, retrieve, and distill reasoning patterns with AgentDB-backed ReasoningBank.

## Install

```bash
npx skillstore add ruvnet/reasoningbank-with-agentdb
```

## Metadata

- Status: approved
- Slug: ruvnet-reasoningbank-with-agentdb
- Skillstore revision: r1
- Version status: missing
- Tree hash: f487bbce4c9fe6c30c6697579ccc75388e1938b88a86b0bd202a6b8cf2e68c2f
- Author: ruvnet
- GitHub username: ruvnet
- License: MIT
- Repository: https://github.com/ruvnet/claude-flow/tree/main/.claude/skills/reasoningbank-agentdb
- 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, filesystem
- Quality score: 67
- Public page: https://skillstore.pages.dev/skills/ruvnet-reasoningbank-with-agentdb
- Manifest: https://skillstore.pages.dev/api/skills/ruvnet-reasoningbank-with-agentdb/manifest

## Capabilities

- Shows CLI setup for an AgentDB-backed ReasoningBank database.
- Demonstrates storing experiences, trajectories, and distilled patterns with embeddings.
- Explains retrieval with reasoning, diversity, context synthesis, and memory optimization.
- Covers migration from legacy ReasoningBank memory databases.
- Provides export, import, statistics, migration, and troubleshooting command examples.

## Use Cases

- Build Learning Agents: Create agents that reuse past successful trajectories and improve decisions across repeated tasks.
- Migrate Reasoning Memory: Move legacy ReasoningBank data into AgentDB while keeping existing workflows compatible.
- Prototype Experience Replay: Test memory distillation, verdict judgment, and pattern retrieval for experimental agent systems.

## Prompt Templates

### Plan Basic Setup

```
Help me set up ReasoningBank with AgentDB for a local learning agent. Include prerequisites, storage paths, and safety checks.
```

### Store a Trajectory

```
Design a simple trajectory record for my agent task. Show what fields to capture and how to judge success.
```

### Improve Retrieval Quality

```
Review my ReasoningBank retrieval strategy. Suggest domain structure, confidence thresholds, context synthesis, and memory optimization settings.
```

### Govern Production Memory

```
Create a production plan for AgentDB-backed agent memory. Include migration, export controls, retention, backups, and package pinning.
```

## Limitations

- Requires Node.js 18 and compatible AgentDB or agentic-flow packages.
- Does not provide production authentication, encryption, or retention policy guidance.
- Example schemas and domains must be adapted before production use.
- Several commands use agentdb@latest, so package behavior can change over time.

## Best Practices

- Pin package versions before running setup, migration, or MCP commands.
- Document what data is stored in each memory database before use.
- Review exported memory files before sharing, committing, or uploading them.

## Anti Patterns

- Do not run agentdb@latest commands in production without review.
- Do not store secrets, credentials, or private prompts in reusable memory records.
- Do not enable MCP integrations without understanding their permissions and runtime behavior.

## Security Audit

- Audited at: 2026-07-20T03:55:06.108\+00:00
- Summary: Most static command findings are false positives caused by Markdown fences and JavaScript template literals. Five documented npx command blocks execute external tooling, and the use of the mutable latest tag creates a supply-chain risk. Local database paths and documentation links do not independently show data exposure or network activity.

## Stats

- Views: 264
- Downloads: 15
- Favorites: 0
- Popularity score: 0
