afterAgent

open suspend fun afterAgent(context: CallbackContext): CallbackChoice<Unit, Content>

Callback executed after a specific agent finishes its processing.

Allows plugins/callbacks to inspect invocation state or override the agent's final response.

Return

A CallbackChoice where returning CallbackChoice.Break with a custom Content overrides the agent's original response and appends it to the event history, mimicking Python ADK's behavior when a truthy content is returned. Returning CallbackChoice.Continue with Unit allows execution to proceed utilizing the original response naturally.

Parameters

context

The context of the current agent call.