Skip to content

Task Onboarding

A new task normally does not require changes to LNR, ESTRA, resume, resource management, monitoring, or global merge. Add a task package that declares the artifact and metric contract and provides a system-side evaluator capable of validating one workspace candidate.

tasks/<family>/<task-id>/
├── task.yaml
├── description_lite.md
├── evaluator.py
└── optional problem assets

If tasks/<family>/_shared/task_defaults.yaml exists, it is merged under each task.yaml in that family. A family can also share one evaluator: the SciModelingBench packages point evaluator.entrypoint at ../_shared/evaluator.py:evaluate.


id: example-task
category: opt_solver
profile: opt_solver
description: description_lite.md
artifact:
path: artifacts/best_solution.json
kind: json_solution
metric:
name: objective
lower_is_better: false
type: benchmark
authoritative: true
evaluator:
entrypoint: evaluator.py:evaluate
timeout_sec: 300
visible_to_agent: false
gate:
policy: default

provider is optional. profile selects the prompt/artifact profile, while the evaluator and Gate remain domain-neutral. A package that declares evaluator.entrypoint is evaluated by the task_package backend automatically. Set metric.authoritative: true when the evaluator computes the trusted benchmark score; otherwise the run is classified as exploratory rather than a verified candidate. Add inputs.required: false when the task needs no input dataset.

A task may select a trusted alternative Gate policy (default or optimization_feasibility), but workspace code cannot register arbitrary policies.


def evaluate(*, artifact_path, workspace_dir, task_dir, dataset_dir, config):
# Validate schema, instance identity, constraints, and numerical values.
return {
"metric": {"name": "objective", "value": 1.23},
"valid": True,
}

The entry point must return a JSON object. The task-package backend copies the package to a system-owned runtime directory (task_runtime/ under the task root), verifies the entrypoint hash before each call, launches it in a subprocess, and normalizes its result. Exceptions, non-zero exit status, timeouts, malformed output, non-finite metrics, and invalid candidates remain explicit evaluator states.

  • Reject missing or malformed artifacts with actionable errors.
  • Validate array lengths, identifiers, bounds, feasibility constraints, and finite numeric values.
  • Compute the metric from the artifact and task data; never trust an agent-reported score.
  • Keep lower_is_better aligned with the actual objective.
  • Return valid: true only after the complete task contract passes.

Task Artifact Metric Direction
opt_solver/circle-packing artifacts/best_solution.json radii_sum Higher is better
opt_solver/kttsp artifacts/best_solution.json mission_duration_days Lower is better
opt_solver/ratio-minimization artifacts/best_solution.json inv_ratio_squared Higher is better
opt_solver/uncertainty-ineq artifacts/best_solution.json c4_score Higher is better
sci_modeling_bench/* artifacts/submission.json best_k_mean, normalized_enrichment, or global_ndcg Higher is better

  1. Place task data outside the source tree and expose it through input_data_dir (or deepbuilder run --input-data-dir).
  2. Write a concise description_lite.md that names the artifact path and constraints.
  3. Add task.yaml with task identity, profile, artifact, metric, evaluator, and optional Gate policy.
  4. Implement a deterministic system-side evaluator and test valid, invalid, malformed, missing, and boundary cases.
  5. Set the run boundaries: pass --duration, --workers, --cpu, and --gpu to deepbuilder run <task-id>, or put budget and CPU/GPU boundaries in a run manifest and use deepbuilder run --manifest <file>. The two forms cannot be combined.
  6. Run a short end-to-end task (--duration has a 10-minute minimum), follow it with deepbuilder status, and inspect evaluator events, Gate decisions, Stage rows, snapshots, and final artifacts.