Skip to main content

Type alias: Handler

Ƭ Handler: (runtime: BgentRuntime, message: Message, state?: State, options?: { [key: string]: unknown; }) => Promise<unknown>

Represents the type of a handler function, which takes a runtime instance, a message, and an optional state, and returns a promise resolving to any type.

Type declaration

▸ (runtime, message, state?, options?): Promise<unknown>

Parameters
NameType
runtimeBgentRuntime
messageMessage
state?State
options?Object
Returns

Promise<unknown>