From the course: OpenAI API: Agents

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Tracing

Tracing

- One more subtle, but really important thing. If you're used to working with OpenAI API, you're also used to seeing the output as you're working with it, probably just dumping out the JSON so you can follow along and see what's happening. Working with the agents SDK, a lot of that information is hidden because it's all sitting inside the context that is being passed between the agent, and you have no direct access to that context. It's actually really challenging to go in and code and intercept the context and get it dumped out into the terminal because the system is supposed to be running on its own, independently of what you're doing. That doesn't mean you can't see what's happening though. Everything your agent is doing is being traced unless you explicitly tell OpenAI not to trace it. This is all done through the tracing feature, and as you can see from the documentation, tracing is enabled by default. There are two ways of disabling tracing. Either you can globally disable it or…

Contents