lloyal-agents API Reference
    Preparing search index...

    Interface AgentPoolOptions

    Configuration for useAgentPool and runAgents

    interface AgentPoolOptions {
        tasks: AgentTaskSpec[];
        tools: Map<string, Tool<Record<string, unknown>>>;
        maxTurns?: number;
        params?: SamplingParams;
        pressure?: PressureThresholds;
        terminalTool?: string;
        trace?: boolean;
    }
    Index

    Properties

    tasks: AgentTaskSpec[]

    Agent task specifications — one per concurrent agent

    tools: Map<string, Tool<Record<string, unknown>>>

    Tool registry mapping tool names to Tool instances.

    This is the execution registry — it determines which tools can be dispatched at runtime. It is distinct from the per-task task.tools JSON schema that tells the model which tools are available.

    The registry also controls terminalTool gating: if the registry contains only the terminal tool, agents are allowed to call it as their first action (e.g. reporter sub-agents). If the registry contains other tools, the first call must be non-terminal to prevent agents from reporting without doing work.

    maxTurns?: number

    Maximum tool-call turns per agent before forced termination

    params?: SamplingParams

    Sampling parameters applied to all agents

    KV pressure thresholds — tune per pool. Reporter pools typically use lower thresholds than research pools since they complete in a single terminal tool call. See PressureThresholds for tuning guidance.

    terminalTool?: string

    Tool name that signals agent completion. When the model calls this tool, findings are extracted from arguments and the agent is marked done. The tool is intercepted — never dispatched to execute(). If omitted, agents complete only via stop token or hard-cut.

    trace?: boolean

    Enable per-token entropy/surprisal on agent:produce events