nexus-agents - v2.80.0
    Preparing search index...

    Interface AgentRunResult

    Final result of a successful runAgent call.

    stopReason: 'agent-stopped' | 'turn-budget' | 'tool-error' | 'cancelled' is reported via the result, NOT via Result.err — partial-progress runs are gradable, and the harness inspects turns to decide.

    interface AgentRunResult {
        turnsUsed: number;
        stopReason: AgentStopReason;
        turns: readonly AgentTurn[];
        totalInputTokens?: number;
        totalOutputTokens?: number;
        providerId: string;
        modelId: string;
        adapterStrategy: string;
        finalContent: string;
    }
    Index

    Properties

    turnsUsed: number
    stopReason: AgentStopReason
    turns: readonly AgentTurn[]
    totalInputTokens?: number

    Aggregated token usage across all turns (sum of per-turn inputs/outputs).

    totalOutputTokens?: number
    providerId: string

    Provider-id stamp from the underlying IModelAdapter — operators read this when comparing eval results across providers, since tool-use fidelity is provider-dependent.

    modelId: string

    Model-id stamp from the underlying IModelAdapter.

    adapterStrategy: string

    Strategy used to drive the loop. native:<providerId> when the underlying adapter is a known provider whose tool-use API is being threaded through; wrapper for unknown providers / custom adapters where the loop relies only on the IModelAdapter contract surface.

    Eval harnesses record this so cross-provider runs are auditable.

    finalContent: string

    The model's final assistant content (the response after the last tool result, when the model emits no further tool call). Empty string when the loop ended on turn-budget or cancelled.