# Build Adaptive Agent Memory with AgentDB

Self-learning agents need durable memory to compare decisions and improve outcomes. This skill shows AgentDB patterns for trajectories, judgments, distillation, and retrieval.

## Install

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

## Metadata

- Status: approved
- Slug: dnyoussef-reasoningbank-with-agentdb
- Skillstore revision: r1
- Version status: missing
- Tree hash: f487bbce4c9fe6c30c6697579ccc75388e1938b88a86b0bd202a6b8cf2e68c2f
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/reasoningbank-agentdb
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/dnyoussef-reasoningbank-with-agentdb
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-reasoningbank-with-agentdb/manifest

## Capabilities

- Initialize an AgentDB-backed ReasoningBank database from documented CLI steps.
- Show TypeScript examples for storing experiences, trajectories, and distilled patterns.
- Demonstrate similarity retrieval, verdict judgment, and context synthesis workflows.
- Describe memory optimization, experience curation, and multi-domain transfer patterns.
- Provide migration and troubleshooting guidance for legacy ReasoningBank memory files.

## Use Cases

- Add Learning Memory to Agents: Create a local memory layer that stores successful and failed decisions for later retrieval.
- Evaluate Agent Trajectories: Compare a new task path with similar prior outcomes before accepting an automated verdict.
- Migrate Legacy Reasoning Data: Move existing ReasoningBank memories into an AgentDB-backed workflow with validation steps.

## Prompt Templates

### Plan the First Setup

```
I am building a self-learning agent for [domain]. Guide me through creating an AgentDB-backed ReasoningBank store with prerequisites and validation steps.
```

### Store Agent Experiences

```
Design a ReasoningBank memory flow for [agent task]. Include trajectory fields, success metrics, confidence scoring, and retrieval criteria.
```

### Judge a New Trajectory

```
Help me compare this new trajectory against stored ReasoningBank memories. Recommend verdict logic, confidence thresholds, and review safeguards.
```

### Govern a Migration

```
Create a migration plan from legacy ReasoningBank memory to AgentDB. Include validation, rollback, sensitive data handling, and version pinning.
```

## Limitations

- Requires Node.js 18 or later and a compatible AgentDB package.
- Does not provide production encryption, access control, or backup policy code.
- Performance claims should be validated in the target environment.
- Examples are implementation patterns, not a complete application.

## Best Practices

- Pin AgentDB package versions and review every CLI command before running it.
- Keep memory databases out of source control and protect backups with access controls.
- Start with narrow domains and measure retrieval quality before automated decisions.

## Anti Patterns

- Running latest-version package commands without review or version pinning.
- Storing credentials, private customer data, or secrets in agent memories.
- Treating similarity scores as final truth without evaluation or human review.

## Security Audit

- Audited at: 2026-07-05T12:34:52.393\+00:00
- Summary: Most Ruby or shell backtick alerts are false positives from Markdown fences and TypeScript template literals. Confirmed risks remain for unpinned AgentDB CLI execution, MCP setup, and hidden SQLite memory files that can contain sensitive agent history. No prompt injection or deliberate network exfiltration evidence was found.

## Stats

- Views: 255
- Downloads: 9
- Favorites: 0
- Popularity score: 0
