AgriManager / Docs
Website GitHub

Tasks

The parts a task is built from — simulator, observation, action, and reward.

A task is built from a few interchangeable parts: the simulator and the schema it presents to the policy — the observation (Σ_O), the action menu (Σ_A), and the reward (Σ_R). These are what you vary to build a new task or a benchmark variant. The observation and action types below are WOFOST's, the primary simulator.

Two task families#

Simulators#

The underlying dynamics. Each crop model is reached through a Gymnasium wrapper that the adapter turns into a text interface. Three are integrated:

Observations#

What the policy sees each step (Σ_O). The default WOFOST observation has 15 fields — crop status, soil nutrients, soil & water, cumulative actions, and weather. The schema can be reshaped:

TypeWhat changes
Full (default)all 15 baseline fields.
Missing-informationdrop one block — stage & time, resource state, management history, or weather.
Synonym renamesame values, agronomic-synonym labels (plus a glossary).
Supersetadd extra growth variables (LAI, TAGP, RD, …).
Anonymizedlabels replaced with A–O (plus a glossary) — a label-grounding probe.

Actions#

The management actions available (Σ_A), each as discrete amounts. On WOFOST the env_id sets which inputs the policy may apply:

env_idAvailable inputs
lnpkw-v0 (default)nitrogen, phosphorus, potassium, irrigation
lnpk-v0nitrogen, phosphorus, potassium
lnw-v0nitrogen, irrigation
ln-v0nitrogen only
lw-v0irrigation only

Rewards#

The objective the policy optimizes (Σ_R), declared in the prompt via an objective_id. Training can mix several at once:

objective_idMaximizes
profit_maxterminal yield (WSO) minus input costs — the default.
yield_maxterminal yield, normalized by a calibrated reference.
water_stewardshipyield while penalizing irrigation use and water-budget violations.
nutrient_stewardshipyield while avoiding nutrient over-application.

Cycles crop-planning tasks optimize a simulator-native gross-revenue reward (yield × crop price), held fixed while the price regime shifts.

Anatomy of a prompt#

Each turn the environment assembles one prompt. Three blocks are the schema — Σ_O, Σ_A, Σ_R — and only these shift across the benchmark; the rest is fixed.

System prompt Management objective Σ_R Current observation Σ_O Available actions Σ_A Reasoning guidance Response format
The Σ blocks are the schema (what shifts across the benchmark); the rest is fixed scaffolding.

A full turn#

A real turn — the assembled prompt, and the policy's reasoning and action.

turn 14 · wofost potato · profit_max
══ SYSTEM ══
You are an agricultural management expert. Optimize the management objective specified in the user message. Use only the available actions and respond in the required format.

══ TURN 14 · USER ══
We are growing potato from sow to maturity. The planned growing window spans 180 days, and actions are taken every 10 days. Today is day 140 of the season, corresponding to May 20.

<management objective id="profit_max">
Goal: maximize terminal WSO-equivalent profit, not raw yield.

Score at the end of the season:
profit_wso_kg_ha =
  final_WSO_kg_ha
  - 3.5 * total_N_kg_ha
  - 5.5 * total_P_kg_ha
  - 2.25 * total_K_kg_ha
  - 0.5 * total_irrig_cm

Input unit costs:
- Nitrogen: 1 kg/ha N costs 3.5 kg/ha WSO-equivalent.
- Phosphorus: 1 kg/ha P costs 5.5 kg/ha WSO-equivalent.
- Potassium: 1 kg/ha K costs 2.25 kg/ha WSO-equivalent.
- Irrigation: 1 cm water costs 0.5 kg/ha WSO-equivalent.

Successful crop seasons usually produce final yield on the order of thousands of kg/ha.

Decision rule: apply an input only if that input is expected to increase final WSO by more than its WSO-equivalent cost.
</management objective>

Below is the current observation for this step.

<current observation>
[Crop status]
- Finish flag (1 means the season has ended): 0
- Development stage index: 1.136 (DVS=1 indicates flowering; DVS=2 indicates maturity)
- Storage organ dry matter (kg/ha; harvestable yield biomass proxy): 27.17
[Soil nutrients]
- Available soil nitrogen (kg/ha): 8.307
- Available soil phosphorus (kg/ha): 30.83
- Available soil potassium (kg/ha): 0.011
[Soil & water]
- Root-zone soil moisture (fraction): 0.3302
[Cumulative actions]
- Cumulative nitrogen applied so far (kg/ha): 40
- Cumulative phosphorus applied so far (kg/ha): 40
- Cumulative potassium applied so far (kg/ha): 0
- Cumulative irrigation depth applied so far (cm): 0
[Weather]
- Daily solar radiation (J/m²/day): 1.629e+07
- Mean air temperature (°C): 17.03
- Daily rainfall (cm): 0.216
</current observation>

Available actions (pick exactly one):
- Do nothing.
- Apply nitrogen fertilizer (20.0, 40.0, 60.0, or 80.0 kg/ha).
- Apply phosphorus fertilizer (20.0, 40.0, 60.0, or 80.0 kg/ha).
- Apply potassium fertilizer (20.0, 40.0, 60.0, or 80.0 kg/ha).
- Irrigate with 5.0, 10.0, 15.0, or 20.0 cm of water.

Please reason briefly before action about:
1. State grounding: describe the current agronomic state and the main limiting factor based on the current observations
2. Decision: choose the action that best balances final-yield gains against input costs at this step

Keep the reasoning concise and decision-focused. Do not restate the full input.

Respond using the exact format: <tool_call> ... </tool_call> <answer> ... </answer> with no extra text.

Example: <tool_call>[reasoning content]</tool_call> <answer>Apply 20.0 kg/ha nitrogen fertilizer.</answer>

══ TURN 14 · ASSISTANT ══
<tool_call>[State grounding: The crop is at DVS 1.136, indicating it is in the flowering stage, with a high storage organ dry matter (27.17 kg/ha), suggesting strong yield potential. Soil nitrogen (8.307 kg/ha) and phosphorus (30.83 kg/ha) are already adequate, and potassium is critically low (0.011 kg/ha), which is essential for tuber development and dry matter accumulation. Root-zone moisture (33.02%) is below optimal, indicating a water stress concern. However, the primary limiting factor is potassium, as its deficiency directly impacts tuber quality and dry matter retention. Nitrogen and phosphorus have been heavily applied (40 kg/ha each), raising input costs without clear yield gains. Irrigation is not currently justified given the moderate moisture and high solar radiation. Decision: Apply 40.0 kg/ha potassium fertilizer, as it is the most likely to boost dry matter and yield without excessive cost, aligning with the objective of maximizing WSO-equivalent profit.]</tool_call> <answer>Apply 40.0 kg/ha potassium fertilizer.</answer>

The environment parses the <answer>, steps the simulator, and returns the next observation and a scalar reward.