Agents SDK - Skipping Trace Export

Following the Haiku example and have everything working except for the tracing not working with this error message : OPENAI_API_KEY is not set, skipping trace export , seems like a bug ? I am loading env variables using dotenv which is the only difference from the example in the repo.

1 Like

I have the same problem - always get the same message “OPENAI_API_KEY is not set, skipping trace export”

same problem here, even though the rest works fine

Traces are not visible but logs are visible.

from agents import set_tracing_export_api_key

set_tracing_export_api_key(os.getenv(“OPENAI_API_KEY”))

use these 2 lines in the code , the tracing will work

3 Likes