Run
The live handle for one task - the lifecycle plus the agent’s Trace. You get them in job.runs from
task.run(agent) / taskset.run(agent), or construct one over a connected client for manual driving.
A rollout that fails before its session is live comes back as a synthesized failed run (no prompt, no
runtime); a mid-run failure keeps the real run - prompt, runtime, partial trace - with the error on
run.trace.
Grade
Structured result from grading one run, parsed from the wire grade frame
({"score": ..., "done": ..., "isError": ..., ...}).
Job
The receipt for one execution: the graded Runs of a batch under one platform job id. Every
run reports under a job, so even a single task.run returns a job of one. You get one back from
task.run / taskset.run.
run call mints its own job by default. To gather many calls under one id - a training session, a
multi-turn chat - open one with Job.start(name, *, group=1, taskset_id=None) and pass it as job=;
the training agents guide uses this session pattern.
Trace
The agent’s trajectory for one rollout - an ordered collection of Steps plus the run summary, and the
unit of training data. Every recorded step also streams to the platform as one schema-tagged span.
hud.types.Step is the shared skeleton (source, timing, error, plus the harness payloads: prompt
messages and task_call lifecycle RPCs). The tool-agent family subclasses it in hud.agents.types,
flat on the skeleton:
AgentStep- the model’s turn:content,reasoning,tool_calls,done, plusmodel,usage, and token-levelsamplewhen the backend is trainable.ToolStep- one tool round-trip: theMCPToolCallpaired with itsMCPToolResult.SubagentStep- a nested rollout’sTrace, embedded whole.
trace.final(get) (newest non-None answer
wins; trace.error is a view on it) and trace.collect(get) (every answer, in step order). Family
vocabulary stays at the call site:
Answer & result types
Answer[T]
When a task declares returns=T, the answer arrives wrapped
(from hud.environment import Answer): content is the answer parsed into T (or the original string
when parsing failed - grade it accordingly), raw is always the string as submitted.
Citation
A normalized citation across providers (hud.agents.types.Citation): type, text, source,
title, start_index, end_index. A reply annotation, not a grading input - provider agents attach
them to AgentStep.citations, and chat surfaces read the final reply’s via the trace.final(...)
query above. A task that wants to grade sources should declare them in its returns= schema so the
agent submits them as part of the answer.
Grading shapes
SubScore and EvaluationResult live with the graders - see
Graders.
Typed task I/O
Declareinput= / returns= on @env.template to surface JSON schemas in the manifest and parse the
agent’s answer into a typed Answer[T]. Any Pydantic model or standard type works.
These shapes flow through a task run; the scores they carry come from the
graders.