ACP v2 TypeScript SDK — EXPERIMENTAL DRAFT - v1.3.0
    Preparing search index...

    Type Alias UsageExperimental

    UNSTABLE

    This capability is not part of the spec yet, and may be removed or changed at any point.

    Token usage information for completed session work.

    type Usage = {
        totalTokens: number;
        inputTokens: number;
        outputTokens: number;
        thoughtTokens?: number | null;
        cachedReadTokens?: number | null;
        cachedWriteTokens?: number | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    totalTokens: number

    Sum of all token types across session.

    inputTokens: number

    Total input tokens.

    outputTokens: number

    Total output tokens.

    thoughtTokens?: number | null

    Total thought/reasoning tokens

    cachedReadTokens?: number | null

    Total cache read tokens.

    cachedWriteTokens?: number | null

    Total cache write tokens.

    _meta?: { [key: string]: unknown } | null

    The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.

    See protocol docs: Extensibility