add OpenAI Agents SDK zero-code example#72
Merged
krisztianfekete merged 6 commits intoagentevals-dev:mainfrom Mar 31, 2026
Merged
add OpenAI Agents SDK zero-code example#72krisztianfekete merged 6 commits intoagentevals-dev:mainfrom
krisztianfekete merged 6 commits intoagentevals-dev:mainfrom
Conversation
Self-contained dice-rolling agent showing zero-code OTLP integration with openai-agents>=0.3.3 via opentelemetry-instrumentation-openai-agents-v2. Includes run.py, requirements.txt, a golden multi-turn eval_set.json, and TestOpenAIAgentsZeroCode e2e tests for session/span/invocation/API verification. Uses result.to_input_list() for correct conversation context threading across turns, and try/finally to guarantee force_flush() even on API errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…example add OpenAI Agents SDK zero-code example
Self-contained dice-rolling agent showing zero-code OTLP integration with openai-agents>=0.3.3 via opentelemetry-instrumentation-openai-agents-v2. Includes run.py, requirements.txt, a golden multi-turn eval_set.json, and TestOpenAIAgentsZeroCode e2e tests for session/span/invocation/API verification. Uses result.to_input_list() for correct conversation context threading across turns, and try/finally to guarantee force_flush() even on API errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
krisztianfekete
requested changes
Mar 30, 2026
Contributor
krisztianfekete
left a comment
There was a problem hiding this comment.
Thank you for the PR!
Can you please clean it up as per the comments, and make sure to follow our AI usage guidlines mentioned here: https://github.com/agentevals-dev/agentevals/blob/main/CONTRIBUTING.md#responsible-ai-usage?
Contributor
Author
|
Will do thanks and will push once done. |
- remove CHANGELOG.md, TODOS.md, and eval_set.json (not needed) - revert pyproject.toml version bump to 0.5.2 - reduce comments in openai-agents run.py to match other examples - remove LoggerProvider: openai-agents instrumentation only emits spans Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Done. Lmk if you'd like me to make any other changes! |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
krisztianfekete
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a zero-code OTLP integration example for the OpenAI Agents SDK.
What's included
examples/zero-code-examples/openai-agents/run.py— a dice-rolling agent wired to OTel with no agentevals SDK importsexamples/zero-code-examples/openai-agents/requirements.txtexamples/zero-code-examples/openai-agents/eval_set.json— golden multi-turn eval case (greeting, die roll, prime check)TestOpenAIAgentsZeroCodeintests/integration/test_live_agents.py— 3 e2e tests covering session creation, invocation extraction, and API visibilityNotes
result.to_input_list()to thread conversation history across turns (preserves tool-call context; raw role/content dicts lose it)force_flush()is in atry/finallyso spans are always sent even if a turn raisesOPENAI_API_KEYis absent🤖 Generated with Claude Code