ADK for TypeScript: API Reference
    Preparing search index...

    Type Alias BeforeA2ARequestCallback

    BeforeA2ARequestCallback: (
        ctx: InvocationContext,
        params: MessageSendParams,
    ) => Promise<void> | void

    Callback called before sending a request to the remote agent. Allows modifying the request parameters.

    Type Declaration

      • (ctx: InvocationContext, params: MessageSendParams): Promise<void> | void
      • Parameters

        • ctx: InvocationContext

          The current invocation context, providing access to session state, agent metadata, and services.

        • params: MessageSendParams

          The A2A message send parameters that will be sent to the remote agent. Mutations to this object are reflected in the outgoing request.

        Returns Promise<void> | void

        A Promise or void. Returning a rejected Promise aborts the request.