ReasoningBank with AgentDB — claude-code ReasoningBank with AgentDB, arcanea, community, claude-code, ide skills, creative-ai, creative-writing, intelligence, multi-agent, next-js, Claude Code

v1.0.0
GitHub

About this Skill

Ideal for Advanced AI Agents seeking accelerated adaptive learning and decision-making capabilities with Node.js 18+ and AgentDB v1.0.7+ Living intelligence that overlays any AI. Ten Guardian intelligences, context that compounds, and the creative civilization OS for creators who build universes.

# Core Topics

frankxai frankxai
[3]
[1]
Updated: 2/25/2026

Agent Capability Analysis

The ReasoningBank with AgentDB skill by frankxai is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for claude-code, creative-ai, creative-writing.

Ideal Agent Persona

Ideal for Advanced AI Agents seeking accelerated adaptive learning and decision-making capabilities with Node.js 18+ and AgentDB v1.0.7+

Core Value

Empowers agents with 150x faster pattern retrieval and 500x faster batch operations, utilizing AgentDB's high-performance backend for enhanced judgment and memory distillation, all while maintaining 100% backward compatibility and sub-1ms memory access

Capabilities Granted for ReasoningBank with AgentDB

Enhancing decision-making through accelerated adaptive learning patterns
Distilling memories for improved outcome judgment
Optimizing agent performance with high-speed batch operations
Implementing context-compounding intelligence for complex problem-solving

! Prerequisites & Limits

  • Requires Node.js 18+
  • Dependent on AgentDB v1.0.7+ via agentic-flow
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

ReasoningBank with AgentDB

Install ReasoningBank with AgentDB, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command...

SKILL.md
Readonly

ReasoningBank with AgentDB

What This Skill Does

Provides ReasoningBank adaptive learning patterns using AgentDB's high-performance backend (150x-12,500x faster). Enables agents to learn from experiences, judge outcomes, distill memories, and improve decision-making over time with 100% backward compatibility.

Performance: 150x faster pattern retrieval, 500x faster batch operations, <1ms memory access.

Prerequisites

  • Node.js 18+
  • AgentDB v1.0.7+ (via agentic-flow)
  • Understanding of reinforcement learning concepts (optional)

Quick Start with CLI

Initialize ReasoningBank Database

bash
1# Initialize AgentDB for ReasoningBank 2npx agentdb@latest init ./.agentdb/reasoningbank.db --dimension 1536 3 4# Start MCP server for Claude Code integration 5npx agentdb@latest mcp 6claude mcp add agentdb npx agentdb@latest mcp

Migrate from Legacy ReasoningBank

bash
1# Automatic migration with validation 2npx agentdb@latest migrate --source .swarm/memory.db 3 4# Verify migration 5npx agentdb@latest stats ./.agentdb/reasoningbank.db

Quick Start with API

typescript
1import { createAgentDBAdapter, computeEmbedding } from 'agentic-flow/reasoningbank'; 2 3// Initialize ReasoningBank with AgentDB 4const rb = await createAgentDBAdapter({ 5 dbPath: '.agentdb/reasoningbank.db', 6 enableLearning: true, // Enable learning plugins 7 enableReasoning: true, // Enable reasoning agents 8 cacheSize: 1000, // 1000 pattern cache 9}); 10 11// Store successful experience 12const query = "How to optimize database queries?"; 13const embedding = await computeEmbedding(query); 14 15await rb.insertPattern({ 16 id: '', 17 type: 'experience', 18 domain: 'database-optimization', 19 pattern_data: JSON.stringify({ 20 embedding, 21 pattern: { 22 query, 23 approach: 'indexing + query optimization', 24 outcome: 'success', 25 metrics: { latency_reduction: 0.85 } 26 } 27 }), 28 confidence: 0.95, 29 usage_count: 1, 30 success_count: 1, 31 created_at: Date.now(), 32 last_used: Date.now(), 33}); 34 35// Retrieve similar experiences with reasoning 36const result = await rb.retrieveWithReasoning(embedding, { 37 domain: 'database-optimization', 38 k: 5, 39 useMMR: true, // Diverse results 40 synthesizeContext: true, // Rich context synthesis 41}); 42 43console.log('Memories:', result.memories); 44console.log('Context:', result.context); 45console.log('Patterns:', result.patterns);

Core ReasoningBank Concepts

1. Trajectory Tracking

Track agent execution paths and outcomes:

