TurnResult
Defined in: src/types.ts:290
The compact, read-only, immutable representation of an entire turn.
Properties
endedAt
readonlyendedAt:number
Defined in: src/types.ts:311
Epoch ms when this turn ended.
error
readonlyerror: {details?:unknown;errorType:ErrorType;message:string;retryability:Retryability; } |null
Defined in: src/types.ts:302
Non-null if the turn ended in an unrecoverable error.
id
readonlyid:string
Defined in: src/types.ts:292
Unique turn ID (same as the one in TurnStart).
metadata
readonlymetadata:TurnMetadata
Defined in: src/types.ts:300
End-of-turn metadata.
prompt
readonlyprompt:string
Defined in: src/types.ts:294
The prompt that initiated this turn.
startedAt
readonlystartedAt:number
Defined in: src/types.ts:309
Epoch ms when this turn started.
steps
readonlysteps: readonlyStep[]
Defined in: src/types.ts:296
Ordered sequence of everything the agent did in this turn.
usage
readonlyusage:TokenUsage
Defined in: src/types.ts:298
Token usage totals across all iterations.