Feat/OpenAI agents plugin sandbox support#1452
Merged
JasonSteving99 merged 8 commits intomainfrom Apr 15, 2026
Merged
Conversation
Enable workflows to use the OpenAI Agents SDK's SandboxAgent by routing all sandbox lifecycle and I/O operations through Temporal activities. The user passes a real sandbox client (e.g. DaytonaSandboxClient) to OpenAIAgentsPlugin(sandbox_client=...) and the plugin handles the rest — no direct imports from the sandbox subpackage are needed. Key changes: Add sandbox/ subpackage with internal modules for: - TemporalSandboxClient: workflow-side client that dispatches create/resume/delete as activities - TemporalSandboxSession: workflow-side session that routes exec, read, write, and other I/O through activities - TemporalSandboxActivities: worker-side activity implementations that delegate to the real BaseSandboxClient/BaseSandboxSession - Pydantic activity arg/result models for serialization Update TemporalOpenAIRunner to detect SandboxAgent in the agent graph and automatically inject TemporalSandboxClient when run_config.sandbox is configured Update OpenAIAgentsPlugin to accept sandbox_client and register sandbox activities on the worker Add tests covering: - SandboxAgent detection in agent graphs (direct, handoff, circular) - Validation errors (missing config, wrong client type) - Activity delegation (each activity correctly calls the real client/session) - Session caching and eviction in TemporalSandboxActivities - End-to-end integration test running sandbox activities through a real Temporal workflow
…atibility with older Python versions
skip sandbox agent e2e test on windows for now, since UnixLocalSandboxClientOptions are invalid there Also fix broken docs links
…ng test on Windows.
tconley1428
approved these changes
Apr 15, 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.
What was changed
Enable workflows to use the OpenAI Agents SDK's SandboxAgent by routing all sandbox lifecycle and I/O operations through Temporal activities. The user passes a real sandbox client (e.g.
DaytonaSandboxClient) toOpenAIAgentsPlugin(sandbox_clients=...)and the plugin handles the rest — no direct imports from the sandbox subpackage are needed.Key changes:
Add sandbox/ subpackage with internal modules for:
TemporalSandboxClient: workflow-side client that dispatches create/resume/delete as activities
TemporalSandboxSession: workflow-side session that routes exec, read, write, and other I/O through activities
TemporalSandboxActivities: worker-side activity implementations that delegate to the real BaseSandboxClient/BaseSandboxSession
Pydantic activity arg/result models for serialization
Update TemporalOpenAIRunner to detect SandboxAgent in the agent graph and automatically inject TemporalSandboxClient when run_config.sandbox is configured
Update OpenAIAgentsPlugin to accept sandbox_clients and register sandbox activities on the worker
Why?
We partnered with OpenAI to ensure that Temporal developers could build durable sandbox agents on day 1.
See their launch blog post: https://openai.com/index/the-next-evolution-of-the-agents-sdk/
Checklist
Closes AI-46
How was this tested:
Add tests covering:
SandboxAgent detection in agent graphs (direct, handoff, circular)
Validation errors (missing config, wrong client type)
Activity delegation (each activity correctly calls the real client/session)
Session caching and eviction in TemporalSandboxActivities
End-to-end integration test running sandbox activities through a real Temporal workflow
I updated the
OpenAIAgentsPluginREADME to now document this pre releaseSandboxAgentsupport.