adk_plugin behaviour (erlang_adk v0.7.0)
View SourceBehaviour contract for ordered, Runner-scoped plugins.
A plugin implements any subset of the lifecycle callbacks below. Every callback receives the same immutable, secret-pruned context map, the value at that point in the pipeline, and its private configuration. Observation plugins should return observe (or continue). Intervention plugins may amend the value and continue the operation, return a value immediately, or halt with an error. {replace, Value} is retained as a compatibility alias for {return, Value}; it never means "amend and continue".
Summary
Types
-type hook() ::
on_user_message | before_run | after_run | before_agent | after_agent | before_model |
after_model | on_model_error | before_tool | after_tool | on_tool_error | on_event |
on_agent_error | on_run_error | on_error.