Skip to content

Commit 4e2f01e

Browse files
authored
Migrate to temporalio-openai-agents and add MCP v2 sample (#369)
* Migrate OpenAI Agents integration package * Fix OpenAI Agents import ordering * Add OpenAI Agents MCP v2 sample * Move MCP v2 sample to top-level directory * Simplify MCP v2 sample commands * Simplify MCP v2 README commands * Use concise uv commands in MCP v2 README * Trigger CLA check
1 parent 724f767 commit 4e2f01e

77 files changed

Lines changed: 1908 additions & 95 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openai_agents/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Each directory contains a complete example with its own README for detailed inst
3333
- **[Tools](./tools/README.md)** - Demonstrates available tools such as file search, image generation, and others.
3434
- **[Handoffs](./handoffs/README.md)** - Agents collaborating via handoffs.
3535
- **[Hosted MCP](./hosted_mcp/README.md)** - Using the MCP client functionality of the OpenAI Responses API.
36-
- **[MCP](./mcp/README.md)** - Local MCP servers (filesystem/stdio, streamable HTTP, SSE, prompt server) integrated with Temporal workflows.
36+
- **[MCP v2](./mcp_v2/README.md)** - MCP SDK v2 using named server factories and durable workflow proxies.
37+
- **[MCP](./mcp/README.md)** - Legacy MCP provider examples retained for compatibility.
3738
- **[Model Providers](./model_providers/README.md)** - Using custom LLM providers (e.g., Anthropic via LiteLLM).
3839
- **[Research Bot](./research_bot/README.md)** - Multi-agent research system with specialized roles: a planner agent, search agent, and writer agent working together to conduct comprehensive research.
3940
- **[Customer Service](./customer_service/README.md)** - Interactive customer service agent with escalation capabilities, demonstrating conversational workflows.

openai_agents/agent_patterns/run_agents_as_tools_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.agents_as_tools_workflow import (
77
AgentsAsToolsWorkflow,

openai_agents/agent_patterns/run_deterministic_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.deterministic_workflow import (
77
DeterministicWorkflow,

openai_agents/agent_patterns/run_forcing_tool_use_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.forcing_tool_use_workflow import (
77
ForcingToolUseWorkflow,

openai_agents/agent_patterns/run_input_guardrails_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.input_guardrails_workflow import (
77
InputGuardrailsWorkflow,

openai_agents/agent_patterns/run_llm_as_a_judge_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.llm_as_a_judge_workflow import (
77
LLMAsAJudgeWorkflow,

openai_agents/agent_patterns/run_output_guardrails_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.output_guardrails_workflow import (
77
OutputGuardrailsWorkflow,

openai_agents/agent_patterns/run_parallelization_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.parallelization_workflow import (
77
ParallelizationWorkflow,

openai_agents/agent_patterns/run_routing_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from temporalio.client import Client
4-
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
4+
from temporalio.openai_agents import OpenAIAgentsPlugin
55

66
from openai_agents.agent_patterns.workflows.routing_workflow import RoutingWorkflow
77

openai_agents/agent_patterns/run_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import timedelta
55

66
from temporalio.client import Client
7-
from temporalio.contrib.openai_agents import ModelActivityParameters, OpenAIAgentsPlugin
7+
from temporalio.openai_agents import ModelActivityParameters, OpenAIAgentsPlugin
88
from temporalio.worker import Worker
99

1010
from openai_agents.agent_patterns.workflows.agents_as_tools_workflow import (

0 commit comments

Comments
 (0)