Reference
Remy Reference/agent/RunTaskResult
?

RunTaskResult

Type
The output of a `runTask` call: typed output, plus turns, usage, a per-call log, and a trace id.

What runTask resolves to. In schema mode output is validated and typed from your outputSchema, so use it directly; in example mode, check parsedSuccessfully first. toolCalls is the execution log to reach for when a run surprises you (an empty list means the model never called a tool, usually a prompt problem), usage carries the cost in nanodollars, and traceId points at the full transcript the platform kept.

RunTaskResult.ts
interface RunTaskResult<T> {
  output: T
  outputRaw: string
  parsedSuccessfully: boolean
  turns: number
  usage: { inputTokens; outputTokens; totalBillingCost }
  toolCalls: { name; success; durationMs }[]
  traceId: string
}
Fields
output
T
The structured output. With outputSchema, validated and typed from the schema.
outputRaw
string
The raw model text before JSON parse. Useful when output is garbage.
parsedSuccessfully
boolean
Whether output was valid JSON. Always true in schema mode (a failure throws instead); check it in example mode.
turns
number
How many loop iterations the run used.
usage
{ inputTokens, outputTokens, totalBillingCost }
Token counts and total cost in nanodollars.
toolCalls
{ name, success, durationMs }[]
A summary of every tool call, in order. The first thing to check when a run misbehaves; empty means the model used no tools.
traceId
string
Stable id for the run's model transcript, recorded server-side. Inside a jewel, attach it to the return to keep the transcript with the pair.
Use the result
const r = await mindstudio.runTask({ /* ...outputSchema... */ });
await Records.update(id, r.output);   // typed, validated
if (!r.toolCalls.length) console.warn('agent called no tools');