AGENT SKILL

agilerl

Use AgileRL for reinforcement learning workflows: classical RL training, evolutionary HPO, evolvable networks, multi-agent PettingZoo training, offline/bandit data, and LLM fine-tuning.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
agilerl
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use AgileRL for reinforcement learning workflows: classical RL training, evolutionary HPO, evolvable networks, multi-agent PettingZoo training, offline/bandit data, and LLM fine-tuning.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

AgileRL

Use this repo skill when a task involves AgileRL, agilerl, evolutionary hyperparameter optimization for RL, Gymnasium/PettingZoo training with AgileRL algorithms, AgileRL evolvable modules/networks, offline RL datasets, contextual bandits, or AgileRL LLM post-training.

Quick Start

  • Install: pip install agilerl.
  • Optional LLM stack: pip install "agilerl[llm]" only when the task uses GRPO/CISPO/GSPO, DPO/SFT, vLLM, PEFT, DeepSpeed, or transformer datasets.
  • Import check: python -c "import agilerl, importlib.metadata as md; print(md.version('agilerl'))".
  • Read references/package-overview.md for the algorithm family map, references/troubleshooting.md for cross-cutting dependency/backend issues, and references/repo-provenance.md when checking whether this skill is stale.
  • Run scripts/check_agilerl_install.py --help for a safe local capability probe; it does not train, download models, or require the source checkout.

Route By Task

User task Read
Train PPO, DQN, RainbowDQN, DDPG, or TD3 on Gymnasium; wire create_population, train_on_policy, train_off_policy, replay/rollout buffers, or distributed classical training sub-skills/training-workflows/SKILL.md
Configure tournament selection, mutations, mutable RL hyperparameters, architecture mutation probabilities, or population evolution sub-skills/hpo-and-mutation/SKILL.md
Build custom EvolvableModule/EvolvableNetwork objects, net_config, MLP/CNN/LSTM/MultiInput/SimBa configs, actors, critics, or DummyEvolvable wrappers sub-skills/evolvable-modules/SKILL.md
Use PettingZoo multi-agent training, MADDPG, MATD3, IPPO, AsyncPettingZooVecEnv, agent id grouping, or AgileRL wrappers sub-skills/multi-agent-and-wrappers/SKILL.md
Use offline datasets, HDF5/Minari conversion, replay filling, CQL/ILQL, contextual bandits, NeuralUCB, NeuralTS, or BanditEnv sub-skills/offline-bandits-data/SKILL.md
Plan LLM fine-tuning/post-training with GRPO, CISPO, GSPO, LLM PPO, REINFORCE, SFT, DPO, vLLM, DeepSpeed, PEFT, or AgileRL LLM envs sub-skills/llm-fine-tuning/SKILL.md
Compare benchmark scripts or adapt performance runs safely references/benchmarking.md

Common AgileRL Building Blocks

  • Algorithms: PPO, DQN, RainbowDQN, DDPG, TD3, CQN, ILQL, NeuralUCB, NeuralTS, MADDPG, MATD3, IPPO, GRPO, CISPO, GSPO, LLM PPO, REINFORCE, SFT, and DPO.
  • Population setup usually starts with agilerl.utils.utils.create_population(...) and a Gymnasium or PettingZoo observation/action space.
  • Evolution usually combines TournamentSelection(...) and Mutations(...); use HyperparameterConfig and RLParameter for mutable algorithm attributes.
  • Network configuration usually uses net_config with encoder_config, head_config, and optional recurrent/CNN/MultiInput fields.
  • Training helpers return trained populations and fitness metrics; full training can be long, so prefer import/config/smoke checks before launching runs.

Safe Validation Pattern

  1. Check installation and optional dependency availability with scripts/check_agilerl_install.py.
  2. Validate spaces, algorithm names, INIT_HP, net_config, and HPO configs with the nearest sub-skill helper script.
  3. Run tiny constructor/import checks before full training.
  4. Treat demos, tutorials, benchmark launchers, and original repo tests as evidence only; do not depend on the AgileRL source checkout from this generated skill.
  5. For long training, LLM, GPU, vLLM, DeepSpeed, Minari remote, UCI, or benchmark tasks, document required hardware/data/network first and ask before expensive execution.

Troubleshooting First Reads

  • Install/import, Python version, missing optional extras, Torch/Gymnasium/PettingZoo/JAX/W&B issues: references/troubleshooting.md.
  • Training shape/config errors: sub-skills/training-workflows/references/troubleshooting.md.
  • Mutation/HPO mistakes: sub-skills/hpo-and-mutation/references/troubleshooting.md.
  • Network architecture/config mistakes: sub-skills/evolvable-modules/references/troubleshooting.md.
  • Multi-agent env/wrapper mistakes: sub-skills/multi-agent-and-wrappers/references/troubleshooting.md.
  • Offline/bandit data schema mistakes: sub-skills/offline-bandits-data/references/troubleshooting.md.
  • LLM optional dependency and backend mistakes: sub-skills/llm-fine-tuning/references/troubleshooting.md.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351