Repository navigation
Conversation
Bump temporalio-openai-agents to 2.0.0, temporalio-google-adk, temporalio-google-genai, temporalio-langgraph, temporalio-langsmith and temporalio-strands-agents to 1.0.0, and temporalio-deepagents to 0.1.0. The strands-agents group now installs the mcp extra and MCP SDK 2. temporalio-openai-agents 2.0.0 needs openai 3. Every litellm release that accepts openai 3 needs boto3 1.43 or later, and aioboto3 15.5 needs boto3 older than 1.40.62. So the external-storage group can't share an environment with the litellm and openai-agents groups anymore. Declare that conflict, leave external-storage out of `poe test` and `poe lint`, and run its test in its own `poe test-external-storage` step in CI. openai 3 uses httpx2, so the OpenRouter group now needs openai 3 and its activity test mocks with httpx2. Newer google-adk also records token counters, which the metrics test now counts too.
MCP SDK 2 renames FastMCP to MCPServer and drops mcp.server.fastmcp. The shared environment now has MCP SDK 2, which the Strands MCP tools need.
temporalio-openai-agents 2.0.0's SandboxClientProvider refuses the Docker and Unix-local backends and raises ValueError at startup. OnHostSandboxClientProvider sends every operation on a sandbox to the Worker that created it. A restart in the middle of a step loses a local sandbox, so the README and docstring no longer say it resumes.
Sync function tools work in Workflows in 2.0.0: they run inline, so they must be fast and deterministic. Model Activities also get a 60-second start-to-close timeout by default, so a custom provider no longer has to set one.
In temporalio-strands-agents 1.0.0, mcp_clients factories return an mcp.Client, and a Strands MCPClient fails the Activity without retries. Tools are listed in an Activity before each model call, not once at Worker startup, so the docs in the sample say that now.
temporalio-deepagents 0.1.0's activity_as_tool takes activity_options instead of start_to_close_timeout, so the react agent sample raised TypeError. Also call tool_as_activity in a tools module imported under imports_passed_through(): called inside run, the tool is registered only once a run gets there, and a fresh Worker fails the tool Activity with DeepAgentsUnknownTool.
run_deep_agent continues as new only while the turn has pending todos, and create_deep_agent doesn't add the middleware that records them. Without it, the sample returned after every turn. The snapshot carries messages and state files, not a result cache, so the docs say that.
A Worker runs its Client's plugins, so passing the plugin to both registered its Activities twice and Worker(...) raised "ValueError: More than one activity named invoke_model".
DABH
left a comment
There was a problem hiding this comment.
Thanks for doing this! The bumps and the fixes for the breaking changes look right to me, and the claims I checked against the GA packages hold up. I left questions inline, mostly on runtime and docs paths that CI doesn't exercise. Outside the diff, seven READMEs still say these packages need Temporal 1.34.0, but the GA releases need 1.36.0.
| google-genai = ["temporalio-google-genai[mcp]>=0.1.0"] | ||
| google-genai = ["temporalio-google-genai[mcp]>=1.0.0"] | ||
| langfuse-tracing = [ | ||
| "openai>=1.4.0", |
There was a problem hiding this comment.
Should this group add httpx? With openai 3, httpx drops out of a uv sync --group langfuse-tracing env, and opentelemetry-instrumentation-openai-v2 imports it without declaring it, so LLM_INSTRUMENTATION=openai-v2 fails at startup with No module named 'httpx'.
There was a problem hiding this comment.
Added httpx to langfuse-tracing and updated the lock. Both openinference and openai-v2 now start in a clean environment containing only that dependency group.
| openai-agents = [ | ||
| "openai-agents[litellm] >= 0.14.1", | ||
| "temporalio-openai-agents >= 1.0.0", | ||
| "temporalio-openai-agents >= 2.0.0", |
There was a problem hiding this comment.
With 2.0.0, does set_tracing_disabled(True) in the model_providers workers still do anything? The plugin installs a new trace provider when the Worker starts, so with OPENAI_API_KEY set those workers send spans to OpenAI, including prompts and completions. Would OPENAI_AGENTS_DISABLE_TRACING=1 work instead?
There was a problem hiding this comment.
Replaced the call with OPENAI_AGENTS_DISABLE_TRACING=1 in all four model-provider Workers. With a dummy OPENAI_API_KEY set, a fresh GA trace provider created after each entry point returns NoOpTrace.
| OnHostSandboxClientProvider( | ||
| SANDBOX_PROVIDER, UnixLocalSandboxClient() | ||
| ), |
There was a problem hiding this comment.
Should this set worker_name, or should the comment say to run one worker per machine? It defaults to the hostname, so two run_worker.py processes on one machine share the local@<host> queue, and an operation picked up by the wrong one fails the run with SandboxLost.
There was a problem hiding this comment.
Each Worker process now passes a fresh UUID as worker_name. A routing check with two Workers on the same host confirmed that sandbox operations stay with the owner.
| `SandboxClientProvider`. A worker restart in the middle of a step loses a | ||
| local sandbox, and the run fails with the non-retryable `SandboxLost`. |
There was a problem hiding this comment.
Is this still true when the replacement worker has a different hostname? The next operation goes to the old local@<host> queue, and with no schedule_to_start_timeout the run waits there instead of failing. Should the sample pass one to temporal_sandbox_client()?
There was a problem hiding this comment.
Added a 30-second schedule_to_start_timeout, keeping the five-minute start_to_close_timeout. The README and docstring now distinguish a missing owner from a missing sandbox; a lost-owner check with a shorter timeout produced SCHEDULE_TO_START rather than hanging.
| dependencies = [ | ||
| "temporalio>=1.36.0,<2", | ||
| "temporalio-strands-agents>=0.1.0", | ||
| "temporalio-strands-agents>=1.0.0", |
There was a problem hiding this comment.
Should BUILD_ID in workflows.py and TEMPORAL_BUILD_ID in agentcore.json change with this? 1.0.0 schedules strands_get_model_config before the first model call, so a pinned run started on the old code hits a nondeterminism error if the new code deploys under the same build ID.
There was a problem hiding this comment.
Changed both Build IDs to 1.1.0. The README also says to keep the previous Worker Deployment Version available for its pinned Workflows. The standalone sample’s lint and test tasks pass.
| activity_options=ActivityConfig(start_to_close_timeout=timedelta(seconds=30)), | ||
| ) | ||
| # A LangChain tool whose body does I/O, moved into an activity. | ||
| search_tool = tool_as_activity(web_search, start_to_close_timeout=timedelta(seconds=30)) |
There was a problem hiding this comment.
Worth a line saying plugin-wide DeepAgentsPlugin(tool_activity_options=...) won't reach tools wrapped at import? run_worker.py imports this module before it builds the plugin, so only the options passed here apply. Same for human_in_the_loop/tools.py.
There was a problem hiding this comment.
Added a sentence to both tools modules explaining that options are captured when the tool is wrapped, before the sample creates the plugin. The wrapper timeouts stay explicit.
| # A GC finalizer that imports during sandbox validation can hit Python 3.11's | ||
| # import-lock bug (python/cpython#91351). Pause cyclic GC only for this | ||
| # synchronous constructor, then restore its previous state. | ||
| gc_enabled = gc.isenabled() | ||
| gc.disable() |
There was a problem hiding this comment.
Would client.connection_pool.reset() after aclose() in the fixture fix this at the source? The finalizer that imports is redis-py's ConnectionPool.__del__, and it can run during any test's Worker(...), not just the ones built here.
There was a problem hiding this comment.
That fixes it. The fixture now resets the pool after closing the client, and the GC pause is gone. The full test task completed on Python 3.11.9 with 249 passed and 3 skipped; the final focused Redis and entry-point run also passed all 68 tests without sandbox access errors.
| lint-types = "uv run --all-groups --no-group cloud-export-to-parquet --no-group external-storage scripts/run_root_tool.py mypy --check-untyped-defs --namespace-packages ." | ||
| test = "uv run --all-groups --no-group cloud-export-to-parquet --no-group external-storage pytest --ignore=tests/deepagents_plugin/external_storage_test.py" |
There was a problem hiding this comment.
Could lint get a mypy pass with the external-storage group too? With ignore_missing_imports, dropping the group here turns the aioboto3, moto and S3 client types into Any. And since poe test now skips that test file without saying so, should the README mention poe test-external-storage?
There was a problem hiding this comment.
poe lint now includes a mypy pass in the external-storage environment, and the README lists both test commands. Both type checks pass: 961 files in the main environment and 14 in the external-storage environment.
| # aioboto3 15.5 needs boto3 older than 1.40.62. temporalio-openai-agents 2 needs | ||
| # openai 3, and every litellm release that accepts openai 3 needs boto3 1.43 or | ||
| # later, so external-storage can't share an environment with these groups. |
There was a problem hiding this comment.
The group pins aioboto3>=15.1.0,<15.2 and the lock has 15.1.0, so is 15.5 meant as "even the newest aioboto3"? Saying so would keep someone from raising the cap to fix the conflict.
There was a problem hiding this comment.
Yes. The comment now states the group’s <15.2 pin first, then makes clear that 15.5 is the comparison showing that lifting the cap alone does not resolve the conflict. The cap is unchanged.
| client, | ||
| task_queue="google-adk-agents-basic", | ||
| workflows=[HelloWorldAgentWorkflow], | ||
| plugins=[plugin], | ||
| ) |
There was a problem hiding this comment.
Will the docs follow-up fix the prose next to this snippet? google-adk.mdx still says to pass the same plugin to both the Client and the Worker, which raises More than one activity named invoke_model. The MCPClient text in strands-agents.mdx and the SandboxClientProvider text in openai-agents.mdx have the same problem.
There was a problem hiding this comment.
The docs follow-up fixes all three prose paths and refreshes the related snippets, including the Deep Agents changes. It stays draft until this PR merges. I also updated all seven sample README prerequisites to Temporal Python SDK 1.36.0 or later.
What was changed
Moves the AI integration samples to the GA packages released on November 17 and 18:
temporalio-openai-agentstemporalio-google-adktemporalio-google-genaitemporalio-langgraphtemporalio-langsmithtemporalio-strands-agentsbedrock_agentcore/strands_agent)temporalio-deepagentsThe bump alone breaks some samples, so this also fixes them:
OnHostSandboxClientProviderand a unique name per Worker process. On 2.0.0,SandboxClientProviderraisesValueErrorat startup for local backends. A 30-second schedule-to-start timeout bounds the wait for a lost Worker; a Worker that receives an operation for a missing sandbox raisesSandboxLost.OPENAI_AGENTS_DISABLE_TRACING=1in all four Workers, including the provider installed by the plugin. The LiteLLM Worker passes LiteLLM through the Workflow sandbox. Also drops "tools must be async". On 2.0.0, function tools run inline in the Workflow, sync or async. Model calls default to a 60-second timeout, so the custom-provider comment says to raise it for slow models instead of saying you must set one.Worker(...)raisesMore than one activity named invoke_model.mcp.Client, and the group installstemporalio-strands-agents[mcp]andmcp>=2. The AgentCore sample uses a new deployment Build ID for the incompatible plugin change.activity_as_tooltakesactivity_options, andtool_as_activityruns at module level in atools.pyimported underimports_passed_through(), including the external-storage sample. Called insiderun, a fresh Worker fails the tool Activity. The continue-as-new sample addsTodoListMiddleware, because without it the run never continues as new.The resolver moved some upstream packages too, and a few of those needed changes:
mcpextra) removedmcp.server.fastmcp, so the five echo, tools and prompt servers now useMCPServerfrommcp.server.mcpserver.temporalio-openai-agents2.0.0) uses httpx2, so theopenroutergroup moves toopenai>=3,<4and its test mockshttpx2.httpx, which its OpenTelemetry instrumentor imports.external-storagecan't share an environment withopenai-agentsorlitellmanymore. openai 3 needs a litellm that needs boto3 1.43 or later, and aioboto3 15.5.0 pinsaiobotocore==2.25.1, which needs a boto3 older than 1.40.62. Sopyproject.tomldeclares a uvconflictsentry,poe testandpoe lint-typesskip that group, a newpoe test-external-storagestep runs its test in CI, and a separate mypy pass checks that environment.uv sync --group external-storage, as its README says, still works.Why?
docs.temporal.io copies its integration snippets from these samples, and every integration page sends readers here. Today they run code from before the breaking changes, and a few snippets raise at startup on the new versions.
Checklist
Closes: no issue.
How was this tested:
poe test: 250 passed, 2 skipped.poe test-external-storage: 2 passed.poe lint: ruff passes, and mypy finds no issues in 961 files, plus 14 in the external-storage environment.bedrock_agentcore/strands_agent:poe lintandpoe testpass (1 test), and its Worker starts.temporal server start-dev, each of these Workers started and ran for 12 seconds without raising: the sandbox Worker, the Strands MCP Worker, all 6 ADK Workers and the 3 Deep Agents Workers. On main, the ADK basic Worker and the sandbox Worker raise the two errors above.continue_as_new_after=1: without the middleware, the first run endsCOMPLETED; with it,CONTINUED_AS_NEW.RestrictedWorkflowAccessErrorentries.Any docs updates needed? Yes. temporalio/documentation#5813 updates the adjacent prose and refreshes the ADK, local sandbox, Strands MCP, and Deep Agents snippets. It stays draft until this PR merges. The seven sample README prerequisites now say Temporal Python SDK 1.36.0 or later.
Not changed here:
openai_agents/mcp_v2(still ontemporalio-openai-agents1.0.0) andarize_tracing(on 1.1.0) have their own locks. The comments saying other groups still pin MCP v1 are now out of date.