typescript
1// Record trajectory (sequence of actions) 2const trajectory = { 3 task: 'optimize-api-endpoint', 4 steps: [ 5 { action: 'analyze-bottleneck', result: 'found N+1 query' }, 6 { action: 'add-eager-loading', result: 'reduced queries' }, 7 { action: 'add-caching', result: 'improved latency' } 8 ], 9 outcome: 'success', 10 metrics: { latency_before: 2500, latency_after: 150 } 11}; 12 13const embedding = await computeEmbedding(JSON.stringify(trajectory)); 14 15await rb.insertPattern({ 16 id: '', 17 type: 'trajectory', 18 domain: 'api-optimization', 19 pattern_data: JSON.stringify({ embedding, pattern: trajectory }), 20 confidence: 0.9, 21 usage_count: 1, 22 success_count: 1, 23 created_at: Date.now(), 24 last_used: Date.now(), 25});

2. Verdict Judgment

Judge whether a trajectory was successful:

typescript
1// Retrieve similar past trajectories 2const similar = await rb.retrieveWithReasoning(queryEmbedding, { 3 domain: 'api-optimization', 4 k: 10, 5}); 6 7// Judge based on similarity to successful patterns 8const verdict = similar.memories.filter(m => 9 m.pattern.outcome === 'success' && 10 m.similarity > 0.8 11).length > 5 ? 'likely_success' : 'needs_review'; 12 13console.log('Verdict:', verdict); 14console.log('Confidence:', similar.memories[0]?.similarity || 0);

3. Memory Distillation

Consolidate similar experiences into patterns:

typescript
1// Get all experiences in domain 2const experiences = await rb.retrieveWithReasoning(embedding, { 3 domain: 'api-optimization', 4 k: 100, 5 optimizeMemory: true, // Automatic consolidation 6}); 7 8// Distill into high-level pattern 9const distilledPattern = { 10 domain: 'api-optimization', 11 pattern: 'For N+1 queries: add eager loading, then cache', 12 success_rate: 0.92, 13 sample_size: experiences.memories.length, 14 confidence: 0.95 15}; 16 17await rb.insertPattern({ 18 id: '', 19 type: 'distilled-pattern', 20 domain: 'api-optimization', 21 pattern_data: JSON.stringify({ 22 embedding: await computeEmbedding(JSON.stringify(distilledPattern)), 23 pattern: distilledPattern 24 }), 25 confidence: 0.95, 26 usage_count: 0, 27 success_count: 0, 28 created_at: Date.now(), 29 last_used: Date.now(), 30});

Integration with Reasoning Agents

AgentDB provides 4 reasoning modules that enhance ReasoningBank:

1. PatternMatcher

Find similar successful patterns:

