Files
openai--openai-agents-python/examples/basic
Wen-Tien Chang 5e1db14da5 Add tool call arguments in ToolContext for RunHooks (#1765)
## Background 

Currently, the `RunHooks` lifecycle (`on_tool_start`, `on_tool_end`)
exposes the `Tool` and `ToolContext`, but does not include the actual
arguments passed to the tool call.

resolves https://github.com/openai/openai-agents-python/issues/939

## Solution

This implementation is inspired by [PR
#1598](https://github.com/openai/openai-agents-python/pull/1598).

* Add a new `tool_arguments` field to `ToolContext` and populate it via
from_agent_context with tool_call.arguments.
* Update `lifecycle_example.py` to demonstrate tool_arguments in hooks
* Unlike the proposal in [PR
#253](https://github.com/openai/openai-agents-python/issues/253), this
solution is not expected to introduce breaking changes, making it easier
to adopt.
2025-09-22 19:05:23 -04:00
..
2025-03-11 09:42:28 -07:00
2025-06-16 15:47:48 -04:00
2025-03-11 09:42:28 -07:00