Skip to content

Commit 3cdf46d

Browse files
committed
wip
1 parent 3a29a7a commit 3cdf46d

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

openai_agents/mcp/run_file_system_stateful_worker.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
OpenAIAgentsPlugin,
1212
StatefulMCPServer,
1313
)
14+
import logging
1415
from temporalio.worker import Worker
1516

1617
from openai_agents.mcp.workflows.file_system_stateful_workflow import FileSystemWorkflow
1718

1819

1920
async def main():
21+
22+
logging.basicConfig(level=logging.DEBUG)
23+
2024
current_dir = os.path.dirname(os.path.abspath(__file__))
2125
samples_dir = os.path.join(current_dir, "sample_files")
2226

@@ -53,6 +57,7 @@ async def main():
5357
# No custom activities needed for these workflows
5458
],
5559
)
60+
logging.debug("STARTED WORKER")
5661
await worker.run()
5762

5863

openai_agents/mcp/run_file_system_stateful_workflow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from openai_agents.mcp.workflows.file_system_stateful_workflow import FileSystemWorkflow
88

9+
import uuid
910

1011
async def main():
1112
# Create client connected to server at the given address
@@ -19,7 +20,7 @@ async def main():
1920
# Execute a workflow
2021
result = await client.execute_workflow(
2122
FileSystemWorkflow.run,
22-
id="file-system-workflow",
23+
id=f"file-system-workflow-{uuid.uuid4()}",
2324
task_queue="openai-agents-mcp-stateful-task-queue",
2425
)
2526

openai_agents/mcp/workflows/file_system_stateful_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FileSystemWorkflow:
1313
async def run(self) -> str:
1414
async with temporal_openai_agents.workflow.stateful_mcp_server(
1515
"FileSystemServer",
16-
workflow.ActivityConfig(start_to_close_timeout=timedelta(seconds=60)),
16+
#workflow.ActivityConfig(start_to_close_timeout=timedelta(seconds=120)),
1717
) as server:
1818
with trace(workflow_name="MCP File System Example"):
1919
agent = Agent(

0 commit comments

Comments
 (0)