Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/server / registry / ServerAgentLike

Interface: ServerAgentLike

Defined in: packages/server/src/registry/index.ts:28

Minimal shape the server needs from an Agent. Compatible with the Agent interface from @graphorin/agent but kept structurally so we avoid the peer dependency.

Stable

Properties

PropertyModifierTypeDefined in
idreadonlystringpackages/server/src/registry/index.ts:29

Methods

run()

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

Defined in: packages/server/src/registry/index.ts:30

Parameters

ParameterType
inputunknown
options?{ sessionId?: string; signal?: AbortSignal; userId?: string; }
options.sessionId?string
options.signal?AbortSignal
options.userId?string

Returns

Promise&lt;unknown&gt;


stream()?

ts
optional stream(input, options?): AsyncIterable<unknown>;

Defined in: packages/server/src/registry/index.ts:44

Streaming surface (IP-2). @graphorin/agent agents satisfy this structurally; POST /agents/:id/stream consumes it and emits every event onto the run's WS subject. Optional so plain run-only fixtures keep working (they emit a single terminal frame).

Parameters

ParameterType
inputunknown
options?{ sessionId?: string; signal?: AbortSignal; userId?: string; }
options.sessionId?string
options.signal?AbortSignal
options.userId?string

Returns

AsyncIterable&lt;unknown&gt;