Support running ADK agents outside Temporal workflows#1400
Open
tconley1428 wants to merge 10 commits intomainfrom
Open
Support running ADK agents outside Temporal workflows#1400tconley1428 wants to merge 10 commits intomainfrom
tconley1428 wants to merge 10 commits intomainfrom
Conversation
Add fallback paths in TemporalModel, activity_tool, and TemporalMcpToolSet that detect when code is running outside a workflow (via in_workflow()) and execute directly instead of scheduling activities. This enables local ADK development without a Temporal worker. Includes tests for all three paths plus the error case when no local MCP toolset is provided. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chris-olszewski
approved these changes
Mar 31, 2026
| name="test_agent", | ||
| model=TemporalModel("gemini-2.5-pro"), | ||
| tools=[ | ||
| TemporalMcpToolSet( |
Contributor
There was a problem hiding this comment.
Let's also add to this snippet: registering the MCP toolset in the plugin and then sharing a function. Don't want to encourage config duplication.
drewhoskins-temporal
approved these changes
Apr 2, 2026
xumaple
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
in_workflow()fallback paths inTemporalModel,activity_tool, andTemporalMcpToolSetso ADK agents can run directly outside a Temporal workflow (e.g., local dev withadk run)TemporalMcpToolSetaccepts a newlocal_toolsetparameter for direct MCP tool access outside workflowsMcpModeltest helper to extendTestModelfor reusability across testsTest plan
test_agent_outside_workflow— validates TemporalModel + activity_tool fallbacktest_mcp_agent_outside_workflow— validates TemporalMcpToolSet with local_toolset delegationtest_mcp_toolset_outside_workflow_no_local_toolset— validates ValueError when no local_toolset provided🤖 Generated with Claude Code