Skip to content

Optimization

Submit and manage agent optimization jobs.

Terminal window
$ dn optimize <command>

Optimize agents with jobs.

Terminal window
$ dn optimize submit <--model> <str> <--capability> <str> <--reward-recipe> <literal[contains_v1,> <exact_match_v1,> <row_reward_v1,> <trajectory_imitation_v1]>

Submit a hosted optimization job.

Options

  • --model (Required) — Model identifier
  • --capability (Required) — Capability ref in NAME@VERSION form
  • --reward-recipe — Hosted reward recipe name [required] [choices: contains_v1, exact_match_v1, row_reward_v1, trajectory_imitation_v1]
  • --dataset — Agent-scored dataset ref (NAME@VERSION). Rows drive the agent’s user message and reward-recipe scoring. Mutually exclusive with —task and —task-dataset.
  • --task — Env-scored training task (repeatable). One value = single task, multiple = train-across-tasks. Mutually exclusive with —dataset and —task-dataset.
  • --task-dataset — Env-scored dataset ref (NAME@VERSION) where rows carry task_ref plus per-row content (inputs, scoring fields). Use when the corpus warrants versioning — otherwise reach for —task. Mutually exclusive with —dataset and —task.
  • --val-dataset — Optional held-out validation dataset (NAME@VERSION).
  • --val-task — Env-scored held-out validation task (repeatable). Never merged with training — candidates are mutated against train, scored for selection against val.
  • --reward-params — Reward recipe parameters as JSON
  • --agent-name — Optional agent name when the capability exports multiple agents
  • --objective — Optional natural-language optimization objective
  • --name — Optional optimization job name
  • --run-ref — Run reference for tracking
  • --tag — Tag for the job (repeatable)
  • --seed — Random seed for reproducibility
  • --max-metric-calls — Maximum metric evaluation calls
  • --max-trials — Maximum optimization trials before stopping
  • --max-trials-without-improvement — Stop after this many finished trials without improving the best score
  • --max-runtime-sec — Maximum hosted runtime seconds before the job is timed out
  • --reflection-lm — Language model for reflection steps
  • --max-reflection-examples — Maximum examples for reflection
  • --max-side-info-chars — Maximum characters of side information
  • --track-best-outputs (default False)
  • --display-progress-bar (default False)
  • --capture-traces, --no-capture-traces (default True)
  • --include-outputs, --no-include-outputs (default True)
  • --include-errors, --no-include-errors (default True)
  • --wait (default False)
  • --poll-interval-sec (default 5.0) — Polling interval in seconds
  • --timeout-sec — Timeout in seconds for waiting
  • --json (default False)
  • --env-timeout-sec — Per-trial TaskEnvironment timeout in seconds (env-mode only).
  • --parallel-rows — Dataset rows scored concurrently within one candidate (env-mode only; default 1).
  • --concurrency — Candidates evaluated in parallel across the search (default 1).
  • --component — Capability surface to optimize (env-mode only, repeatable). Defaults to all four: agent_prompt, capability_prompt, skill_descriptions, skill_bodies. [choices: agent_prompt, capability_prompt, skill_descriptions, skill_bodies]
Terminal window
$ dn optimize list

List hosted optimization jobs.

Options

  • --page (default 1)
  • --page-size (default 20)
  • --status[choices: queued, running, completed, failed, cancelled]
  • --backend[choices: gepa]
  • --target-kind[choices: capability_agent, capability_env]
  • --json (default False)
Terminal window
$ dn optimize get <job-id>

Get a hosted optimization job.

Options

  • <job-id>, --job-id (Required)
  • --json (default False)
Terminal window
$ dn optimize wait <job-id>

Wait for a hosted optimization job to reach a terminal state.

Options

  • <job-id>, --job-id (Required)
  • --poll-interval-sec (default 5.0) — Polling interval in seconds
  • --timeout-sec — Timeout in seconds for waiting
  • --json (default False)
Terminal window
$ dn optimize logs <job-id>

Show hosted optimization logs.

Options

  • <job-id>, --job-id (Required)
  • --json (default False)
Terminal window
$ dn optimize artifacts <job-id>

Show hosted optimization artifacts.

Options

  • <job-id>, --job-id (Required)
  • --json (default False)
Terminal window
$ dn optimize cancel <job-id>

Cancel a hosted optimization job.

Options

  • <job-id>, --job-id (Required)
  • --json (default False)
Terminal window
$ dn optimize retry <job-id>

Retry a terminal hosted optimization job.

Options

  • <job-id>, --job-id (Required)
  • --json (default False)