| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
At its core, ADK extensibility is built on callbacks: functions you write that ADK automatically executes at key stages of an agent's lifecycle. A Plugin is simply a class that packages these individual callback functions together for a broader purpose.
While a standard Agent Callback is configured on a single agent, a single tool for a specific task, a Plugin is registered once on the Runner and its callbacks apply globally to every agent, tool, and LLM call managed by that runner. This makes Plugins the ideal solution for implementing horizontal features that cut across your entire application.
Plugins are incredibly versatile. By implementing different callback methods, you can achieve a wide range of functionalities.
Use following command to run the main.py
python3 -m contributing.samples.plugins.plugin_basic.mainIt should output the following content. Note that the outputs from plugin are printed.
[Plugin] Agent run count: 1
[Plugin] LLM request count: 1
** Got event from hello_world
Hello world: query is [hello world]
** Got event from hello_world
[Plugin] LLM request count: 2
** Got event from hello_world| Back | FazBrowse Home | New Git URL |