Would it be possible to expose callId
in tool lifecycle events for better tracking?
#100
Labels
enhancement
New feature or request
package:agents-core
package:agents-realtime
question
Further information is requested
Description:
I've been exploring how to track individual tool calls across their lifecycle using the OpenAI Agents JS SDK. I noticed that the
agent_tool_start
andagent_tool_end
events don't seem to include acallId
or similar identifier, which makes it a bit tricky to correlate the beginning and end of a specific tool call—especially when a tool may be invoked multiple times concurrently.Question / Suggestion
Is there a reason why
callId
(which I believe is used internally to track tool invocations) isn't exposed in the tool lifecycle events?If it's technically feasible, would it make sense to include it in the emitted events like so?
Why This Might Help
Having access to something like
callId
would be useful for:agent_tool_start
andagent_tool_end
for the same tool callCurrent Workaround
At the moment, I'm considering workarounds like generating my own unique IDs per tool invocation, but that feels redundant if the SDK already generates and tracks a
callId
internally.Curious to Know
If there's already a way to do this or a better recommended approach, I’d love to hear about it!
The text was updated successfully, but these errors were encountered: