Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/agent / / Agent
Interface: Agent<TDeps, TOutput>
Defined in: packages/agent/src/types.ts:371
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:373 |
id | readonly | string | - | packages/agent/src/types.ts:372 |
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:402 |
registry? | readonly | ToolRegistry | The unified tool registry assembled at createAgent(...) warm-up (Principle #12): every first-party + skill tool, with cross-source name collisions resolved deterministically. Read-only and exposed for inspection; the run loop and tool_search consume it. Always present on agents built by createAgent(...). | packages/agent/src/types.ts:410 |
Methods
abort()
abort(options?): void;Defined in: packages/agent/src/types.ts:384
Parameters
| Parameter | Type |
|---|---|
options? | AbortOptions |
Returns
void
compact()
compact(options?): Promise<CompactionApiResult>;Defined in: packages/agent/src/types.ts:386
Parameters
| Parameter | Type |
|---|---|
options? | CompactOptions |
Returns
Promise<CompactionApiResult>
fanOut()
fanOut<TFanOutOutput>(options): Promise<FanOutResult<TFanOutOutput>>;Defined in: packages/agent/src/types.ts:394
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:383
Parameters
| Parameter | Type |
|---|---|
message | AgentInput |
Returns
void
run()
run(input, options?): Promise<AgentResult<TOutput>>;Defined in: packages/agent/src/types.ts:378
Parameters
| Parameter | Type |
|---|---|
input | | RunState | AgentInput |
options? | AgentCallOptions<TDeps> |
Returns
Promise<AgentResult<TOutput>>
steer()
steer(message): void;Defined in: packages/agent/src/types.ts:382
Parameters
| Parameter | Type |
|---|---|
message | AgentInput |
Returns
void
stream()
stream(input, options?): AsyncIterable<AgentEvent<TOutput>>;Defined in: packages/agent/src/types.ts:374
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:385
Parameters
| Parameter | Type |
|---|---|
options? | AgentToToolOptions |
Returns
Tool<{ input: string; }, TOutput, TDeps>