typescript
1const result = await rb.retrieveWithReasoning(queryEmbedding, { 2 domain: 'problem-solving', 3 k: 10, 4 useMMR: true, // Maximal Marginal Relevance for diversity 5}); 6 7// PatternMatcher returns diverse, relevant memories 8result.memories.forEach(mem => { 9 console.log(`Pattern: ${mem.pattern.approach}`); 10 console.log(`Similarity: ${mem.similarity}`); 11 console.log(`Success Rate: ${mem.success_count / mem.usage_count}`); 12});

2. ContextSynthesizer

Generate rich context from multiple memories:

typescript
1const result = await rb.retrieveWithReasoning(queryEmbedding, { 2 domain: 'code-optimization', 3 synthesizeContext: true, // Enable context synthesis 4 k: 5, 5}); 6 7// ContextSynthesizer creates coherent narrative 8console.log('Synthesized Context:', result.context); 9// "Based on 5 similar optimizations, the most effective approach 10// involves profiling, identifying bottlenecks, and applying targeted 11// improvements. Success rate: 87%"

3. MemoryOptimizer

Automatically consolidate and prune:

typescript
1const result = await rb.retrieveWithReasoning(queryEmbedding, { 2 domain: 'testing', 3 optimizeMemory: true, // Enable automatic optimization 4}); 5 6// MemoryOptimizer consolidates similar patterns and prunes low-quality 7console.log('Optimizations:', result.optimizations); 8// { consolidated: 15, pruned: 3, improved_quality: 0.12 }

4. ExperienceCurator

Filter by quality and relevance:

typescript
1const result = await rb.retrieveWithReasoning(queryEmbedding, { 2 domain: 'debugging', 3 k: 20, 4 minConfidence: 0.8, // Only high-confidence experiences 5}); 6 7// ExperienceCurator returns only quality experiences 8result.memories.forEach(mem => { 9 console.log(`Confidence: ${mem.confidence}`); 10 console.log(`Success Rate: ${mem.success_count / mem.usage_count}`); 11});

Legacy API Compatibility

AgentDB maintains 100% backward compatibility with legacy ReasoningBank:

typescript
1import { 2 retrieveMemories, 3 judgeTrajectory, 4 distillMemories 5} from 'agentic-flow/reasoningbank'; 6 7// Legacy API works unchanged (uses AgentDB backend automatically) 8const memories = await retrieveMemories(query, { 9 domain: 'code-generation', 10 agent: 'coder' 11}); 12 13const verdict = await judgeTrajectory(trajectory, query); 14 15const newMemories = await distillMemories( 16 trajectory, 17 verdict, 18 query, 19 { domain: 'code-generation' } 20);

Performance Characteristics

  • Pattern Search: 150x faster (100µs vs 15ms)
  • Memory Retrieval: <1ms (with cache)
  • Batch Insert: 500x faster (2ms vs 1s for 100 patterns)
  • Trajectory Judgment: <5ms (including retrieval + analysis)
  • Memory Distillation: <50ms (consolidate 100 patterns)

Advanced Patterns

Hierarchical Memory

Organize memories by abstraction level:

typescript
1// Low-level: Specific implementation 2await rb.insertPattern({ 3 type: 'concrete', 4 domain: 'debugging/null-pointer', 5 pattern_data: JSON.stringify({ 6 embedding, 7 pattern: { bug: 'NPE in UserService.getUser()', fix: 'Add null check' } 8 }), 9 confidence: 0.9, 10 // ... 11}); 12 13// Mid-level: Pattern across similar cases 14await rb.insertPattern({ 15 type: 'pattern', 16 domain: 'debugging', 17 pattern_data: JSON.stringify({ 18 embedding, 19 pattern: { category: 'null-pointer', approach: 'defensive-checks' } 20 }), 21 confidence: 0.85, 22 // ... 23}); 24 25// High-level: General principle 26await rb.insertPattern({ 27 type: 'principle', 28 domain: 'software-engineering', 29 pattern_data: JSON.stringify({ 30 embedding, 31 pattern: { principle: 'fail-fast with clear errors' } 32 }), 33 confidence: 0.95, 34 // ... 35});

Multi-Domain Learning

Transfer learning across domains:

typescript
1// Learn from backend optimization 2const backendExperience = await rb.retrieveWithReasoning(embedding, { 3 domain: 'backend-optimization', 4 k: 10, 5}); 6 7// Apply to frontend optimization 8const transferredKnowledge = backendExperience.memories.map(mem => ({ 9 ...mem, 10 domain: 'frontend-optimization', 11 adapted: true, 12}));

CLI Operations

Database Management

bash
1# Export trajectories and patterns 2npx agentdb@latest export ./.agentdb/reasoningbank.db ./backup.json 3 4# Import experiences 5npx agentdb@latest import ./experiences.json 6 7# Get statistics 8npx agentdb@latest stats ./.agentdb/reasoningbank.db 9# Shows: total patterns, domains, confidence distribution

Migration

bash
1# Migrate from legacy ReasoningBank 2npx agentdb@latest migrate --source .swarm/memory.db --target .agentdb/reasoningbank.db 3 4# Validate migration 5npx agentdb@latest stats .agentdb/reasoningbank.db

Troubleshooting

Issue: Migration fails

bash
1# Check source database exists 2ls -la .swarm/memory.db 3 4# Run with verbose logging 5DEBUG=agentdb:* npx agentdb@latest migrate --source .swarm/memory.db

Issue: Low confidence scores

typescript
1// Enable context synthesis for better quality 2const result = await rb.retrieveWithReasoning(embedding, { 3 synthesizeContext: true, 4 useMMR: true, 5 k: 10, 6});

Issue: Memory growing too large

typescript
1// Enable automatic optimization 2const result = await rb.retrieveWithReasoning(embedding, { 3 optimizeMemory: true, // Consolidates similar patterns 4}); 5 6// Or manually optimize 7await rb.optimize();

Learn More


Category: Machine Learning / Reinforcement Learning Difficulty: Intermediate Estimated Time: 20-30 minutes

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is ReasoningBank with AgentDB?

Ideal for Advanced AI Agents seeking accelerated adaptive learning and decision-making capabilities with Node.js 18+ and AgentDB v1.0.7+ Living intelligence that overlays any AI. Ten Guardian intelligences, context that compounds, and the creative civilization OS for creators who build universes.

How do I install ReasoningBank with AgentDB?

Run the command: npx killer-skills add frankxai/arcanea/ReasoningBank with AgentDB. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for ReasoningBank with AgentDB?

Key use cases include: Enhancing decision-making through accelerated adaptive learning patterns, Distilling memories for improved outcome judgment, Optimizing agent performance with high-speed batch operations, Implementing context-compounding intelligence for complex problem-solving.

Which IDEs are compatible with ReasoningBank with AgentDB?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for ReasoningBank with AgentDB?

Requires Node.js 18+. Dependent on AgentDB v1.0.7+ via agentic-flow.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add frankxai/arcanea/ReasoningBank with AgentDB. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use ReasoningBank with AgentDB immediately in the current project.

Related Skills

Looking for an alternative to ReasoningBank with AgentDB or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI