मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट102k · #836

ReasoningBank with AgentDB

यह क्या करती है

यह स्किल दिखाती है कि AgentDB स्टोरेज के ऊपर ReasoningBank का उपयोग करके ऐसा एजेंट कैसे बनाएँ जो अपने अनुभवों से सीखे। यह खुद में सुधार करने वाले AI सिस्टम बनाने वाले डेवलपर के लिए है।

कब इस्तेमाल करें

  • ✓जब आप चाहते हैं कि एजेंट याद रखे कि कौन से तरीके काम आए और उन्हें दोबारा इस्तेमाल करे।
  • ✓जब आपको एजेंट को अपने नतीजे खुद आंकने और उनसे सीखने देना है।
  • ✓जब आप पुराने ReasoningBank सेटअप को AgentDB पर ले जा रहे हैं।

Skill का लिंक

https://github.com/ruvnet/RuView/blob/main/.claude/skills/reasoningbank-agentdb/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/ruvnet/RuView/blob/main/.claude/skills/reasoningbank-agentdb/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे AI असिस्टेंट को याद रखने दीजिए कि ग्राहकों को कौन से जवाब पसंद आए, और अगली बार वही तरीके इस्तेमाल कीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट हर काम को एक ट्रैजेक्टरी के रूप में दर्ज करता है, आंकता है कि वह सफल रहा या नहीं, और सबक को मेमोरी में संक्षिप्त करता है। आगे के फ़ैसले फिर उन सहेजे गए पैटर्न में खोजकर देखते हैं कि क्या काम आया था।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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

# Initialize AgentDB for ReasoningBank
npx agentdb@latest init ./.agentdb/reasoningbank.db --dimension 1536

# Start MCP server for Claude Code integration
npx agentdb@latest mcp
claude mcp add agentdb npx agentdb@latest mcp

Migrate from Legacy ReasoningBank

# Automatic migration with validation
npx agentdb@latest migrate --source .swarm/memory.db

# Verify migration
npx agentdb@latest stats ./.agentdb/reasoningbank.db

Quick Start with API

import { createAgentDBAdapter, computeEmbedding } from 'agentic-flow/reasoningbank';

// Initialize ReasoningBank with AgentDB
const rb = await createAgentDBAdapter({
  dbPath: '.agentdb/reasoningbank.db',
  enableLearning: true,      // Enable learning plugins
  enableReasoning: true,      // Enable reasoning agents
  cacheSize: 1000,            // 1000 pattern cache
});

// Store successful experience
const query = "How to optimize database queries?";
const embedding = await computeEmbedding(query);

await rb.insertPattern({
  id: '',
  type: 'experience',
  domain: 'database-optimization',
  pattern_data: JSON.stringify({
    embedding,
    pattern: {
      query,
      approach: 'indexing + query optimization',
      outcome: 'success',
      metrics: { latency_reduction: 0.85 }
    }
  }),
  confidence: 0.95,
  usage_count: 1,
  success_count: 1,
  created_at: Date.now(),
  last_used: Date.now(),
});

// Retrieve similar experiences with reasoning
const result = await rb.retrieveWithReasoning(embedding, {
  domain: 'database-optimization',
  k: 5,
  useMMR: true,              // Diverse results
  synthesizeContext: true,    // Rich context synthesis
});

console.log('Memories:', result.memories);
console.log('Context:', result.context);
console.log('Patterns:', result.patterns);

Core ReasoningBank Concepts

1. Trajectory Tracking

Track agent execution paths and outcomes:

// Record trajectory (sequence of actions)
const trajectory = {
  task: 'optimize-api-endpoint',
  steps: [
    { action: 'analyze-bottleneck', result: 'found N+1 query' },
    { action: 'add-eager-loading', result: 'reduced queries' },
    { action: 'add-caching', result: 'improved latency' }
  ],
  outcome: 'success',
  metrics: { latency_before: 2500, latency_after: 150 }
};

const embedding = await computeEmbedding(JSON.stringify(trajectory));

await rb.insertPattern({
  id: '',
  type: 'trajectory',
  domain: 'api-optimization',
  pattern_data: JSON.stringify({ embedding, pattern: trajectory }),
  confidence: 0.9,
  usage_count: 1,
  success_count: 1,
  created_at: Date.now(),
  last_used: Date.now(),
});

2. Verdict Judgment

Judge whether a trajectory was successful:

// Retrieve similar past trajectories
const similar = await rb.retrieveWithReasoning(queryEmbedding, {
  domain: 'api-optimization',
  k: 10,
});

// Judge based on similarity to successful patterns
const verdict = similar.memories.filter(m =>
  m.pattern.outcome === 'success' &&
  m.similarity > 0.8
).length > 5 ? 'likely_success' : 'needs_review';

console.log('Verdict:', verdict);
console.log('Confidence:', similar.memories[0]?.similarity || 0);

3. Memory Distillation

Consolidate similar experiences into patterns:

// Get all experiences in domain
const experiences = await rb.retrieveWithReasoning(embedding, {
  domain: 'api-optimization',
  k: 100,
  optimizeMemory: true,  // Automatic consolidation
});

// Distill into high-level pattern
const distilledPattern = {
  domain: 'api-optimization',
  pattern: 'For N+1 queries: add eager loading, then cache',
  success_rate: 0.92,
  sample_size: experiences.memories.length,
  confidence: 0.95
};

await rb.insertPattern({
  id: '',
  type: 'distilled-pattern',
  domain: 'api-optimization',
  pattern_data: JSON.stringify({
    embedding: await computeEmbed
अक्सर पूछे जाने वाले सवाल

क्या मुझे रीइनफ़ोर्समेंट लर्निंग का ज्ञान चाहिए?

नहीं। स्किल रीइनफ़ोर्समेंट लर्निंग की अवधारणाओं को वैकल्पिक पृष्ठभूमि के रूप में बताती है।

पुराना डेटा कैसे ले जाऊँ?

स्किल एक माइग्रेशन कमांड दिखाती है जो पुरानी मेमोरी फ़ाइल से डेटा आयात करता है।

पहले क्या इंस्टॉल होना चाहिए?

Node.js 18 या उससे नया, और AgentDB 1.0.7 या उससे नया संस्करण।

जानकारी

लेखक का मूल विवरण

Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems.

repo: ruvnet/RuView

लोकप्रियता

GitHub स्टार
102k
रैंकिंग में स्थान
#836
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

AgentDB Advanced Features

102k

यह आपके एजेंट को AgentDB के उन्नत फ़ीचर दिखाती है, जैसे कई मशीनों के बीच डेटाबेस सिंक करना और मेटाडेटा फ़िल्टर के साथ वेक्टर सर्च।

डेटाडेटाबेस

AgentDB Learning Plugins

102k

यह आपके एजेंट को AgentDB के लिए लर्निंग प्लगइन बनाने और ट्रेन करने देती है, जो पिछले अनुभव से सुधरने वाले रीइनफ़ोर्समेंट लर्निंग तरीकों पर चलते हैं।

AI और एजेंटएजेंट

AgentDB Memory Patterns

102k

यह आपके एजेंट को AgentDB को स्थायी मेमोरी स्टोर बनाकर सत्रों के पार बातचीत और संदर्भ याद रखने देती है।

AI और एजेंटएजेंट

AgentDB Performance Optimization

102k

यह आपके एजेंट को AgentDB सर्च तेज़ करने और मेमोरी उपयोग घटाने का तरीका दिखाती है, कंप्रेशन, तेज़ सर्च इंडेक्स और कैशिंग से।

डेटाडेटाबेस

मिलती-जुलती skills