Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/agent / run-state / deserializeRunState

Function: deserializeRunState()

ts
function deserializeRunState(payload, options?): RunState;

Defined in: packages/agent/src/run-state/index.ts:155

Rehydrate a RunState from the on-disk payload. Throws RunStateVersionUnsupportedError when the payload version is from a future major; throws RunStateMalformedError when the payload is structurally invalid.

Backwards-compat: a payload that omits usageByModel is accepted and the field is synthesized from the aggregate usage with attemptCount: 1 for the primary model.

Parameters

ParameterType
payloadunknown
optionsDeserializeOptions

Returns

RunState

Stable