agentdb-reinforcement-learning-training
Train AI learning plugins with AgentDB's 9 reinforcement learning algorithms including Decision Transformer, Q-Learning, SARSA, Actor-Critic, PPO, and more. Build self-learning agents, implement RL, and optimize agent behavior through experience.
npx skills add majiayu000/claude-skill-registry --skill agentdb-reinforcement-learning-training --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Instructs an AI developer to train agents using AgentDB's reinforcement learning suite, covering multiple algorithms (Q-Learning, SARSA, DQN, Actor-Critic, PPO, Decision Transformer, A2C, TD3, SAC). It defines a 5-phase SOP for deploying RL training: initialize learning environment, configure the RL algorithm, run training loops, validate performance, and benchmark. It includes concrete code examples for initializing a learning database, creating and configuring a LearningPlugin, setting up an Environment, and configuring a DQN-like training flow (replay buffer, hyperparameters, training loop, evaluation, and model saving). It prescribes memory patterns to store configurations and results, and provides validation steps at each phase. The skill specifies exact commands and file names within the examples, such as npm install commands, TypeScript initializations, and repository paths, and constrains tooling to the declared tool "claude-code". It also includes a detailed Phase 3 training loop, including action selection, environment stepping, experience storage, training triggers, target network updates, exploration decay, logging, checkpointing, evaluation, and early stopping. The final phase outlines validation, benchmarking, and model saving with explicit metadata capture.
How it works
- Phase 1: Initialize Learning Environment
- Install modules with: "npm install agentdb-learning@latest" and "npm install @agentdb/rl-algorithms @agentdb/environments".
- Create a learning database (name: 'rl-training-db', dimensions: 512, learning with replay buffer 100000).
- Instantiate a LearningPlugin with algorithms (e.g., 'q-learning', 'dqn', 'ppo', 'actor-critic') and config (batchSize 64, learningRate 0.001, discountFactor 0.99, explorationRate 1.0, decay 0.995).
- Define an Environment (grid-world) with continuous state space, discrete actions, a distance-to-goal reward, and a termination condition on reaching [9,9].
- Setup a monitor to log metrics every 100 episodes and checkpoint saving every 1000 episodes; store environment config in memory.
- Phase 2: Configure RL Algorithm
- Create a DQN-like agent, specify network layers, learningRate, batchSize, replayBuffer with prioritization, target network update, exploration schedule, and training start conditions.
- Define hyperparameters (learningRate, gamma, batchSize, epsilon schedule, replay settings, training/ep policy, eval settings).
- Initialize a PrioritizedReplayBuffer with specified alpha, beta, and epsilon for stability.
- Set trainingConfig: episodes, stepsPerEpisode, warmup steps, train frequency, target update, save frequency, eval frequency, early stopping.
- Store configuration in memory.
- Phase 3: Train Agents
- Run a training loop that: selects actions (with exploration), steps the environment, stores experiences, trains when ready, updates target networks, decays exploration, logs progress, saves checkpoints, evaluates periodically, and applies early stopping.
- Provide monitoring hooks to compute moving averages and plot curves if visualization is enabled.
- On completion, save the trained model with metadata including trainingStats and hyperparameters; store results in memory.
- Phase 4: Validate Performance
- Load the trained agent and run evaluation episodes (100 by default).
- Compute mean reward, standard deviation, mean episode length, and success rate; compare to a random baseline and report improvements.
- Run comprehensive benchmarks, including inference timing and a structured results object; store validation results in memory.
- Throughout, the skill emphasizes concrete commands, concrete TypeScript snippets, and explicit file/variable names, and restricts outputs to facts stated in the instructions.
When to use it
- When you need to train autonomous agents that learn from experience
- When implementing reinforcement learning systems
- When optimizing agent behavior through trial and error
- When building self-improving AI systems and deploying RL agents in production
- When benchmarking and comparing RL algorithms
What it can touch
- Tools: claude-code
- Memory: stores configuration, training results, and benchmarks via agentDB.memory calls in specified paths
- Artifacts: trained models saved with names like 'trained-agent-final' and 'checkpoint-<episode>'
Caveats
- License: MIT
- The guidance includes explicit environment and algorithm configurations and code samples; results depend on runtime behavior and environment specifics not guaranteed by the skill itself.
--- name: agentdb-reinforcement-learning-training description: AgentDB Reinforcement Learning Training operates on 3 fundamental principles: allowed-tools: Read, Write, Edit, Task, TodoWrite, Glob, Grep --- # AgentDB Reinforcement Learning Training --- ## LIBRARY-FIRST PROTOCOL (MANDATORY) **Before writing ANY code, you MUST check:** ### Step 1: Library Catalog - Location: `.claude/library/catalog.json` - If match >70%: REUSE or ADAPT ### Step 2: Patterns Guide - Location: `.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md` - If pattern exists: FOLLOW documented approach ### Step 3: Existing Projects - Location: `D:\Projects\*` - If found: EXTRACT and adapt ### Decision Matrix | Match | Action | |-------|--------| | Library >90% | REUSE directly | | Library 70-90% | ADAPT minimally | | Pattern exists | FOLLOW pattern | | In project | EXTRACT | | No match | BUILD (add to library after) | --- ## Overview Train AI learning plugins with AgentDB's 9 reinforcement learning algorithms including Decision Transformer, Q-Learning, SARSA, Actor-Critic, PPO, and more. Build self-learning agents, implement RL, and optimize agent behavior through experience. ## When to Use This Skill Use this s
- LIBRARY-FIRST PROTOCOL (MANDATORY)
- Step 1: Library Catalog
- Step 2: Patterns Guide
- Step 3: Existing Projects
- Decision Matrix
- Overview
- When to Use This Skill
- Available RL Algorithms
- SOP Framework: 5-Phase RL Training Deployment
- Phase 1: Initialize Learning Environment (1-2 hours)
- Phase 2: Configure RL Algorithm (1-2 hours)
- Phase 3: Train Agents (3-4 hours)
- Phase 4: Validate Performance (1-2 hours)
- Phase 5: Deploy Trained Agents (1-2 hours)
npm install agentdb-learning@latest npm install @agentdb/rl-algorithms @agentdb/environments train-rl-agent.sh set -e echo "AgentDB RL Training Script" echo "==========================" Phase 1: Initialize echo "Phase 1: Initializing learning environment..." npm install agentdb-learning @agentdb/rl-algorithms Phase 2: Configure
What does the agentdb-reinforcement-learning-training skill do?
Train AI learning plugins with AgentDB's 9 reinforcement learning algorithms including Decision Transformer, Q-Learning, SARSA, Actor-Critic, PPO, and more. Build self-learning agents, implement RL, and optimize agent behavior through experience.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill agentdb-reinforcement-learning-training --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
