Skip to content

OpenAI agents support #898

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

Merged
merged 58 commits into from
Jun 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
15ebc0d
Added openai_agents.
mfateev Jun 7, 2025
1d1faf6
added tools and trace interceptor.
mfateev Jun 7, 2025
a2b517a
Lint error fixes
mfateev Jun 7, 2025
435eccc
Lint error fixes
mfateev Jun 7, 2025
c1a4971
Missing docstrings added.
mfateev Jun 7, 2025
d9669f7
Fixed tool serialization.
mfateev Jun 9, 2025
fda3c34
Initial test implementation
tconley1428 Jun 11, 2025
d0d64df
Intercept test calls to LLM
tconley1428 Jun 12, 2025
8bdd78a
Move to optional dependency
tconley1428 Jun 12, 2025
8c034d1
Merge remote-tracking branch 'origin/main' into openai-agents-tests
tconley1428 Jun 12, 2025
c46b735
Linting
tconley1428 Jun 12, 2025
aff0765
Fixing build errors
tconley1428 Jun 12, 2025
7d364f5
Fixing build errors
tconley1428 Jun 12, 2025
e6bda63
Fixing typo
tconley1428 Jun 12, 2025
e576c60
Fake API key for test, skip below 3.11
tconley1428 Jun 12, 2025
d4d55b7
Tools test
tconley1428 Jun 12, 2025
6a9247a
Move activity to a method to allow model customization without monkey…
tconley1428 Jun 12, 2025
898fcf1
Change overrides to context manager
tconley1428 Jun 12, 2025
161e204
Research workflow test
tconley1428 Jun 12, 2025
bdb55f4
Customer service and agents as tools tests. These will currently fail…
tconley1428 Jun 13, 2025
97c15cd
Fix up some imports
tconley1428 Jun 13, 2025
8801769
Remove unneeded print
tconley1428 Jun 13, 2025
ee3ad1c
Doc string improvement
tconley1428 Jun 13, 2025
41d9e4f
Execute inside sandbox
tconley1428 Jun 13, 2025
4b3e448
3.9 lint error
tconley1428 Jun 13, 2025
3a18e77
Add activity configuration to openai overrides and activity_as_tool
tconley1428 Jun 16, 2025
13bafd8
Update docstrings
tconley1428 Jun 16, 2025
cfe02ac
Updating tests
tconley1428 Jun 16, 2025
e487bd5
Add experimental warnings
tconley1428 Jun 16, 2025
0fe69f9
Remove runtime warnings
tconley1428 Jun 16, 2025
710a342
Test required import for build error
tconley1428 Jun 16, 2025
f39ed67
Fix import
tconley1428 Jun 16, 2025
78bca44
Update open_ai_data_converter.py
tconley1428 Jun 16, 2025
c0b533e
Remove required import
tconley1428 Jun 16, 2025
0a7f34f
Simplify custom data converter
tconley1428 Jun 16, 2025
744f247
Replace rebuild
tconley1428 Jun 16, 2025
144f3ff
Add passthrough type namespaces to data converter
tconley1428 Jun 16, 2025
4d00c1a
Check activity count in customer_service test
tconley1428 Jun 16, 2025
4799713
cleanup dataconverter imports + doc build errors
jssmith Jun 16, 2025
191a3df
add documentation
jssmith Jun 17, 2025
f7acccc
Fix model rebuild
tconley1428 Jun 17, 2025
6de8044
update for OpenAI Agents SDK release 0.0.19
jssmith Jun 18, 2025
850ce0e
lint fixes
jssmith Jun 18, 2025
1f31bc8
fixed and elaborated on README
jssmith Jun 18, 2025
f69b2c5
Merge remote-tracking branch 'origin/main' into openai-agents-tests
jssmith Jun 18, 2025
a68d537
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
f8ca904
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
ab096c0
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
f9b58de
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
bfb25f3
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
23c139a
Update temporalio/contrib/openai_agents/README.md
jssmith Jun 18, 2025
71dd910
readme updates
jssmith Jun 18, 2025
5b5675e
Addressing PR feedback, mostly some new test validation
tconley1428 Jun 18, 2025
ca17de7
PR cleanup from feedback
tconley1428 Jun 18, 2025
6a84615
Remove change from irrelevant file
tconley1428 Jun 18, 2025
6eac121
PR cleanup
tconley1428 Jun 18, 2025
ef974b2
Add custom message for tool output failure
tconley1428 Jun 18, 2025
3f15a73
Remove commented code and unneeded sandbox statement
tconley1428 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
Prev Previous commit
Next Next commit
Linting
  • Loading branch information
tconley1428 committed Jun 12, 2025
commit c46b735b66adb6a4a3c5838ceeb486ab0a07622c
23 changes: 12 additions & 11 deletions tests/contrib/test_openai.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import uuid
from datetime import timedelta

from agents.models.multi_provider import MultiProvider
from openai import AsyncOpenAI
from openai.types.responses import ResponseOutputMessage, ResponseOutputText

from temporalio import workflow
from temporalio.client import Client
from temporalio.contrib.openai_agents.invoke_model_activity import invoke_model_activity
from temporalio.contrib.openai_agents.temporal_openai_agents import (
set_open_ai_agent_temporal_overrides,
)
from tests.helpers import new_worker
from agents import (
Agent,
AgentOutputSchemaBase,
Expand All @@ -26,6 +15,18 @@
TResponseInputItem,
Usage,
)
from agents.models.multi_provider import MultiProvider
from openai import AsyncOpenAI
from openai.types.responses import ResponseOutputMessage, ResponseOutputText

from temporalio import workflow
from temporalio.client import Client
from temporalio.contrib.openai_agents.invoke_model_activity import invoke_model_activity
from temporalio.contrib.openai_agents.temporal_openai_agents import (
set_open_ai_agent_temporal_overrides,
)
from tests.helpers import new_worker


class TestModel(OpenAIResponsesModel):
__test__ = False
Expand Down
Loading