lloyal-agents API Reference
    Preparing search index...

    Interface TraceToken

    Per-token trace entry captured when AgentPoolOptions.trace is true

    Each entry corresponds to one sampled token and the distribution state at the moment it was drawn. Available on AgentResult.trace after pool completion.

    interface TraceToken {
        entropy: number;
        surprisal: number;
        text: string;
    }
    Index

    Properties

    entropy: number

    Shannon entropy of the full vocabulary distribution (bits, base-2)

    surprisal: number

    Surprisal of the chosen token: -log2(p)

    text: string

    Decoded text for this token