Chains plugin callbacks. First non-nil return wins (short-circuit).
All run_* functions accept nil as the first argument, acting as a
no-op when no plugin manager is configured. This avoids nil checks at
every call site.
Summary
Functions
Creates a new plugin manager from a list of plugins.
Runs after_agent plugins. May replace output with Content.
Runs after_model plugins. May replace LlmResponse.
Runs after_run plugins. Notification only, no short-circuit.
Runs after_tool plugins. May replace result map.
Runs before_agent plugins. May short-circuit with Content.
Runs before_model plugins. May short-circuit with LlmResponse.
Runs before_run plugins. May short-circuit with Content.
Runs before_tool plugins. May short-circuit with result map.
Runs on_event plugins. May modify event.
Runs on_model_error plugins. May recover with LlmResponse.
Runs on_tool_error plugins. May recover with result map.
Runs on_user_message plugins. May modify user content.
Types
@type t() :: %ADK.Plugin.Manager{plugins: [ADK.Plugin.t()]}
Functions
@spec new([ADK.Plugin.t()]) :: {:ok, t()} | {:error, String.t()}
Creates a new plugin manager from a list of plugins.
Validates that plugin names are unique.
Runs after_agent plugins. May replace output with Content.
Runs after_model plugins. May replace LlmResponse.
Runs after_run plugins. Notification only, no short-circuit.
Runs after_tool plugins. May replace result map.
Runs before_agent plugins. May short-circuit with Content.
Runs before_model plugins. May short-circuit with LlmResponse.
Runs before_run plugins. May short-circuit with Content.
Runs before_tool plugins. May short-circuit with result map.
Runs on_event plugins. May modify event.
Runs on_model_error plugins. May recover with LlmResponse.
Runs on_tool_error plugins. May recover with result map.
Runs on_user_message plugins. May modify user content.