Skip to content

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 ParameterDefault type
TDepsunknown
TOutputstring

Properties

PropertyModifierTypeDescriptionDefined in
configreadonlyAgentConfig<TDeps, TOutput>-packages/agent/src/types.ts:323
idreadonlystring-packages/agent/src/types.ts:322
progressreadonlyAgentProgressIOStructured 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()

ts
abort(options?): void;

Defined in: packages/agent/src/types.ts:334

Parameters

ParameterType
options?AbortOptions

Returns

void


compact()

ts
compact(options?): Promise<CompactionApiResult>;

Defined in: packages/agent/src/types.ts:336

Parameters

ParameterType
options?CompactOptions

Returns

Promise&lt;CompactionApiResult&gt;


fanOut()

ts
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 ParameterDefault type
TFanOutOutputunknown

Parameters

ParameterType
optionsAgentFanOutOptions&lt;TFanOutOutput&gt;

Returns

Promise<FanOutResult&lt;TFanOutOutput&gt;>


followUp()

ts
followUp(message): void;

Defined in: packages/agent/src/types.ts:333

Parameters

ParameterType
messageAgentInput

Returns

void


run()

ts
run(input, options?): Promise<AgentResult<TOutput>>;

Defined in: packages/agent/src/types.ts:328

Parameters

ParameterType
input| RunState | AgentInput
options?AgentCallOptions&lt;TDeps&gt;

Returns

Promise<AgentResult&lt;TOutput&gt;>


steer()

ts
steer(message): void;

Defined in: packages/agent/src/types.ts:332

Parameters

ParameterType
messageAgentInput

Returns

void


stream()

ts
stream(input, options?): AsyncIterable<AgentEvent<TOutput>>;

Defined in: packages/agent/src/types.ts:324

Parameters

ParameterType
input| RunState | AgentInput
options?AgentCallOptions&lt;TDeps&gt;

Returns

AsyncIterable<AgentEvent&lt;TOutput&gt;>


toTool()

ts
toTool(options?): Tool<{
  input: string;
}, TOutput, TDeps>;

Defined in: packages/agent/src/types.ts:335

Parameters

ParameterType
options?AgentToToolOptions

Returns

Tool<{ input: string; }, TOutput, TDeps>