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

    Interface AgentSessionApi

    What the UI and the workflow use of a session.

    interface AgentSessionApi {
        messages: readonly Message[];
        send(text: string): Promise<"error" | "done" | "cancelled" | "max_steps">;
        cancel(): void;
        resolveApproval(approvalId: string, decision: ApprovalDecision): void;
    }

    Implemented by

    Index
    messages: readonly Message[]

    The conversation so far.

    • Runs one turn for a user message, and says how it ended.

      Parameters

      • text: string

      Returns Promise<"error" | "done" | "cancelled" | "max_steps">