Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/agent / / Agent
Interface: Agent<TDeps, TOutput>
Defined in: packages/agent/src/types.ts:321
Public agent surface returned by createAgent.
Stable
Type Parameters
| Type Parameter | Default type |
|---|---|
TDeps | unknown |
TOutput | string |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
config | readonly | AgentConfig<TDeps, TOutput> | - | packages/agent/src/types.ts:323 |
id | readonly | string | - | packages/agent/src/types.ts:322 |
progress | readonly | AgentProgressIO | Structured handoff-artifact APIs. Persists / reads UTF-8 text artifacts under the configured artifact root; cross-run reads require an explicit runId cursor on the read options. | packages/agent/src/types.ts:352 |
Methods
abort()
abort(options?): void;Defined in: packages/agent/src/types.ts:334
Parameters
| Parameter | Type |
|---|---|
options? | AbortOptions |
Returns
void
compact()
compact(options?): Promise<CompactionApiResult>;Defined in: packages/agent/src/types.ts:336
Parameters
| Parameter | Type |
|---|---|
options? | CompactOptions |
Returns
Promise<CompactionApiResult>
fanOut()
fanOut<TFanOutOutput>(options): Promise<FanOutResult<TFanOutOutput>>;Defined in: packages/agent/src/types.ts:344
Convenience wrapper around the standalone runFanOut(...). The returned FanOutResult carries per-child status + the merged output. Per-child failures are captured in children[].status — this method never throws on a child failure (the merge strategy decides whether to propagate).
Type Parameters
| Type Parameter | Default type |
|---|---|
TFanOutOutput | unknown |
Parameters
| Parameter | Type |
|---|---|
options | AgentFanOutOptions<TFanOutOutput> |
Returns
Promise<FanOutResult<TFanOutOutput>>
followUp()
followUp(message): void;Defined in: packages/agent/src/types.ts:333
Parameters
| Parameter | Type |
|---|---|
message | AgentInput |
Returns
void
run()
run(input, options?): Promise<AgentResult<TOutput>>;Defined in: packages/agent/src/types.ts:328
Parameters
| Parameter | Type |
|---|---|
input | | RunState | AgentInput |
options? | AgentCallOptions<TDeps> |
Returns
Promise<AgentResult<TOutput>>
steer()
steer(message): void;Defined in: packages/agent/src/types.ts:332
Parameters
| Parameter | Type |
|---|---|
message | AgentInput |
Returns
void
stream()
stream(input, options?): AsyncIterable<AgentEvent<TOutput>>;Defined in: packages/agent/src/types.ts:324
Parameters
| Parameter | Type |
|---|---|
input | | RunState | AgentInput |
options? | AgentCallOptions<TDeps> |
Returns
AsyncIterable<AgentEvent<TOutput>>
toTool()
toTool(options?): Tool<{
input: string;
}, TOutput, TDeps>;Defined in: packages/agent/src/types.ts:335
Parameters
| Parameter | Type |
|---|---|
options? | AgentToToolOptions |
Returns
Tool<{ input: string; }, TOutput, TDeps>