Strands Agents Typescript SDK
    Preparing search index...

    Type Alias HookCallback<T>

    HookCallback: (event: T) => void | Promise<void>

    Type for callback functions that handle hook events. Callbacks can be synchronous or asynchronous.

    Type Parameters

    Type Declaration

      • (event: T): void | Promise<void>
      • Parameters

        • event: T

        Returns void | Promise<void>

    const callback: HookCallback<BeforeInvocationEvent> = (event) => {
    console.log('Agent invocation started')
    }