@threadplane/ag-uiInterfacev0.3.7

SessionAgent

What a session needs of an AG-UI client agent it is handed: the protocol's own run. Any AbstractAgent is one. The session sends each request's full input itself and reads nothing from the agent's own messages or state.

import type { SessionAgent } from '@threadplane/ag-ui';

Declaration

export interface SessionAgent  {
  abortController?: AbortController;
  abortRun?(): void;
  readonly agentId?: string;
  run(input: RunAgentInput): ReturnType<AbstractAgent['run']>;
  readonly threadId?: string;
}

Members

abortController

An HTTP agent's controller; replaced before each run, as runAgent does.

abortController?: AbortController;

abortRun · overload 1

Called when a request is cancelled or fails after run was called.

abortRun?(): void;

Returns

void

agentId

readonly agentId?: string;

run · overload 1

run(input: RunAgentInput): ReturnType<AbstractAgent['run']>;

Parameters

input · required
RunAgentInput

Returns

ReturnType<AbstractAgent['run']>

threadId

readonly threadId?: string;