Package com.google.adk.plugins
Class BasePlugin
java.lang.Object
com.google.adk.plugins.BasePlugin
- All Implemented Interfaces:
Plugin
- Direct Known Subclasses:
ContextFilterPlugin,GlobalInstructionPlugin,LoggingPlugin,PluginManager
Base class for creating plugins.
Plugins provide a structured way to intercept and modify agent, tool, and LLM behaviors at critical execution points in a callback manner. While agent callbacks apply to a particular agent, plugins applies globally to all agents added in the runner. Plugins are best used for adding custom behaviors like logging, monitoring, caching, or modifying requests and responses at key stages.
A plugin can implement one or more methods of callbacks, but should not implement the same method of callback for multiple times.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.adk.plugins.Plugin
afterAgentCallback, afterModelCallback, afterRunCallback, afterToolCallback, beforeAgentCallback, beforeModelCallback, beforeRunCallback, beforeToolCallback, close, onEventCallback, onModelErrorCallback, onToolErrorCallback, onUserMessageCallback