Skip to content

Graphorin API reference v0.12.1


Graphorin API reference / @graphorin/core / / AgentResult

Interface: AgentResult<TOutput>

Defined in: packages/core/src/types/agent-event.ts:572

Final result of an agent run-loop invocation, returned by agent.run(...) and carried by the agent.end event.

A failed run resolves with status: 'failed' and the error in error - agent.run(...) does not reject on run failure (only on configuration/usage errors thrown before the loop starts). A suspended run resolves with status: 'awaiting_approval' and a resumable state (AG-9).

Stable

Type Parameters

Type ParameterDefault type
TOutputstring

Properties

PropertyModifierTypeDescriptionDefined in
error?readonlyRunErrorPopulated when the run failed; mirrors RunState.error.packages/core/src/types/agent-event.ts:578
outputreadonlyTOutput-packages/core/src/types/agent-event.ts:573
statereadonlyRunStateThe run's final state. Resumable when status === 'awaiting_approval' - pass it back to agent.run(...) / agent.stream(...) (optionally round-tripped through runStateToJSON/runStateFromJSON for durability). Treat as an immutable snapshot.packages/core/src/types/agent-event.ts:591
statusreadonlyRunStatusTerminal status of this run-loop invocation.packages/core/src/types/agent-event.ts:576
usagereadonlyUsage-packages/core/src/types/agent-event.ts:574
verdicts?readonlyRunVerdictsB3 (item 15): the run's per-turn security verdicts (mirrors state.verdicts). Surfaced directly so callers can apply them at the Session.push boundary without digging into the state.packages/core/src/types/agent-event.ts:584