afterRun

open suspend override fun afterRun(invocationContext: InvocationContext)

Callback executed after the ADK runner completes its execution, or after the caller stops collecting early (for example with first() or take(n)) or its collector throws.

It does not run when the run fails (see onRunError) or is canceled. If it fails after the caller stopped, the failure goes to onRunError and is thrown only if it is an Error.

Parameters

invocationContext

The context for the entire invocation.