TaskResult
TaskResult =
object
The response payload for a completed run() execution, for every task kind; output.type tells the content representation apart (text, managed playback, retrievable artifact). A full execution failure (validation, routing, or every attempted provider failing) is surfaced by run() throwing an IndeRunError instead of returning a TaskResult; finishReason and telemetry.errorClass are reserved for a provider reporting a non-fatal, degraded outcome on an otherwise-successful result (finishReason ‘error’ is produced by the Android ML Kit GenAI provider; telemetry.errorClass is not currently set by any provider in this codebase).
Indexable
Section titled “Indexable”[
property:string]:unknown
Properties
Section titled “Properties”finishReason
Section titled “finishReason”finishReason:
FinishReason
How generation ended: ‘stop’ (natural end), ‘length’ (hit maxOutputTokens), or ‘cancelled’. ‘error’ is reserved for a provider reporting a non-fatal issue on an otherwise-returned result — the Android ML Kit GenAI provider produces it when Gemini Nano reports a finish reason that is neither a natural stop nor the token limit. A full execution failure is instead surfaced by run() throwing an IndeRunError.
output
Section titled “output”output:
TaskOutput
The normalized output of the selected provider. See task-output.schema.json.
provenance?
Section titled “provenance?”
optionalprovenance?:ExecutionProvenance
Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.
runId:
string
A unique, opaque identifier assigned by the engine for this specific execution attempt.
schemaVersion
Section titled “schemaVersion”schemaVersion:
"1.0"
Contract schema version used to interpret the result payload.
telemetry
Section titled “telemetry”telemetry:
Telemetry
Required metadata providing an overview of the execution result and performance metrics.
usage?
Section titled “usage?”
optionalusage?:Usage
Optional metadata regarding the quantity of tokens processed by the provider.
IndeRun — open-source AI execution for cross-platform apps. Built and maintained by Independo GmbH (opens in new tab), supported by netidee (opens in new tab).
MIT-licensed SDK · No SDK usage telemetry.
© 2025–2026 Independo GmbH