-
Notifications
You must be signed in to change notification settings - Fork 347
Update ADK doc according to issue #744 - 8 #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
executed at various stages of an agent workflow lifecycle using callback hooks. | ||
You use Plugins for functionality that is applicable across your agent workflow. | ||
Some typical applications of Plugins are as follows: | ||
Plugins are best used for adding custom behaviors such as: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
* **Logging:** Track important information at each callback point. | ||
* **Context Management:** Filter the LLM context to reduce its size. | ||
* **Error Handling:** Implement custom logic to handle tool failures. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
better modularity and flexibility than Callbacks. For more details, see | ||
[Callbacks and Plugins for Security Guardrails](/adk-docs/safety/#callbacks-and-plugins-for-security-guardrails). | ||
## How to Use | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
If your ADK workflow uses Plugins, you must run your workflow without the | ||
web interface. | ||
To use a plugin, you add it to the `plugins` list of your `App`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
```python | ||
from google.adk.apps import App | ||
from my_plugins import MyCustomPlugin | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
|
||
### User Message callbacks | ||
## Available Plugins | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
* [Logging Plugin](logging_plugin.md) | ||
* [Context Filter Plugin](context_filter_plugin.md) | ||
* [Save Files As Artifacts Plugin](save_files_as_artifacts_plugin.md) | ||
* [Reflect and Retry Tool Plugin](reflect_and_retry_tool_plugin.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BREAKING CHANGE: deleting existing content
self, *, invocation_context: InvocationContext | ||
) -> Optional[None]: | ||
``` | ||
* [Logging Plugin](logging_plugin.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KEEP: review and update
This PR adds documentation for the new
ReflectRetryToolPlugin
, as requested in issue #744.