Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/core / / AgentResult

Interface: AgentResult<TOutput>

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

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:571
outputreadonlyTOutput-packages/core/src/types/agent-event.ts:566
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:578
statusreadonlyRunStatusTerminal status of this run-loop invocation.packages/core/src/types/agent-event.ts:569
usagereadonlyUsage-packages/core/src/types/agent-event.ts:567