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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
agentId | readonly | string | - | packages/core/src/types/run.ts:61 |
currentAgentId | readonly | string | - | packages/core/src/types/run.ts:62 |
error? | public | RunError | - | packages/core/src/types/run.ts:81 |
finishedAt? | public | string | - | packages/core/src/types/run.ts:80 |
handoffs | readonly | HandoffRecord[] | - | packages/core/src/types/run.ts:69 |
id | readonly | string | - | packages/core/src/types/run.ts:60 |
messages | readonly | Message[] | - | packages/core/src/types/run.ts:67 |
pendingApprovals | readonly | ToolApproval[] | - | packages/core/src/types/run.ts:68 |
sessionId | readonly | string | - | packages/core/src/types/run.ts:63 |
startedAt | readonly | string | - | packages/core/src/types/run.ts:79 |
status | public | RunStatus | - | packages/core/src/types/run.ts:65 |
steps | readonly | RunStep[] | - | packages/core/src/types/run.ts:66 |
usage | readonly | Usage | - | packages/core/src/types/run.ts:70 |
usageByModel? | public | RunStateUsageByModel | Per-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? | readonly | string | - | packages/core/src/types/run.ts:64 |