You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable local environment interactions by adding the EnvironmentToolset
with a LocalEnvironment instance to your agent's tools.
Proposed Change:
Get started
Enable local environment interactions by adding the EnvironmentToolset
with a LocalEnvironment instance to your agent's tools.
You can use the optional max_output_chars parameter when initializing EnvironmentToolset to limit the maximum number of characters returned from file reads or command executions. This helps prevent large file contents or command outputs from exceeding the agent's context window limit.
Reasoning:
The EnvironmentToolset was updated to accept max_output_chars which controls output truncation for ReadFileTool and ExecuteTool. This helps users prevent their agents' context windows from being overwhelmed by large file/command outputs.
@joefernandez edited passive voice, made the language more straightforward, the examples are sufficient and clear. I also think that current documentation needs more detail and this is a good contribution. My next step would be: validate the code that is currently documented with Critique or with VS code, although the syntax looks good so far. I also think that in terms of organization/taxonomy the article is good to keep in that section.
1. Support for max_output_chars in EnvironmentToolset
Enable local environment interactions by adding the EnvironmentToolset
with a LocalEnvironment instance to your agent's tools.
Set the optional max_output_chars parameter when initializing EnvironmentToolset to limit the maximum number of characters returned from file reads or command executions. This helps prevent large file contents or command outputs from exceeding the agent's context window limit.
Reasoning:
The EnvironmentToolset now accepts max_output_chars which controls output truncation for ReadFileTool and ExecuteTool. This prevents the agents' context windows from being overwhelmed by large file/command outputs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Support for
max_output_charsinEnvironmentToolsetDoc file: docs/integrations/environment-toolset.md
Current state:
Proposed Change:
Reasoning:
The
EnvironmentToolsetwas updated to acceptmax_output_charswhich controls output truncation forReadFileToolandExecuteTool. This helps users prevent their agents' context windows from being overwhelmed by large file/command outputs.Reference: src/google/adk/tools/environment/_environment_toolset.py