Closed
Description
Please read this first
Yes
Describe the bug
These functions are not called when the tool is web_search_preview
- agents.lifecycle.AgentHooks.on_tool_start
- agents.lifecycle.AgentHooks.on_tool_end
- agents.agent.Agent.tool_use_behavior (A function)
Debug information
- Agents SDK version: v0.0.15
- Python version: Python 3.11
Repro steps
Ideally provide a minimal python script that can be run to reproduce the bug.
https://gist.github.com/jihun-im-open/a3892127a0e406500df7e05ff708f090
Expected behavior
The hooks should be triggered for web_search_preview
.
As it's tool input is a union of all tools
openai-agents-python/src/agents/tool.py
Line 234 in 6e078bf
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
rm-openai commentedon May 29, 2025
I should document this better (and we should have named it better), but the on_tool_start is for local tools