Optimization
Submit an optimization job
Section titled “Submit an optimization job”Use dn optimize to submit a hosted GEPA optimization job for a capability agent:
dn optimize \ --server http://127.0.0.1:8000 \ --api-key "$DREADNODE_API_KEY" \ --organization dreadnode \ --workspace localdev \ --model openai/gpt-4o-mini \ --agent-name assistant \ --reward-recipe exact_match_v1 \ --objective "Improve instruction quality without increasing verbosity." \ --max-metric-calls 100 \ --reflection-lm gpt-5-mini \ --wait \ --jsonV1 flags to know:
| Flag | Description |
|---|---|
--capability NAME@VERSION | Capability artifact containing the target agent |
--agent-name <name> | Required when the capability exports multiple agents |
--dataset NAME@VERSION | Training dataset used during optimization |
--val-dataset NAME@VERSION | Optional held-out validation dataset |
--reward-recipe <name> | Declarative hosted reward recipe |
--reward-params <json> | JSON params passed to the reward recipe |
--seed <n> | Deterministic optimization seed |
--max-metric-calls <n> | Metric-call budget |
--reflection-lm <model> | Reflection model override; defaults to --model |
--no-capture-traces | Disable trajectory capture for reflection |
--wait | Poll until the hosted job reaches a terminal state |
--json | Print the full job payload instead of a compact summary |
Current hosted CLI scope matches the hosted API:
- backend:
gepa - target kind:
capability_agent - optimized components: agent
instructions
Inspect and manage jobs
Section titled “Inspect and manage jobs”dn optimize listdn optimize get <job-id>dn optimize wait <job-id> --jsondn optimize logs <job-id>dn optimize artifacts <job-id>dn optimize cancel <job-id> --jsondn optimize retry <job-id>dn optimize wait exits non-zero if the job finishes in failed or cancelled.
dn optimize list supports the same top-level filters as the API, including --status,
--backend, --target-kind, --project-ref, --page, and --page-size.
Platform context
Section titled “Platform context”Hosted optimization commands require platform credentials plus an active organization and workspace. Pass them explicitly with flags or configure them in your SDK profile first:
dn configuredn optimize get <job-id>