# Build Agent Memory with AgentDB

Stateful agents need reliable memory across sessions and tools. This skill gives AgentDB patterns for storing, retrieving, migrating, and optimizing agent memory.

## Install

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

## Metadata

- Status: approved
- Slug: dnyoussef-agentdb-memory-patterns
- Skillstore revision: r1
- Version status: missing
- Tree hash: 330a2f3325d4d4a65300209fd322df80f2fa0dd9417b4832b5b7c9b436b37a62
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/agentdb-memory-patterns
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- 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: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/dnyoussef-agentdb-memory-patterns
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-agentdb-memory-patterns/manifest

## Capabilities

- Shows AgentDB CLI setup commands for local memory databases.
- Provides TypeScript examples for session memory and long-term facts.
- Explains pattern learning, hierarchical memory, and memory consolidation.
- Documents query, import, export, stats, and benchmark workflows.
- Describes ReasoningBank migration and AgentDB adapter usage.
- Lists learning plugin templates and reasoning agent modules.

## Use Cases

- Add Session Memory: Design message history storage and retrieval for a stateful chat agent.
- Configure Claude Code Memory Tools: Connect an AgentDB MCP server so Claude Code can use persistent memory workflows.
- Migrate ReasoningBank Data: Plan a migration from legacy ReasoningBank storage into AgentDB-backed memory.

## Prompt Templates

### Plan Basic Session Memory

```
Use this skill to design session memory for a chat agent. Include stored fields, retrieval limits, and failure handling.
```

### Design Long-Term Facts

```
Use this skill to define long-term user facts for my assistant. Include categories, confidence rules, and update behavior.
```

### Build Pattern Learning Workflow

```
Use this skill to create a pattern learning workflow. Include triggers, success metrics, consolidation timing, and retrieval strategy.
```

### Review Memory Migration Plan

```
Use this skill to review my ReasoningBank migration plan. Identify data risks, validation steps, rollback steps, and performance checks.
```

## Limitations

- The skill is documentation only and does not ship executable source files.
- It depends on external AgentDB and agentic-flow packages.
- Examples use unpinned latest package commands unless users change them.
- Privacy, encryption, deletion, and retention controls need separate design.

## Best Practices

- Pin AgentDB package versions before running CLI or MCP commands.
- Treat memory databases and exports as sensitive user data.
- Define retention, deletion, and consent rules before storing conversations.

## Anti Patterns

- Do not run latest package commands automatically without user approval.
- Do not export memory backups into shared or public folders.
- Do not store private user facts without clear purpose and retention rules.

## Security Audit

- Audited at: 2026-07-05T12:23:04.058\+00:00
- Summary: Most static Ruby backtick detections are Markdown fences, TypeScript snippets, or template literals and are false positives. Confirmed issues remain where the skill instructs users to run unpinned npx commands, register an MCP server, and handle memory database exports or migrations. No prompt injection or malicious exfiltration intent was found.

## Stats

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