ART Framework API Docs
    Preparing search index...

    Interface PESAgentStateData

    Represents the persistent state data for a PES Agent instance associated with a thread. This state is saved to storage and persists across multiple execution cycles.

    PESAgentStateData

    interface PESAgentStateData {
        currentStepId: null | string;
        intent: string;
        isPaused: boolean;
        pendingA2ATasks?: {
            itemId: string;
            submittedAt: number;
            taskIds: string[];
        };
        plan: string;
        stepOutputs?: Record<string, StepOutputEntry>;
        suspension?: {
            itemId: string;
            iterationState: ArtStandardPrompt;
            partialToolResults?: ToolResult[];
            suspensionId: string;
            toolCall: ParsedToolCall;
        };
        threadId: string;
        title: string;
        todoList: TodoItem[];
    }
    Index

    Properties

    currentStepId: null | string

    The ID of the todo item currently being executed. If null, no item is currently active (e.g., planning phase, completed state).

    intent: string

    The user's intent extracted from their query. This is a concise summary of what the user wants to accomplish.

    isPaused: boolean

    Indicates whether the agent is currently paused. This flag is set when HITL (Human-in-the-Loop) is triggered.

    pendingA2ATasks?: { itemId: string; submittedAt: number; taskIds: string[] }

    Pending A2A tasks that the agent is waiting for. This enables recovery after process restart by tracking submitted but incomplete A2A tasks.

    Type declaration

    • itemId: string

      The TodoItem ID that triggered the A2A delegation.

    • submittedAt: number

      When the tasks were submitted.

    • taskIds: string[]

      The IDs of the A2A tasks being waited on.

    0.4.11

    plan: string

    The high-level plan describing how the agent will address the user's intent. This is a human-readable description of the overall approach.

    stepOutputs?: Record<string, StepOutputEntry>

    A table of outputs from completed steps. This persists step outputs for use during resume operations and synthesis. Keys are step IDs, values are StepOutputEntry objects.

    This enables cross-step data access and ensures that the synthesis phase has access to all relevant information from completed steps.

    suspension?: {
        itemId: string;
        iterationState: ArtStandardPrompt;
        partialToolResults?: ToolResult[];
        suspensionId: string;
        toolCall: ParsedToolCall;
    }

    Suspension context for HITL (Human-in-the-Loop) functionality. When a blocking tool is called, the agent suspends execution and stores the context here to allow resumption after user input.

    Type declaration

    • itemId: string

      The ID of the TodoItem that triggered the suspension. This identifies which step is waiting for human input.

    • iterationState: ArtStandardPrompt

      The captured message history (ArtStandardPrompt) at the time of suspension. This allows the agent to resume execution with the correct context.

    • OptionalpartialToolResults?: ToolResult[]

      Tool results from successful tools in the same batch that completed before the suspending tool was executed. This prevents data loss when a batch contains both successful and suspending tools.

      0.4.11

    • suspensionId: string

      Unique identifier for this suspension event. Used to match resume requests to the correct suspension.

    • toolCall: ParsedToolCall

      The specific tool call that triggered the suspension. This is the call that requires human approval or input.

    This field is only present when the agent is in a suspended state.

    threadId: string

    The thread ID this state belongs to. Links the state to a specific conversation thread.

    title: string

    A concise title for the thread, typically <= 10 words. Generated based on the user's query and context.

    todoList: TodoItem[]

    The complete list of todo items representing the execution plan. This array contains all steps the agent needs to take, in execution order.