Skip to content

Interface: AgentStateJSON

@providerprotocol/agents


@providerprotocol/agents / index / AgentStateJSON

Defined in: src/state/types.ts:200

JSON-serializable form of AgentState for persistence.

Captures the complete state of an agent at a point in time, enabling checkpointing, recovery, and debugging. The version field ensures forward compatibility as the schema evolves.

The version field follows semantic versioning and must match UAP_VERSION for successful deserialization.

AgentStateInterface for the runtime representation

id: string

Defined in: src/state/types.ts:205

Unique identifier for this state snapshot


messages: MessageJSON[]

Defined in: src/state/types.ts:208

Serialized conversation messages


metadata: Record<string, unknown>

Defined in: src/state/types.ts:214

User-defined metadata attached to the state


optional plan: PlanStepJSON[]

Defined in: src/state/types.ts:220

Execution plan for Plan-strategy agents


reasoning: string[]

Defined in: src/state/types.ts:217

Reasoning traces captured during ReAct-style execution


step: number

Defined in: src/state/types.ts:211

Current step number in the agent’s execution


optional subagentTraces: SubagentExecutionTraceJSON[]

Defined in: src/state/types.ts:223

Sub-agent execution traces per UAP spec Section 8.8


version: string

Defined in: src/state/types.ts:202

UAP version string for schema compatibility checking