BaseFuturePlugin
Java-friendly base for implementing a Plugin -- the cross-cutting interception point. The engine's Plugin has 12 suspend callbacks plus close(), every one with a default body. This base final-overrides all 12 and re-exposes each as a CompletableFuture-returning hook whose result is the outcome; each default hook completes with the value that leaves execution unchanged. Return the future promptly and do any blocking work inside it, not before returning it.
Each hook mirrors its engine callback's shape: those whose callback returns a CallbackChoice resolve to one too (build it with Choices -- Choices.proceed to continue, Choices.breakWith to short-circuit), and the rest resolve to a replacement value. To leave execution unchanged, resolve to the original value, exactly as the default hooks do.
Properties
Functions
Callback executed after a specific agent finishes its processing.
Callback executed after an LLM response is received.
Callback executed after the ADK runner completes its execution.
Callback executed before a specific agent starts processing.
Callback executed before an LLM request is sent.
Callback executed before the ADK runner starts the main execution loop.
Callback executed before a tool is invoked.
Callback executed when an event is yielded by an agent during execution.
Callback executed when an error occurs during an LLM interaction.
Callback executed when an error occurs during a tool invocation.
Callback executed when a user message is received before an invocation starts.