AgriManager / Docs
Website GitHub

Framework

How AgriManager runs on top of VeRL — and what it adds.

AgriManager is an agentic environment layer built on top of VeRL. VeRL supplies the RL training engine; AgriManager turns crop simulators into multi-turn text environments and wires them into that engine. A run is two nested loops:

Agentic rollout LLM policy Environment crop simulator → text action obs + reward ×N turns trajectories VeRL trainer RL algorithms update AgriManager VeRL
Two nested loops. Inner: an agentic rollout where an LLM policy and a crop-simulator environment exchange text for N turns, producing a trajectory. Outer: VeRL's trainer consumes trajectories, runs an RL algorithm (GRPO by default), and updates the policy. Green is AgriManager; grey is VeRL.

Two loops#

Inner — agentic rollout. Each turn follows Observe → Think → Act. Observe: the environment renders the simulator's state into a text prompt (observation, action menu, objective). Think: in think mode the policy writes a short reasoning block. Act: the policy names one action; the environment parses it, steps the simulator, and returns the next observation and a scalar reward. After N turns the episode ends as one trajectory. The loop is driven by AgriToolAgentLoop.

Outer — training. VeRL's trainer collects a group of trajectories, runs an RL algorithm (algorithm.adv_estimator=grpo by default; VeRL also provides PPO and others), and updates the policy — which then drives the next rollouts.

python · one turn
system_prompt = env.system_prompt()              # task, schema, action menu
obs, info     = env.reset()                       # first textual observation
while not done:
    response                = policy.generate(prompt)  # think format: <tool_call>…</tool_call> <answer>…</answer>
    obs, reward, done, info = env.step(response)       # env parses the answer tag
    prompt                  = reassemble(system_prompt, obs)

What AgriManager adds#

VeRL is used as an unmodified submodule — AgriManager plugs in through VeRL's own extension points (an agent loop, an interaction, and a reward function, all declared in config) and never patches it. On top of the engine, AgriManager contributes three things:

Where each part of the diagram lives in code:

In the diagramWhat it doesCode
Environment (render) simulator state → text prompt, per schema Σ_O·Σ_A·Σ_R env/<name>/prompt.py
Environment (step) parse action, step the simulator, score the turn AgriInteraction · compute_score
Agentic rollout drive the N turns, emit the trajectory AgriToolAgentLoop
VeRL trainer RL algorithm + policy update (reused) adapter/trainer/ → VeRL