-
Notifications
You must be signed in to change notification settings - Fork 944
Add documentation for better Guidance for ExecuteBashTool and BashToolPolicy #1543
Description
Is your feature request related to a problem? Please describe.
While working with:
from google.adk.tools.bash_tool import ExecuteBashTool, BashToolPolicy
I found that the current documentation lacks practical guidance and real-world examples for safely and effectively using the Bash tool within agents.
A clear and concise description of what the problem is.
There is currently no official documentation for ExecuteBashTool and BashToolPolicy. As a result, it is unclear how these components are intended to be used, how policies should be configured, and what the expected behavior is for command execution and output handling. This creates a barrier to adoption and makes it difficult to safely use the Bash tool in agent workflows.
Describe the solution you'd like
Add official documentation for ExecuteBashTool and BashToolPolicy, including:
Basic usage and initialization examples
Explanation of how BashToolPolicy works (e.g., command matching and restrictions)
End-to-end example of using the tool within an agent
Description of command execution behavior and output structure
Best practices for safe and secure usage
Describe alternatives you've considered
Reading the source code to infer intended behavior
Experimenting with trial-and-error implementations
Creating custom wrappers to control execution
However, these approaches are inefficient and do not provide clarity on best practices or intended usage.
Additional context
This issue was encountered while building an agent that relies on shell commands (e.g., Git operations). Proper documentation would make it significantly easier for developers to adopt these tools and use them safely in real-world scenarios.