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.
|
|
||
| @pytest_asyncio.fixture(scope="session") | ||
| async def env(request) -> AsyncGenerator[WorkflowEnvironment, None]: | ||
| # LiteLLM's asyncio logging filter runs on workflow threads even in tests |
There was a problem hiding this comment.
Should litellm_activity/worker.py pass litellm through too? Its Worker imports litellm, and a probe workflow with the same imports fails its task with RestrictedWorkflowAccessError once it logs on asyncio. Since this plugin passes litellm through for every test, tests/litellm_activity won't catch that.
| "strands-agents>=1.39.0", | ||
| "strands-agents-tools>=0.5.2", | ||
| "mcp>=1.0.0", | ||
| "mcp>=2", |
There was a problem hiding this comment.
With the root lock now on mcp 2.3.0, is the comment on the microsoft-agent-framework group still right? It says other groups pin MCP v1, and both microsoft_agent_framework_plugin READMEs give the same reason for the separate mcp project.
| --deployment-name <TEMPORAL_DEPLOYMENT_NAME> | ||
| ``` | ||
|
|
||
| Use a new Build ID for changes that cannot replay existing histories. Keep the previous Worker Deployment Version |
There was a problem hiding this comment.
How would someone keep 1.0.0 available with this setup? The sample has one runtime with one temporal endpoint, and step 3 says to re-run create-runtime.sh to roll out changes. Could this say what to deploy for the new Build ID?
| def book_trip(city: str) -> str: | ||
| """Book a trip to a city (requires human approval).""" | ||
| return f"Booked a trip to {city}." | ||
|
|
||
|
|
||
| trip_tool = tool_as_activity(book_trip, start_to_close_timeout=timedelta(seconds=30)) |
There was a problem hiding this comment.
Could this get a SNIPSTART block like react_agent/tools.py? With the docs follow-up, the HITL page imports trip_tool but never shows book_trip or its wrapper, and interrupt_on names book_trip.
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.