Polyman Documentation - v3.1.0
    Preparing search index...

    Interface AgentSessionDeps

    Everything a session needs.

    interface AgentSessionDeps {
        provider: Provider;
        model: string;
        tools: ToolRegistry;
        permissions: PermissionGate;
        bus: EventBus;
        buildSystemPrompt(): Promise<string>;
        makeToolContext(signal: AbortSignal): ToolContext;
        secrets(): string[];
        maxSteps: number;
        contextBudgetTokens: number;
        maxOutputTokens: number;
        temperature: number;
        chatOnly?: ChatOnlySwitch;
    }
    Index
    provider: Provider
    model: string

    Model id, like 'google/gemma-4-31b-it'.

    permissions: PermissionGate
    maxSteps: number

    Model calls per turn: 20 for chat, 8 or 12 for workers.

    contextBudgetTokens: number

    Context budget: 32000 for chat, 16000 for workers.

    maxOutputTokens: number

    Upper bound on generated tokens per call, 8000.

    temperature: number

    Sampling temperature, 0.3.

    chatOnly?: ChatOnlySwitch

    Chat-only mode. When it is active the model gets no tools, and the user sees its notice once. Without it the session always offers the tools.

    • Builds the system prompt before each model call.

      Returns Promise<string>