Skip to content

Support openai-agents #4437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 72 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
09425e6
Barebone of new integration
antonpirker Jun 2, 2025
03f7e24
Creating some spans
antonpirker Jun 3, 2025
b24fe91
Removed traceprovider. the hooks work great
antonpirker Jun 3, 2025
2558fd1
cleanup
antonpirker Jun 3, 2025
5ce67e7
use scopes, that what they are meant for.
antonpirker Jun 3, 2025
55f3ea8
Cleanup
antonpirker Jun 3, 2025
0385775
Create transaction for runner.run
antonpirker Jun 3, 2025
2f38a88
Enable our RunHooks automatically
antonpirker Jun 3, 2025
4f25c2e
cleanup
antonpirker Jun 3, 2025
22ed21c
Better naming
antonpirker Jun 4, 2025
be37679
organized code
antonpirker Jun 4, 2025
1a72a92
Set some common data
antonpirker Jun 4, 2025
f28fc61
work on tool span
antonpirker Jun 4, 2025
2e24997
organize code
antonpirker Jun 4, 2025
bba3ef2
organize code
antonpirker Jun 4, 2025
cf06427
organize code
antonpirker Jun 4, 2025
d9acb1e
organize code and set operation name
antonpirker Jun 4, 2025
87f6562
set gen_ai.system
antonpirker Jun 4, 2025
c8a89db
ai client spans
antonpirker Jun 5, 2025
1f21a3b
Added token usage to ai client spans
antonpirker Jun 5, 2025
1e24c10
refactoring
antonpirker Jun 5, 2025
a1763ec
refacotring
antonpirker Jun 5, 2025
5d392f6
order
antonpirker Jun 5, 2025
e7710bc
order
antonpirker Jun 5, 2025
990fae0
better ai client spans
antonpirker Jun 6, 2025
1ac4337
cleanup
antonpirker Jun 6, 2025
08c47e5
moving stuff around
antonpirker Jun 6, 2025
6db1476
moving stuff around
antonpirker Jun 6, 2025
5ca575c
some consistency
antonpirker Jun 6, 2025
c6dbe47
Tool input and output
antonpirker Jun 6, 2025
fd028ef
removed debug output
antonpirker Jun 6, 2025
18f3b41
Using deprecated attr names to make ui work
antonpirker Jun 11, 2025
d64a1de
Updated prompt messages format.
antonpirker Jun 12, 2025
8c7a3dc
better input and output for ai client span
antonpirker Jun 12, 2025
c41a63b
renamed some attributes
antonpirker Jun 13, 2025
2e53aa7
Add available tools to client span
antonpirker Jun 13, 2025
5331ace
add it everywhere where an agent is available
antonpirker Jun 13, 2025
cd1f4ee
made tool_calls array of object
antonpirker Jun 16, 2025
c9b06e4
cleanup
antonpirker Jun 16, 2025
0942b56
cleanup
antonpirker Jun 16, 2025
92f015d
cleanup
antonpirker Jun 16, 2025
78064e7
cleanup
antonpirker Jun 16, 2025
e79d3c7
handle pii
antonpirker Jun 16, 2025
cead2b0
Merge branch 'master' into antonpirker/openai-agents-integration
antonpirker Jun 16, 2025
3ff9242
first version of vibe coded test suite
antonpirker Jun 16, 2025
39c124d
move stuff
antonpirker Jun 16, 2025
20c5343
tests
antonpirker Jun 17, 2025
c31d4a4
Better output
antonpirker Jun 17, 2025
5aa3089
a working test
antonpirker Jun 17, 2025
4ef332f
another test
antonpirker Jun 17, 2025
abe5d05
another test
antonpirker Jun 17, 2025
3a2230d
Setting span origin
antonpirker Jun 17, 2025
90d2cb4
Setting span origin
antonpirker Jun 17, 2025
005e6d0
fixed tests
antonpirker Jun 17, 2025
c5dd40b
cleanup
antonpirker Jun 17, 2025
c6fcd9d
disable openai tracing because it emits a warning when no api_key is set
antonpirker Jun 17, 2025
1a1aa26
updated test matrix
antonpirker Jun 17, 2025
e0fdbcf
cleanup
antonpirker Jun 17, 2025
ed4997b
linting
antonpirker Jun 17, 2025
634ddce
linting
antonpirker Jun 17, 2025
68cdbc4
improved check
antonpirker Jun 17, 2025
82e8a02
better span origin
antonpirker Jun 17, 2025
1aecf4f
linting
antonpirker Jun 17, 2025
b53d599
Merge branch 'master' into antonpirker/openai-agents-integration
antonpirker Jun 17, 2025
66a2960
.
antonpirker Jun 17, 2025
69cd9f3
proper classmethod patching
antonpirker Jun 17, 2025
650ed23
Merge branch 'master' into antonpirker/openai-agents-integration
antonpirker Jun 17, 2025
a8c6415
better invocation spans
antonpirker Jun 17, 2025
0f97113
proper invocation spans
antonpirker Jun 17, 2025
99ccbee
cleanup
antonpirker Jun 17, 2025
5c59668
Bring back handoff span
antonpirker Jun 18, 2025
269802b
Bring back handoff span 2
antonpirker Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest"
- name: Test openai_agents latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents-latest"
- name: Test huggingface_hub latest
run: |
set -x # print commands that are executed
Expand Down Expand Up @@ -141,6 +145,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai"
- name: Test openai_agents pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai_agents"
- name: Test huggingface_hub pinned
run: |
set -x # print commands that are executed
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ ignore_missing_imports = true
module = "grpc.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "agents.*"
ignore_missing_imports = true

#
# Tool: Flake8
#
Expand Down
6 changes: 6 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
"loguru": {
"package": "loguru",
},
"openai_agents": {
"package": "openai-agents",
"deps": {
"*": ["pytest-asyncio"],
},
},
"openfeature": {
"package": "openfeature-sdk",
},
Expand Down
1 change: 1 addition & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ setenv =
litestar: TESTPATH=tests/integrations/litestar
loguru: TESTPATH=tests/integrations/loguru
openai: TESTPATH=tests/integrations/openai
openai_agents: TESTPATH=tests/integrations/openai_agents
openfeature: TESTPATH=tests/integrations/openfeature
opentelemetry: TESTPATH=tests/integrations/opentelemetry
potel: TESTPATH=tests/integrations/opentelemetry
Expand Down
1 change: 1 addition & 0 deletions scripts/split_tox_gh_actions/split_tox_gh_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"cohere",
"langchain",
"openai",
"openai_agents",
"huggingface_hub",
],
"Cloud": [
Expand Down
Loading
Loading