@agorio/sdkDocs


Interface: SessionState

Serializable snapshot of a ShoppingAgent’s mid-run state. Persist via a SessionStorage implementation; rehydrate by passing sessionId to a ShoppingAgent constructed with the same sessionStorage. Adapter and LLM instances are NOT serialized — they must be re-supplied at construction.

Properties

activeMerchantDomain

activeMerchantDomain: null | string

Defined in

src/types/index.ts:584


customerId?

optional customerId: string

Optional customer/owner id for tenant-scoped storages.

Defined in

src/types/index.ts:588


iteration

iteration: number

Defined in

src/types/index.ts:573


merchants

merchants: object[]

Persisted per-merchant state (cart, checkout session, shipping).

Defined in

src/types/index.ts:577


messages

messages: ChatMessage[]

Full conversation history needed to continue the LLM loop.

Defined in

src/types/index.ts:575


pluginState?

optional pluginState: Record<string, Record<string, unknown>>

Plugin state keyed by plugin name (getState() / hydrate() round-trip).

Defined in

src/types/index.ts:586


savedAt

savedAt: string

Defined in

src/types/index.ts:589


sdkVersion?

optional sdkVersion: string

Agorio SDK version that wrote this snapshot.

Defined in

src/types/index.ts:591


sessionId

sessionId: string

Defined in

src/types/index.ts:571


task

task: string

Defined in

src/types/index.ts:572