[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74AWSDAZR5B6ZAA3YB3PX8M":3,"skill-same:01M74AWSDAZR5B6ZAA3YB3PX8M":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M74AWSDAZR5B6ZAA3YB3PX8M","AgentDB Learning Plugins",null,"Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.","aicreator350\u002FaurionOFFICIELLE","aicreator350","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217751428?v=4","01M731QVHB22WCM6PDX5VFN1RV","01M731QVJ0TAD058M1SW9MY548",0,"MIT","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills\u002Fagentdb-learning\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"AgentDB Learning Plugins\"\ndescription: \"Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.\"\n---\n\n# AgentDB Learning Plugins\n\n## What This Skill Does\n\nProvides access to 9 reinforcement learning algorithms via AgentDB's plugin system. Create, train, and deploy learning plugins for autonomous agents that improve through experience. Includes offline RL (Decision Transformer), value-based learning (Q-Learning), policy gradients (Actor-Critic), and advanced techniques.\n\n**Performance**: Train models 10-100x faster with WASM-accelerated neural inference.\n\n## Prerequisites\n\n- Node.js 18+\n- AgentDB v1.0.7+ (via agentic-flow)\n- Basic understanding of reinforcement learning (recommended)\n\n---\n\n## Quick Start with CLI\n\n### Create Learning Plugin\n\n```bash\n# Interactive wizard\nnpx agentdb@latest create-plugin\n\n# Use specific template\nnpx agentdb@latest create-plugin -t decision-transformer -n my-agent\n\n# Preview without creating\nnpx agentdb@latest create-plugin -t q-learning --dry-run\n\n# Custom output directory\nnpx agentdb@latest create-plugin -t actor-critic -o .\u002Fplugins\n```\n\n### List Available Templates\n\n```bash\n# Show all plugin templates\nnpx agentdb@latest list-templates\n\n# Available templates:\n# - decision-transformer (sequence modeling RL - recommended)\n# - q-learning (value-based learning)\n# - sarsa (on-policy TD learning)\n# - actor-critic (policy gradient with baseline)\n# - curiosity-driven (exploration-based)\n```\n\n### Manage Plugins\n\n```bash\n# List installed plugins\nnpx agentdb@latest list-plugins\n\n# Get plugin information\nnpx agentdb@latest plugin-info my-agent\n\n# Shows: algorithm, configuration, training status\n```\n\n---\n\n## Quick Start with API\n\n```typescript\nimport { createAgentDBAdapter } from 'agentic-flow\u002Freasoningbank';\n\n\u002F\u002F Initialize with learning enabled\nconst adapter = await createAgentDBAdapter({\n  dbPath: '.agentdb\u002Flearning.db',\n  enableLearning: true,       \u002F\u002F Enable learning plugins\n  enableReasoning: true,\n  cacheSize: 1000,\n});\n\n\u002F\u002F Store training experience\nawait adapter.insertPattern({\n  id: '',\n  type: 'experience',\n  domain: 'game-playing',\n  pattern_data: JSON.stringify({\n    embedding: await computeEmbedding('state-action-reward'),\n    pattern: {\n      state: [0.1, 0.2, 0.3],\n      action: 2,\n      reward: 1.0,\n      next_state: [0.15, 0.25, 0.35],\n      done: false\n    }\n  }),\n  confidence: 0.9,\n  usage_count: 1,\n  success_count: 1,\n  created_at: Date.now(),\n  last_used: Date.now(),\n});\n\n\u002F\u002F Train learning model\nconst metrics = await adapter.train({\n  epochs: 50,\n  batchSize: 32,\n});\n\nconsole.log('Training Loss:', metrics.loss);\nconsole.log('Duration:', metrics.duration, 'ms');\n```\n\n---\n\n## Available Learning Algorithms (9 Total)\n\n### 1. Decision Transformer (Recommended)\n\n**Type**: Offline Reinforcement Learning\n**Best For**: Learning from logged experiences, imitation learning\n**Strengths**: No online interaction needed, stable training\n\n```bash\nnpx agentdb@latest create-plugin -t decision-transformer -n dt-agent\n```\n\n**Use Cases**:\n- Learn from historical data\n- Imitation learning from expert demonstrations\n- Safe learning without environment interaction\n- Sequence modeling tasks\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"decision-transformer\",\n  \"model_size\": \"base\",\n  \"context_length\": 20,\n  \"embed_dim\": 128,\n  \"n_heads\": 8,\n  \"n_layers\": 6\n}\n```\n\n### 2. Q-Learning\n\n**Type**: Value-Based RL (Off-Policy)\n**Best For**: Discrete action spaces, sample efficiency\n**Strengths**: Proven, simple, works well for small\u002Fmedium problems\n\n```bash\nnpx agentdb@latest create-plugin -t q-learning -n q-agent\n```\n\n**Use Cases**:\n- Grid worlds, board games\n- Navigation tasks\n- Resource allocation\n- Discrete decision-making\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"q-learning\",\n  \"learning_rate\": 0.001,\n  \"gamma\": 0.99,\n  \"epsilon\": 0.1,\n  \"epsilon_decay\": 0.995\n}\n```\n\n### 3. SARSA\n\n**Type**: Value-Based RL (On-Policy)\n**Best For**: Safe exploration, risk-sensitive tasks\n**Strengths**: More conservative than Q-Learning, better for safety\n\n```bash\nnpx agentdb@latest create-plugin -t sarsa -n sarsa-agent\n```\n\n**Use Cases**:\n- Safety-critical applications\n- Risk-sensitive decision-making\n- Online learning with exploration\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"sarsa\",\n  \"learning_rate\": 0.001,\n  \"gamma\": 0.99,\n  \"epsilon\": 0.1\n}\n```\n\n### 4. Actor-Critic\n\n**Type**: Policy Gradient with Value Baseline\n**Best For**: Continuous actions, variance reduction\n**Strengths**: Stable, works for continuous\u002Fdiscrete actions\n\n```bash\nnpx agentdb@latest create-plugin -t actor-critic -n ac-agent\n```\n\n**Use Cases**:\n- Continuous control (robotics, simulations)\n- Complex action spaces\n- Multi-agent coordination\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"actor-critic\",\n  \"actor_lr\": 0.001,\n  \"critic_lr\": 0.002,\n  \"gamma\": 0.99,\n  \"entropy_coef\": 0.01\n}\n```\n\n### 5. Active Learning\n\n**Type**: Query-Based Learning\n**Best For**: Label-efficient learning, human-in-the-loop\n**Strengths**: Minimizes labeling cost, focuses on uncertain samples\n\n**Use Cases**:\n- Human feedback incorporation\n- Label-efficient training\n- Uncertainty sampling\n- Annotation cost reduction\n\n### 6. Adversarial Training\n\n**Type**: Robustness Enhancement\n**Best For**: Safety, robustness to perturbations\n**Strengths**: Improves model robustness, adversarial defense\n\n**Use Cases**:\n- Security applications\n- Robust decision-making\n- Adversarial defense\n- Safety testing\n\n### 7. Curriculum Learning\n\n**Type**: Progressive Difficulty Training\n**Best For**: Complex tasks, faster convergence\n**Strengths**: Stable learning, faster convergence on hard tasks\n\n**Use Cases**:\n- Complex multi-stage tasks\n- Hard exploration problems\n- Skill composition\n- Transfer learning\n\n### 8. Federated Learning\n\n**Type**: Distributed Learning\n**Best For**: Privacy, distributed data\n**Strengths**: Privacy-preserving, scalable\n\n**Use Cases**:\n- Multi-agent systems\n- Privacy-sensitive data\n- Distributed training\n- Collaborative learning\n\n### 9. Multi-Task Learning\n\n**Type**: Transfer Learning\n**Best For**: Related tasks, knowledge sharing\n**Strengths**: Faster learning on new tasks, better generalization\n\n**Use Cases**:\n- Task families\n- Transfer learning\n- Domain adaptation\n- Meta-learning\n\n---\n\n## Training Workflow\n\n### 1. Collect Experiences\n\n```typescript\n\u002F\u002F Store experiences during agent execution\nfor (let i = 0; i \u003C numEpisodes; i++) {\n  const episode = runEpisode();\n\n  for (const step of episode.steps) {\n    await adapter.insertPattern({\n      id: '',\n      type: 'experience',\n      domain: 'task-domain',\n      pattern_data: JSON.stringify({\n        embedding: await computeEmbedding(JSON.stringify(step)),\n        pattern: {\n          state: step.state,\n          action: step.action,\n          reward: step.reward,\n          next_state: step.next_state,\n          done: step.done\n        }\n      }),\n      confidence: step.reward > 0 ? 0.9 : 0.5,\n      usage_count: 1,\n      success_count: step.reward > 0 ? 1 : 0,\n      created_at: Date.now(),\n      last_used: Date.now(),\n    });\n  }\n}\n```\n\n### 2. Train Model\n\n```typescript\n\u002F\u002F Train on collected experiences\nconst trainingMetrics = await adapter.train({\n  epochs: 100,\n  batchSize: 64,\n  learningRate: 0.001,\n  validationSplit: 0.2,\n});\n\nconsole.log('Training Metrics:', trainingMetrics);\n\u002F\u002F {\n\u002F\u002F   loss: 0.023,\n\u002F\u002F   valLoss: 0.028,\n\u002F\u002F   duration: 1523,\n\u002F\u002F   epochs: 100\n\u002F\u002F }\n```\n\n### 3. Evaluate Performance\n\n```typescript\n\u002F\u002F Retrieve similar successful experiences\nconst testQuery = await computeEmbedding(JSON.stringify(testState));\nconst result = await adapter.retrieveWithReasoning(testQuery, {\n  domain: 'task-domain',\n  k: 10,\n  synthesizeContext: true,\n});\n\n\u002F\u002F Evaluate action quality\nconst suggestedAction = result.memories[0].pattern.action;\nconst confidence = result.memories[0].similarity;\n\nconsole.log('Suggested Action:', suggestedAction);\nconsole.log('Confidence:', confidence);\n```\n\n---\n\n## Advanced Training Techniques\n\n### Experience Replay\n\n```typescript\n\u002F\u002F Store experiences in buffer\nconst replayBuffer = [];\n\n\u002F\u002F Sample random batch for training\nconst batch = sampleRandomBatch(replayBuffer, batchSize: 32);\n\n\u002F\u002F Train on batch\nawait adapter.train({\n  data: batch,\n  epochs: 1,\n  batchSize: 32,\n});\n```\n\n### Prioritized Experience Replay\n\n```typescript\n\u002F\u002F Store experiences with priority (TD error)\nawait adapter.insertPattern({\n  \u002F\u002F ... standard fields\n  confidence: tdError,  \u002F\u002F Use TD error as confidence\u002Fpriority\n  \u002F\u002F ...\n});\n\n\u002F\u002F Retrieve high-priority experiences\nconst highPriority = await adapter.retrieveWithReasoning(queryEmbedding, {\n  domain: 'task-domain',\n  k: 32,\n  minConfidence: 0.7,  \u002F\u002F Only high TD-error experiences\n});\n```\n\n### Multi-Agent Training\n\n```typescript\n\u002F\u002F Collect experiences from multiple agents\nfor (const agent of agents) {\n  const experience = await agent.step();\n\n  await adapter.insertPattern({\n    \u002F\u002F ... store experience with agent ID\n    domain: `multi-agent\u002F${agent.id}`,\n  });\n}\n\n\u002F\u002F Train shared model\nawait adapter.train({\n  epochs: 50,\n  batchSize: 64,\n});\n```\n\n---\n\n## Performance Optimization\n\n### Batch Training\n\n```typescript\n\u002F\u002F Collect batch of experiences\nconst experiences = collectBatch(size: 1000);\n\n\u002F\u002F Batch insert (500x faster)\nfor (const exp of experiences) {\n  await adapter.insertPattern({ \u002F* ... *\u002F });\n}\n\n\u002F\u002F Train on batch\nawait adapter.train({\n  epochs: 10,\n  batchSize: 128,  \u002F\u002F Larger batch for efficiency\n});\n```\n\n### Incremental Learning\n\n```typescript\n\u002F\u002F Train incrementally as new data arrives\nsetInterval(async () => {\n  const newExperiences = getNewExperiences();\n\n  if (newExperiences.length > 100) {\n    await adapter.train({\n      epochs: 5,\n      batchSize: 32,\n    });\n  }\n}, 60000);  \u002F\u002F Every minute\n```\n\n---\n\n## Integration with Reasoning Agents\n\nCombine learning with reasoning for better performance:\n\n```typescript\n\u002F\u002F Train learning model\nawait adapter.train({ epochs: 50, batchSize: 32 });\n\n\u002F\u002F Use reasoning agents for inference\nconst result = await adapter.retrieveWithReasoning(queryEmbedding, {\n  domain: 'decision-making',\n  k: 10,\n  useMMR: true,              \u002F\u002F Diverse experiences\n  synthesizeContext: true,    \u002F\u002F Rich context\n  optimizeMemory: true,       \u002F\u002F Consolidate patterns\n});\n\n\u002F\u002F Make decision based on learned experiences + reasoning\nconst decision = result.context.suggestedAction;\nconst confidence = result.memories[0].similarity;\n```\n\n---\n\n## CLI Operations\n\n```bash\n# Create plugin\nnpx agentdb@latest create-plugin -t decision-transformer -n my-plugin\n\n# List plugins\nnpx agentdb@latest list-plugins\n\n# Get plugin info\nnpx agentdb@latest plugin-info my-plugin\n\n# List templates\nnpx agentdb@latest list-templates\n```\n\n---\n\n## Troubleshooting\n\n### Issue: Training not converging\n```typescript\n\u002F\u002F Reduce learning rate\nawait adapter.train({\n  epochs: 100,\n  batchSize: 32,\n  learningRate: 0.0001,  \u002F\u002F Lower learning rate\n});\n```\n\n### Issue: Overfitting\n```typescript\n\u002F\u002F Use validation split\nawait adapter.train({\n  epochs: 50,\n  batchSize: 64,\n  validationSplit: 0.2,  \u002F\u002F 20% validation\n});\n\n\u002F\u002F Enable memory optimization\nawait adapter.retrieveWithReasoning(queryEmbedding, {\n  optimizeMemory: true,  \u002F\u002F Consolidate, reduce overfitting\n});\n```\n\n### Issue: Slow training\n```bash\n# Enable quantization for faster inference\n# Use binary quantization (32x faster)\n```\n\n---\n\n## Learn More\n\n- **Algorithm Papers**: See docs\u002Falgorithms\u002F for detailed papers\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fagentic-flow\u002Ftree\u002Fmain\u002Fpackages\u002Fagentdb\n- **MCP Integration**: `npx agentdb@latest mcp`\n- **Website**: https:\u002F\u002Fagentdb.ruv.io\n\n---\n\n**Category**: Machine Learning \u002F Reinforcement Learning\n**Difficulty**: Intermediate to Advanced\n**Estimated Time**: 30-60 minutes\n","# AgentDB Learning Plugins\n\n## What This Skill Does\n\nProvides access to 9 reinforcement learning algorithms via AgentDB's plugin system. Create, train, and deploy learning plugins for autonomous agents that improve through experience. Includes offline RL (Decision Transformer), value-based learning (Q-Learning), policy gradients (Actor-Critic), and advanced techniques.\n\n**Performance**: Train models 10-100x faster with WASM-accelerated neural inference.\n\n## Prerequisites\n\n- Node.js 18+\n- AgentDB v1.0.7+ (via agentic-flow)\n- Basic understanding of reinforcement learning (recommended)\n\n---\n\n## Quick Start with CLI\n\n### Create Learning Plugin\n\n```bash\n# Interactive wizard\nnpx agentdb@latest create-plugin\n\n# Use specific template\nnpx agentdb@latest create-plugin -t decision-transformer -n my-agent\n\n# Preview without creating\nnpx agentdb@latest create-plugin -t q-learning --dry-run\n\n# Custom output directory\nnpx agentdb@latest create-plugin -t actor-critic -o .\u002Fplugins\n```\n\n### List Available Templates\n\n```bash\n# Show all plugin templates\nnpx agentdb@latest list-templates\n\n# Available templates:\n# - decision-transformer (sequence modeling RL - recommended)\n# - q-learning (value-based learning)\n# - sarsa (on-policy TD learning)\n# - actor-critic (policy gradient with baseline)\n# - curiosity-driven (exploration-based)\n```\n\n### Manage Plugins\n\n```bash\n# List installed plugins\nnpx agentdb@latest list-plugins\n\n# Get plugin information\nnpx agentdb@latest plugin-info my-agent\n\n# Shows: algorithm, configuration, training status\n```\n\n---\n\n## Quick Start with API\n\n```typescript\nimport { createAgentDBAdapter } from 'agentic-flow\u002Freasoningbank';\n\n\u002F\u002F Initialize with learning enabled\nconst adapter = await createAgentDBAdapter({\n  dbPath: '.agentdb\u002Flearning.db',\n  enableLearning: true,       \u002F\u002F Enable learning plugins\n  enableReasoning: true,\n  cacheSize: 1000,\n});\n\n\u002F\u002F Store training experience\nawait adapter.insertPattern({\n  id: '',\n  type: 'experience',\n  domain: 'game-playing',\n  pattern_data: JSON.stringify({\n    embedding: await computeEmbedding('state-action-reward'),\n    pattern: {\n      state: [0.1, 0.2, 0.3],\n      action: 2,\n      reward: 1.0,\n      next_state: [0.15, 0.25, 0.35],\n      done: false\n    }\n  }),\n  confidence: 0.9,\n  usage_count: 1,\n  success_count: 1,\n  created_at: Date.now(),\n  last_used: Date.now(),\n});\n\n\u002F\u002F Train learning model\nconst metrics = await adapter.train({\n  epochs: 50,\n  batchSize: 32,\n});\n\nconsole.log('Training Loss:', metrics.loss);\nconsole.log('Duration:', metrics.duration, 'ms');\n```\n\n---\n\n## Available Learning Algorithms (9 Total)\n\n### 1. Decision Transformer (Recommended)\n\n**Type**: Offline Reinforcement Learning\n**Best For**: Learning from logged experiences, imitation learning\n**Strengths**: No online interaction needed, stable training\n\n```bash\nnpx agentdb@latest create-plugin -t decision-transformer -n dt-agent\n```\n\n**Use Cases**:\n- Learn from historical data\n- Imitation learning from expert demonstrations\n- Safe learning without environment interaction\n- Sequence modeling tasks\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"decision-transformer\",\n  \"model_size\": \"base\",\n  \"context_length\": 20,\n  \"embed_dim\": 128,\n  \"n_heads\": 8,\n  \"n_layers\": 6\n}\n```\n\n### 2. Q-Learning\n\n**Type**: Value-Based RL (Off-Policy)\n**Best For**: Discrete action spaces, sample efficiency\n**Strengths**: Proven, simple, works well for small\u002Fmedium problems\n\n```bash\nnpx agentdb@latest create-plugin -t q-learning -n q-agent\n```\n\n**Use Cases**:\n- Grid worlds, board games\n- Navigation tasks\n- Resource allocation\n- Discrete decision-making\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"q-learning\",\n  \"learning_rate\": 0.001,\n  \"gamma\": 0.99,\n  \"epsilon\": 0.1,\n  \"epsilon_decay\": 0.995\n}\n```\n\n### 3. SARSA\n\n**Type**: Value-Based RL (On-Policy)\n**Best For**: Safe exploration, risk-sensitive tasks\n**Strengths**: More conservative than Q-Learning, better for safety\n\n```bash\nnpx agentdb@latest create-plugin -t sarsa -n sarsa-agent\n```\n\n**Use Cases**:\n- Safety-critical applications\n- Risk-sensitive decision-making\n- Online learning with exploration\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"sarsa\",\n  \"learning_rate\": 0.001,\n  \"gamma\": 0.99,\n  \"epsilon\": 0.1\n}\n```\n\n### 4. Actor-Critic\n\n**Type**: Policy Gradient with Value Baseline\n**Best For**: Continuous actions, variance reduction\n**Strengths**: Stable, works for continuous\u002Fdiscrete actions\n\n```bash\nnpx agentdb@latest create-plugin -t actor-critic -n ac-agent\n```\n\n**Use Cases**:\n- Continuous control (robotics, simulations)\n- Complex action spaces\n- Multi-agent coordination\n\n**Configuration**:\n```json\n{\n  \"algorithm\": \"actor-critic\",\n  \"actor_lr\": 0.001,\n  \"critic_lr\": 0.002,\n  \"gamma\": 0.99,\n  \"entropy_coef\": 0.01\n}\n```\n\n### 5. Active Learning\n\n**Type**: Query-Based Learning\n**Best For**: Label-efficient learning, human-in-the-loop\n**Strengths**: Minimizes labeling cost, focuses on uncertain samples\n\n**Use Cases**:\n- Human feedback incorporation\n- Label-efficient training\n- Uncertainty sampling\n- Annotation cost reduction\n\n### 6. Adversarial Training\n\n**Type**: Robustness Enhancement\n**Best For**: Safety, robustness to perturbations\n**Strengths**: Improves model robustness, adversarial defense\n\n**Use Cases**:\n- Security applications\n- Robust decision-making\n- Adversarial defense\n- Safety testing\n\n### 7. Curriculum Learning\n\n**Type**: Progressive Difficulty Training\n**Best For**: Complex tasks, faster convergence\n**Strengths**: Stable learning, faster convergence on hard tasks\n\n**Use Cases**:\n- Complex multi-stage tasks\n- Hard exploration problems\n- Skill composition\n- Transfer learning\n\n### 8. Federated Learning\n\n**Type**: Distributed Learning\n**Best For**: Privacy, distributed data\n**Strengths**: Privacy-preserving, scalable\n\n**Use Cases**:\n- Multi-agent systems\n- Privacy-sensitive data\n- Distributed training\n- Collaborative learning\n\n### 9. Multi-Task Learning\n\n**Type**: Transfer Learning\n**Best For**: Related tasks, knowledge sharing\n**Strengths**: Faster learning on new tasks, better generalization\n\n**Use Cases**:\n- Task families\n- Transfer learning\n- Domain adaptation\n- Meta-learning\n\n---\n\n## Training Workflow\n\n### 1. Collect Experiences\n\n```typescript\n\u002F\u002F Store experiences during agent execution\nfor (let i = 0; i \u003C numEpisodes; i++) {\n  const episode = runEpisode();\n\n  for (const step of episode.steps) {\n    await adapter.insertPattern({\n      id: '',\n      type: 'experience',\n      domain: 'task-domain',\n      pattern_data: JSON.stringify({\n        embedding: await computeEmbedding(JSON.stringify(step)),\n        pattern: {\n          state: step.state,\n          action: step.action,\n          reward: step.reward,\n          next_state: step.next_state,\n          done: step.done\n        }\n      }),\n      confidence: step.reward > 0 ? 0.9 : 0.5,\n      usage_count: 1,\n      success_count: step.reward > 0 ? 1 : 0,\n      created_at: Date.now(),\n      last_used: Date.now(),\n    });\n  }\n}\n```\n\n### 2. Train Model\n\n```typescript\n\u002F\u002F Train on collected experiences\nconst trainingMetrics = await adapter.train({\n  epochs: 100,\n  batchSize: 64,\n  learningRate: 0.001,\n  validationSplit: 0.2,\n});\n\nconsole.log('Training Metrics:', trainingMetrics);\n\u002F\u002F {\n\u002F\u002F   loss: 0.023,\n\u002F\u002F   valLoss: 0.028,\n\u002F\u002F   duration: 1523,\n\u002F\u002F   epochs: 100\n\u002F\u002F }\n```\n\n### 3. Evaluate Performance\n\n```typescript\n\u002F\u002F Retrieve similar successful experiences\nconst testQuery = await computeEmbedding(JSON.stringify(testState));\nconst result = await adapter.retrieveWithReasoning(testQuery, {\n  domain: 'task-domain',\n  k: 10,\n  synthesizeContext: true,\n});\n\n\u002F\u002F Evaluate action quality\nconst suggestedAction = result.memories[0].pattern.action;\nconst confidence = result.memories[0].similarity;\n\nconsole.log('Suggested Action:', suggestedAction);\nconsole.log('Confidence:', confidence);\n```\n\n---\n\n## Advanced Training Techniques\n\n### Experience Replay\n\n```typescript\n\u002F\u002F Store experiences in buffer\nconst replayBuffer = [];\n\n\u002F\u002F Sample random batch for training\nconst batch = sampleRandomBatch(replayBuffer, batchSize: 32);\n\n\u002F\u002F Train on batch\nawait adapter.train({\n  data: batch,\n  epochs: 1,\n  batchSize: 32,\n});\n```\n\n### Prioritized Experience Replay\n\n```typescript\n\u002F\u002F Store experiences with priority (TD error)\nawait adapter.insertPattern({\n  \u002F\u002F ... standard fields\n  confidence: tdError,  \u002F\u002F Use TD error as confidence\u002Fpriority\n  \u002F\u002F ...\n});\n\n\u002F\u002F Retrieve high-priority experiences\nconst highPriority = await adapter.retrieveWithReasoning(queryEmbedding, {\n  domain: 'task-domain',\n  k: 32,\n  minConfidence: 0.7,  \u002F\u002F Only high TD-error experiences\n});\n```\n\n### Multi-Agent Training\n\n```typescript\n\u002F\u002F Collect experiences from multiple agents\nfor (const agent of agents) {\n  const experience = await agent.step();\n\n  await adapter.insertPattern({\n    \u002F\u002F ... store experience with agent ID\n    domain: `multi-agent\u002F${agent.id}`,\n  });\n}\n\n\u002F\u002F Train shared model\nawait adapter.train({\n  epochs: 50,\n  batchSize: 64,\n});\n```\n\n---\n\n## Performance Optimization\n\n### Batch Training\n\n```typescript\n\u002F\u002F Collect batch of experiences\nconst experiences = collectBatch(size: 1000);\n\n\u002F\u002F Batch insert (500x faster)\nfor (const exp of experiences) {\n  await adapter.insertPattern({ \u002F* ... *\u002F });\n}\n\n\u002F\u002F Train on batch\nawait adapter.train({\n  epochs: 10,\n  batchSize: 128,  \u002F\u002F Larger batch for efficiency\n});\n```\n\n### Incremental Learning\n\n```typescript\n\u002F\u002F Train incrementally as new data arrives\nsetInterval(async () => {\n  const newExperiences = getNewExperiences();\n\n  if (newExperiences.length > 100) {\n    await adapter.train({\n      epochs: 5,\n      batchSize: 32,\n    });\n  }\n}, 60000);  \u002F\u002F Every minute\n```\n\n---\n\n## Integration with Reasoning Agents\n\nCombine learning with reasoning for better performance:\n\n```typescript\n\u002F\u002F Train learning model\nawait adapter.train({ epochs: 50, batchSize: 32 });\n\n\u002F\u002F Use reasoning agents for inference\nconst result = await adapter.retrieveWithReasoning(queryEmbedding, {\n  domain: 'decision-making',\n  k: 10,\n  useMMR: true,              \u002F\u002F Diverse experiences\n  synthesizeContext: true,    \u002F\u002F Rich context\n  optimizeMemory: true,       \u002F\u002F Consolidate patterns\n});\n\n\u002F\u002F Make decision based on learned experiences + reasoning\nconst decision = result.context.suggestedAction;\nconst confidence = result.memories[0].similarity;\n```\n\n---\n\n## CLI Operations\n\n```bash\n# Create plugin\nnpx agentdb@latest create-plugin -t decision-transformer -n my-plugin\n\n# List plugins\nnpx agentdb@latest list-plugins\n\n# Get plugin info\nnpx agentdb@latest plugin-info my-plugin\n\n# List templates\nnpx agentdb@latest list-templates\n```\n\n---\n\n## Troubleshooting\n\n### Issue: Training not converging\n```typescript\n\u002F\u002F Reduce learning rate\nawait adapter.train({\n  epochs: 100,\n  batchSize: 32,\n  learningRate: 0.0001,  \u002F\u002F Lower learning rate\n});\n```\n\n### Issue: Overfitting\n```typescript\n\u002F\u002F Use validation split\nawait adapter.train({\n  epochs: 50,\n  batchSize: 64,\n  validationSplit: 0.2,  \u002F\u002F 20% validation\n});\n\n\u002F\u002F Enable memory optimization\nawait adapter.retrieveWithReasoning(queryEmbedding, {\n  optimizeMemory: true,  \u002F\u002F Consolidate, reduce overfitting\n});\n```\n\n### Issue: Slow training\n```bash\n# Enable quantization for faster inference\n# Use binary quantization (32x faster)\n```\n\n---\n\n## Learn More\n\n- **Algorithm Papers**: See docs\u002Falgorithms\u002F for detailed papers\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fagentic-flow\u002Ftree\u002Fmain\u002Fpackages\u002Fagentdb\n- **MCP Integration**: `npx agentdb@latest mcp`\n- **Website**: https:\u002F\u002Fagentdb.ruv.io\n\n---\n\n**Category**: Machine Learning \u002F Reinforcement Learning\n**Difficulty**: Intermediate to Advanced\n**Estimated Time**: 30-60 minutes\n",{"name":5,"description":7},"main","5593cf3c72898ea9fc67225d452fe38f866ba6dd",".claude\u002F_archive\u002Fskills\u002Fagentdb-learning","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE","https:\u002F\u002Fgithub.com\u002Faicreator350","2026-05-18 03:39:30",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add aicreator350\u002FaurionOFFICIELLE --skill \"AgentDB Learning Plugins\"",{"tool":35,"command":36},"bunx","bunx skills add aicreator350\u002FaurionOFFICIELLE --skill \"AgentDB Learning Plugins\"",{"tool":38,"command":39},"pnpm","pnpm dlx skills add aicreator350\u002FaurionOFFICIELLE --skill \"AgentDB Learning Plugins\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills\u002Fagentdb-learning\u002FSKILL.md",true,[],[44,53,60,67,74,81],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":48,"licenseFileUrl":49,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M74CAJWR9WB6DX1HF2V461Y0","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M74CAFWC2H75GJ81B39C9RSW","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M74CA9N2HTGCKJ93AE9NQMHA","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-view-transitions\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M74CA364D4EVDXZZQRVK1Z73","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M74C9YQZX1GVS18V0AYCYPZE","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-composition-patterns\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M74C9SEYD6F764Q1JACZX3A6","vercel-cli-with-tokens","Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. \"deploy to vercel\", \"set up vercel\", \"add environment variables to vercel\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-cli-with-tokens\u002FSKILL.md",[],[]]