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 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:571 |
output | readonly | TOutput | - | packages/core/src/types/agent-event.ts:566 |
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:578 |
status | readonly | RunStatus | Terminal status of this run-loop invocation. | packages/core/src/types/agent-event.ts:569 |
usage | readonly | Usage | - | packages/core/src/types/agent-event.ts:567 |