Agentic Reinforcement Learning: Zero-to-Researcher Curriculum¶
Agentic Reinforcement Learning (Agentic RL) trains a language-model policy through repeated interaction with a stateful environment. The defining difficulty is not merely that a response contains several reasoning tokens. The policy takes actions, receives new observations, changes the world, and must assign delayed outcomes back to earlier decisions.
The clean formal boundary is a useful starting point:
- ordinary one-response Large Language Model (LLM) Reinforcement Learning (RL) can often be approximated as a contextual bandit or a degenerate one-step Markov Decision Process (MDP);
- agentic RL is normally a finite-horizon Partially Observable Markov Decision Process (POMDP): the complete environment state is hidden, so the policy acts from observations and history over more than one consequential step.
This distinction follows the formalization in Zhang et al., The Landscape of Agentic Reinforcement Learning for LLMs (Transactions on Machine Learning Research, TMLR 2026, Sections 2–3). It is a modeling boundary, not a naming rule: a reasoning trace can itself contain actions, and a single Application Programming Interface (API) response can drive multiple hidden environment transitions. Always identify the actual policy and environment boundary.
The whole object in one equation¶
Model an episode as a POMDP
At time \(t\), the environment has latent state \(s_t\). The agent receives an observation \(o_t \sim O(\cdot\mid s_t)\), constructs a history or learned memory \(h_t\), and samples an action
The trajectory is
and the basic objective is
For an autoregressive LLM, each semantic action \(a_t\) is itself a token sequence. Agentic RL therefore has at least three clocks:
- token time inside an LLM generation;
- decision time between environment interactions; and
- episode time from task initialization to termination.
Many implementation bugs are really clock-mismatch bugs: an episode-level reward is copied to every token, a tool observation is accidentally trained as if the policy generated it, or an importance ratio spans tokens sampled by different policy versions.
Knowledge hierarchy¶
The hierarchy below is both a curriculum and a debugging map. A failure at a higher level is often caused by an unchecked assumption lower in the tree.
Layer A — Prerequisites¶
- Probability and statistics
- conditional distributions, expectation, variance, covariance;
- log-likelihood, entropy, cross-entropy, Kullback–Leibler (KL) divergence;
- Monte Carlo estimation, control variates, importance sampling;
- confidence intervals, hypothesis tests, and multiple comparisons.
- Optimization
- stochastic gradients, momentum, AdamW, schedules, clipping;
- constrained and trust-region optimization;
- numerical stability, mixed precision, and distributed reductions.
- Deep learning and transformers
- autoregressive factorization and teacher forcing;
- attention, residual blocks, normalization, mixture-of-experts (MoE) routing;
- tokenization, chat templates, masking, key-value (KV) caches, and sampling.
- Software and systems
- PyTorch autograd and distributed training;
- asynchronous programming, queues, remote procedure calls (RPCs), retries, and idempotency;
- containers, sandboxes, observability, and reproducible data pipelines.
Layer B — Classical sequential decision making¶
- Markov chains, MDPs, POMDPs, belief state, and history state.
- Return, value \(V^\pi\), action value \(Q^\pi\), and advantage \(A^\pi\).
- Bellman expectation and optimality equations.
- Dynamic programming, Monte Carlo, temporal difference learning, and eligibility traces.
- On-policy versus off-policy learning; exploration versus exploitation.
- Policy gradients, actor–critic methods, generalized advantage estimation, trust regions, and Proximal Policy Optimization (PPO).
- Offline RL, imitation learning, inverse RL, hierarchical RL, model-based RL, multi-agent RL, and constrained/safe RL.
The canonical foundation is Sutton and Barto, Reinforcement Learning: An Introduction (2nd ed., 2018). PPO originates in Schulman et al., Proximal Policy Optimization Algorithms (2017).
Layer C — LLM post-training before agents¶
- Supervised Fine-Tuning (SFT): demonstrations, chat schemas, loss masks, rejection sampling, and distillation.
- Preference learning: comparison collection, Bradley–Terry reward models, annotator noise, calibration, and uncertainty.
- Reinforcement Learning from Human Feedback (RLHF): policy/value/reference/reward models, KL regularization, PPO, and online sampling. Ouyang et al., Training language models to follow instructions with human feedback (2022) is the standard end-to-end reference.
- Offline preference optimization: Direct Preference Optimization (DPO) and related objectives, including what their fixed-dataset assumptions exclude.
- RL with verifiable rewards (RLVR): executable or rule-based correctness for math, code, formal proof, games, and structured outputs.
- Reasoning RL: long sampled solutions, group-relative baselines, process/outcome rewards, entropy dynamics, and distillation. DeepSeekMath introduced Group Relative Policy Optimization (GRPO) in its published recipe (Shao et al., 2024, Section 3); DeepSeek-R1 demonstrated a large-scale reasoning-RL pipeline (Guo et al., 2025).
Layer D — The agent interface¶
- Observation design
- user messages, tool results, screen pixels, files, database state;
- partial observability, truncation, summarization, and stale observations;
- untrusted content and prompt-injection boundaries.
- Action design
- free text, structured calls, code, Graphical User Interface (GUI) actions, physical controls;
- grammar constraints, parameter validation, authorization, and abstention;
- macro-actions versus primitive actions.
- State and memory
- transcript-as-state, belief state, scratchpads, episodic/semantic memory;
- retrieval, compression, write policies, forgetting, and privacy.
- Transition dynamics
- deterministic simulators, stochastic users, live web/services, and robots;
- latency, timeouts, side effects, hidden state, and non-stationarity.
- Termination
- success, failure, budget exhaustion, unsafe action, deadlock, and timeout;
- who may declare completion and how it is independently verified.
Layer E — Agent capabilities learned by RL¶
- reasoning and inference;
- planning, replanning, and subgoal selection;
- tool selection, argument construction, and result integration;
- information search and evidence synthesis;
- working, episodic, and long-term memory management;
- reflection, error recovery, and uncertainty-aware verification;
- perception and grounding across text, image, audio, video, and action;
- long-horizon execution and budget allocation;
- communication with users and other agents;
- self-improvement through curriculum, self-play, and environment generation.
These capabilities are not independent modules. For example, tool choice alters future observations, memory alters the effective state, and planning changes the distribution of credit-assignment distances.
Layer F — Tasks and environments¶
- math, code execution, unit tests, and formal theorem proving;
- search, browsing, research, retrieval, and question answering;
- operating systems, terminals, software engineering, and cybersecurity;
- APIs, databases, enterprise workflows, and customer-support simulations;
- GUI, mobile, desktop, and web navigation;
- games, embodied control, robotics, and vision-language-action tasks;
- science, experimentation, and laboratory automation;
- multi-agent cooperation, competition, negotiation, and markets.
For each environment learn: reset semantics, observation/action schema, hidden state, stochasticity, reward, validator, horizon, cost model, concurrency, sandbox, versioning, train/test split, contamination risk, and failure policy.
Layer G — Experience and data engine¶
- task sourcing and rights/provenance;
- expert demonstrations and behavioral cloning;
- synthetic task and trajectory generation;
- teacher distillation and best-of-N/rejection sampling;
- on-policy rollout and policy-version tracking;
- replay, off-policy data, importance weighting, and staleness;
- failure mining, adversarial generation, and automatic curricula;
- difficulty estimation and dynamic sampling;
- deduplication and contamination barriers;
- trajectory schema, token preservation, compression, and lineage;
- human correction, preference, process, and outcome labels;
- quality control, inter-annotator agreement, and audit sampling.
Layer H — Reward and feedback¶
- binary exact-match and executable validators;
- graded task progress and environment-native scores;
- process rewards at token, span, turn, or subgoal level;
- human preferences and learned reward models;
- LLM judges with calibration and adversarial controls;
- safety, policy compliance, permission, and reversibility constraints;
- cost, latency, token, tool-call, and resource penalties;
- novelty, diversity, exploration, and information-gain bonuses;
- multi-objective scalarization, lexicographic constraints, and Pareto tradeoffs;
- uncertainty, ensembles, reward hacking, and causal reward validation.
Layer I — Optimization and credit assignment¶
- sequence-level REINFORCE and control variates;
- actor–critic, Generalized Advantage Estimation (GAE), PPO, and value-model training;
- leave-one-out and group-relative baselines: REINFORCE Leave-One-Out (RLOO), GRPO, and variants;
- KL regularization, reference policies, clipping, and trust regions;
- token-, turn-, segment-, subgoal-, and trajectory-level advantages;
- sparse delayed reward, eligibility, return decomposition, and value targets;
- off-policy correction and truncated importance sampling;
- replay and asynchronous-policy lag;
- hierarchical policies and option-level credit;
- multi-agent centralized training/decentralized execution;
- constrained optimization for safety and budgets;
- entropy control, mode collapse, length bias, and gradient starvation.
Layer J — Training systems¶
- policy, reference, critic, reward, verifier, and judge placement;
- colocated versus disaggregated generation/training;
- synchronous, partially asynchronous, and fully asynchronous loops;
- rollout inference with vLLM/SGLang-like engines;
- exact sampled-token retention and tokenizer/template consistency;
- weight broadcast, checkpoint conversion, and policy versioning;
- data/tensor/pipeline/context/expert/sequence parallelism;
- variable-length packing, masks, loss normalization, and load balance;
- environment RPC, backpressure, straggler mitigation, and fault recovery;
- deterministic debugging, trace storage, metrics, and cost accounting;
- sandbox isolation, secrets, network policy, and side-effect control.
The requirement to retain exact sampled tokens is not cosmetic. Text can be a non-invertible representation of a token stream; decoding and re-encoding may change boundaries and therefore log-probabilities. The veRL agentic-RL documentation explicitly uses a token-based generation API for this reason (veRL, “Agentic RL Training”).
Layer K — Evaluation and science¶
- static capability, interactive success, and end-to-end utility;
- pass@1/pass@k, success-weighted cost, latency, and action count;
- hidden tasks, dynamic environments, leakage, and benchmark contamination;
- stochastic trials, paired seeds, confidence intervals, and power;
- judge agreement, human validation, and failure taxonomies;
- robustness to tool errors, prompt injection, state perturbation, and drift;
- generalization across tasks, tools, horizons, languages, and environments;
- ablations that separate data, inference compute, reward, and optimization;
- safety cases, red teams, incident analysis, and deployment gates;
- reproducibility, artifact lineage, and honest negative results.
Layer L — Frontier-lab reconstruction¶
For every model family, reconstruct the same stages:
- base-model architecture and tokenizer;
- pretraining data and optimization;
- context/domain mid-training;
- SFT and cold-start data;
- reward/verifier/judge construction;
- reasoning and agentic RL;
- distillation and model-family transfer;
- evaluation protocol;
- deployment-relevant disclosures; and
- unknowns and common unsupported claims.
Use the shared evidence matrix before comparing scores or recipes. The case-study set includes:
- generation-by-generation reconstructions of DeepSeek, Zhipu AI's General Language Model (GLM), and Moonshot Kimi;
- preference-to-agent lineages for OpenAI, Anthropic, and Google DeepMind;
- open-weight and report-backed lineages for Alibaba Qwen, Meta, and Mistral; and
- algorithm, system, and reproduction studies for ByteDance Seed, NVIDIA, Microsoft, xAI, and the open community.
Read each lineage in time order. For every generation, write a five-column ledger: disclosed fact, confirmed artifact, reproduction result, bounded inference, and unknown. Then map every supported training stage onto the task, environment, trajectory, reward, optimizer, evaluation, and deployment artifacts in the evidence matrix. This prevents a newer benchmark table from being mistaken for a newly disclosed training recipe.
Recommended learning sequence¶
Use the must-read syllabus and priority map alongside this sequence. It identifies the exact report chapters, paper sections, deferrable material, role-specific routes, expected reading time, and concrete exit artifact for each P0–P3 source.
| Phase | Read | Build | Exit criterion |
|---|---|---|---|
| 0 | The repository roadmap, especially the five-pass loop and Levels 0–6, plus the P0 reading spine | the prerequisite mastery checks | Identify every missing probability, optimization, transformer, and classical-RL dependency before specialization. The levels are checklists, not complete prerequisite textbooks; use the bibliography as a source rail. |
| 1 | Curriculum map, terminology, long-horizon capability synthesis, and history | a timeline and model/training/runtime concept map | Explain why a multi-turn tool task is not a contextual bandit, separate checkpoint capability from harness behavior, and place each mechanism in its historical setting. |
| 2 | Mathematical foundations and step-by-step derivations | REINFORCE on a toy sequence task | Derive the estimator, trace its tensor implementation, and measure its variance. |
| 3 | Algorithms | PPO, RLOO, and GRPO on identical samples | Explain every normalization, mask, ratio, and estimator assumption. |
| 4 | Data and environments | deterministic tool sandbox | Reset and replay a trajectory bit-for-bit and prove split isolation. |
| 5 | Training pipeline | multi-turn rollout collector | Preserve exact tokens, tool boundaries, rewards, and policy-version identifiers. |
| 6 | The roadmap's inference-systems dependencies, then systems | asynchronous rollout/trainer prototype | Quantify GPU idle time, queue delay, memory, throughput, and policy staleness. |
| 7 | Evaluation and safety | hidden stochastic test suite | Report uncertainty, cost, contamination controls, and a failure taxonomy. |
| 8 | Source lab | extend roserlhf |
Trace one token through rollout and update, then pass numerical, invariance, and end-to-end tests. |
| 9 | Research standard and evidence matrix | a five-label evidence ledger | Separate disclosed, confirmed-artifact, reproduced, inferred, and unknown claims. |
| 10 | DeepSeek, GLM, Kimi, western labs, then open industry | reconstruct one generation and reproduce one disclosed mechanism at small scale | Preserve exact source versions, training stages, benchmark protocol, assumptions, and unknowns without inventing a private recipe. |
What “source-level understanding” means¶
You have reached source-level understanding only if you can trace one sampled token through all of these representations:
- environment observation bytes;
- chat template and tokenizer identifiers (IDs);
- packed rollout tensors and attention masks;
- inference policy version and sampled log-probability;
- tool/action parser and environment transition;
- reward components and termination record;
- return/advantage estimator;
- importance ratio and clipped objective;
- per-token loss mask and normalization denominator;
- distributed gradient reduction;
- optimizer update and new checkpoint;
- weight synchronization back to rollout workers.
If any step is described only as “the framework handles it,” that step remains part of the curriculum.
Non-negotiable distinctions¶
- Reasoning RL is not automatically agentic RL. A long chain of thought may still be a single environment action.
- Tool-use SFT is not tool-use RL. Demonstrations teach imitation; RL needs policy-dependent experience and reward-linked updates.
- A verifier is not necessarily a reward model. A compiler or exact checker has different error modes from a learned preference predictor.
- Outcome reward does not reveal causal credit. Copying a terminal score to every token is an estimator choice, not an explanation of which action helped.
- Public training reports are not production runbooks. Undisclosed data, system prompts, routing, tools, safety layers, and online adaptation remain unknown unless a primary source says otherwise.
- Benchmark improvement is not general agency. It may reflect data overlap, more inference samples, environment-specific reward shaping, or evaluator sensitivity.
Core references¶
- Richard S. Sutton and Andrew G. Barto, Reinforcement Learning: An Introduction, 2nd ed., 2018.
- Ronald J. Williams, “Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning”, Machine Learning 8, 1992.
- John Schulman et al., “Proximal Policy Optimization Algorithms”, 2017.
- Long Ouyang et al., “Training language models to follow instructions with human feedback”, 2022.
- Zhihong Shao et al., “DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models”, 2024.
- Daya Guo et al., “DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning”, 2025.
- Guibin Zhang et al., “The Landscape of Agentic Reinforcement Learning for LLMs”, TMLR, 2026.
The annotated bibliography expands this list by prerequisite, algorithm, capability, environment, system, evaluation, and model family.