lloyal-agents API Reference
    Preparing search index...

    Interface PressureThresholds

    KV pressure thresholds controlling agent shutdown under context exhaustion

    Two thresholds govern what happens as remaining KV shrinks:

    softLimit (default 1024) — remaining KV floor for new work. Enforced at three points:

    • SETTLE: tool results that would cross this floor are rejected and the agent is marked done. This is the primary enforcement point — tool results (search results, etc.) are the largest KV consumers.
    • PRODUCE (stop-token boundary): agents that want a non-terminal tool call are hard-cut. Terminal tools (e.g. report()) still pass.
    • INIT prefill: agents that don't fit above this floor are dropped.

    Set to account for downstream pool needs (reporters, verification).

    hardLimit (default 128) — crash-prevention floor. When remaining drops below this, agents are killed immediately before produceSync(). Prevents llama_decode "no memory slot" failures. Pure safety net — should never be the primary budget control.

    interface PressureThresholds {
        hardLimit?: number;
        softLimit?: number;
    }
    Index

    Properties

    hardLimit?: number

    Crash-prevention floor (tokens). When remaining drops below this, agents are killed immediately before produceSync(). Prevents llama_decode "no memory slot for batch" failures. Default: 128

    softLimit?: number

    Remaining KV floor for new work (tokens). When remaining drops below this, SETTLE rejects tool results, PRODUCE hard-cuts non-terminal tool calls, and INIT drops agents that don't fit.

    Set to account for downstream pool needs (reporters, verification). Default: 1024