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

    Type Alias AfterA2ARequestCallback

    AfterA2ARequestCallback: (
        ctx: InvocationContext,
        resp: A2AStreamEventData,
    ) => Promise<void> | void

    Callback called after receiving a response from the remote agent. Allows inspecting or modifying the response.

    Type Declaration

      • (ctx: InvocationContext, resp: A2AStreamEventData): Promise<void> | void
      • Parameters

        • ctx: InvocationContext

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

        • resp: A2AStreamEventData

          The raw A2A stream event data received from the remote agent, before conversion to an ADK event.

        Returns Promise<void> | void

        A Promise or void. Returning a rejected Promise stops further processing of the response.