llmwire - v2.2.0
    Preparing search index...

    Interface AgentResult

    interface AgentResult {
        data?: string;
        durationMs?: number;
        error?: string;
        errorInfo?: AIError;
        fallbackUsed?: boolean;
        finishReason?: FinishReason;
        handedOffTo?: string;
        modelUsed?: string;
        object?: unknown;
        providerId?: string;
        reasoning?: string;
        requestId?: string;
        retryCount?: number;
        steps?: Step[];
        success: boolean;
        toolCalls?: ToolCall[];
        usage?: TokenUsage;
    }

    Hierarchy (View Summary)

    Index
    data?: string
    durationMs?: number

    Wall time of the whole call, including retries and fallback.

    error?: string

    The provider's own message when success is false. errorInfo has the classification.

    errorInfo?: AIError

    Structured error when success is false.

    fallbackUsed?: boolean

    True when a fallback provider answered.

    finishReason?: FinishReason
    handedOffTo?: string

    Set when a handoff tool fired: the agent that produced this answer. Its own handedOffTo continues the chain.

    modelUsed?: string
    object?: unknown

    The parsed (and validated) answer when schema was given.

    providerId?: string
    reasoning?: string

    The model's thinking, when it exposed any. Never part of data.

    requestId?: string

    Provider request id header, when sent.

    retryCount?: number

    Retries spent before this answer.

    steps?: Step[]

    The rounds the factory ran before this answer, when maxSteps > 1 and at least one tool ran.

    success: boolean
    toolCalls?: ToolCall[]

    Calls the model wants made; finishReason is 'tool_calls'. Absent when there are none.

    usage?: TokenUsage