Skip to content

AIDK API Reference / aidk-client / ExecutionHandler

Class: ExecutionHandler ​

Defined in: packages/client/src/execution-handler.ts:470

ExecutionHandler - Full execution management

Wraps EngineClient and StreamProcessor for complete execution lifecycle. Framework-agnostic - used by React hooks and Angular services.

Constructors ​

Constructor ​

ts
new ExecutionHandler(config: ExecutionHandlerConfig): ExecutionHandler;

Defined in: packages/client/src/execution-handler.ts:477

Parameters ​

ParameterType
configExecutionHandlerConfig

Returns ​

ExecutionHandler

Methods ​

clear() ​

ts
clear(): void;

Defined in: packages/client/src/execution-handler.ts:596

Clear all messages and reset state

Returns ​

void


getIsStreaming() ​

ts
getIsStreaming(): boolean;

Defined in: packages/client/src/execution-handler.ts:527

Check if currently streaming

Returns ​

boolean


getMessages() ​

ts
getMessages(): Message[];

Defined in: packages/client/src/execution-handler.ts:520

Get current messages

Returns ​

Message[]


getThreadId() ​

ts
getThreadId(): string | null;

Defined in: packages/client/src/execution-handler.ts:513

Get current thread ID

Returns ​

string | null


sendMessage() ​

ts
sendMessage(
   agentId: string, 
   input: MessageInput, 
   options: SendMessageOptions): Promise<void>;

Defined in: packages/client/src/execution-handler.ts:534

Send a message and stream the response

Parameters ​

ParameterType
agentIdstring
inputMessageInput
optionsSendMessageOptions

Returns ​

Promise<void>


updateClient() ​

ts
updateClient(client: EngineClient): void;

Defined in: packages/client/src/execution-handler.ts:506

Update the client instance (e.g., when config changes)

Parameters ​

ParameterType
clientEngineClient

Returns ​

void

Released under the MIT License.