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 Parameter | Default type |
|---|---|
TOutput | string |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
error? | readonly | RunError | Populated when the run failed; mirrors RunState.error. | packages/core/src/types/agent-event.ts:578 |
output | readonly | TOutput | - | packages/core/src/types/agent-event.ts:573 |
state | readonly | RunState | The 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 |
status | readonly | RunStatus | Terminal status of this run-loop invocation. | packages/core/src/types/agent-event.ts:576 |
usage | readonly | Usage | - | packages/core/src/types/agent-event.ts:574 |
verdicts? | readonly | RunVerdicts | B3 (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 |