Commit a9b4276
docs(tools): encourage using mode='single_turn' in AgentTool and document manual artifacts configuration
Merge #6197
### Link to Issue or Description of Change
- Closes: #3232
### Problem
PR 6197 originally proposed adding an auto-attachment flag to `AgentTool` to recursively inject `load_artifacts_tool` to sub-agents. However:
1. `AgentTool` is no longer encouraged to use directly in favor of using `mode='single_turn'` sub-agents.
2. Auto-attaching the tool dynamically at runtime via `list_artifacts` creates unnecessary performance overhead for all agent tool executions.
### Solution
Instead of any code changes, we update `AgentTool`'s docstring to:
1. Recommend the use of `mode='single_turn'` sub-agents (the modern replacement for `AgentTool`).
2. Document that if a sub-agent needs to access parent artifacts, the developer should simply add `load_artifacts_tool` manually to the sub-agent's `tools` list.
This resolves the usability gap by clarifying the path forward without adding deprecated flags or introducing runtime slowness.
Co-authored-by: Xuan Yang <xygoogle@google.com>
COPYBARA_INTEGRATE_REVIEW=#6197 from nuthalapativarun:fix/3232-auto-include-load-artifacts-tool 645c99e
PiperOrigin-RevId: 9485757131 parent f6387c4 commit a9b4276
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
0 commit comments