Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / RunState

Interface: RunState

Defined in: packages/core/src/types/run.ts:59

The full, serializable state of a run. The agent runtime persists this to the checkpoint store on every awaiting_approval boundary, so a separate process can resume the run.

The shape is intentionally JSON-stable: every nested type is plain JSON-encodable (no Map, no Set, no Date).

Stable

Properties

PropertyModifierTypeDescriptionDefined in
agentIdreadonlystring-packages/core/src/types/run.ts:61
currentAgentIdreadonlystring-packages/core/src/types/run.ts:62
error?publicRunError-packages/core/src/types/run.ts:81
finishedAt?publicstring-packages/core/src/types/run.ts:80
handoffsreadonlyHandoffRecord[]-packages/core/src/types/run.ts:69
idreadonlystring-packages/core/src/types/run.ts:60
messagesreadonlyMessage[]-packages/core/src/types/run.ts:67
pendingApprovalsreadonlyToolApproval[]-packages/core/src/types/run.ts:68
sessionIdreadonlystring-packages/core/src/types/run.ts:63
startedAtreadonlystring-packages/core/src/types/run.ts:79
statuspublicRunStatus-packages/core/src/types/run.ts:65
stepsreadonlyRunStep[]-packages/core/src/types/run.ts:66
usagereadonlyUsage-packages/core/src/types/run.ts:70
usageByModel?publicRunStateUsageByModelPer-model usage breakdown. Populated by the per-step retry loop when Agent.fallbackModels fires (RB-48 / suggested DEC-164 / suggested ADR-052). Backward-compat: rehydrating a serialized state that omits the field synthesizes a single-entry map for the primary model.packages/core/src/types/run.ts:78
userId?readonlystring-packages/core/src/types/run.ts:64