Skip to content

Feat/OpenAI agents plugin sandbox support#1452

Merged
JasonSteving99 merged 8 commits intomainfrom
feat/openai-agents-plugin-sandbox-support
Apr 15, 2026
Merged

Feat/OpenAI agents plugin sandbox support#1452
JasonSteving99 merged 8 commits intomainfrom
feat/openai-agents-plugin-sandbox-support

Conversation

@JasonSteving99
Copy link
Copy Markdown
Contributor

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) to OpenAIAgentsPlugin(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

  1. Closes AI-46

  2. 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

  1. Any docs updates needed?

I updated the OpenAIAgentsPlugin README to now document this pre release SandboxAgent support.

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
@JasonSteving99 JasonSteving99 requested a review from a team as a code owner April 15, 2026 17:31
skip sandbox agent e2e test on windows for now, since UnixLocalSandboxClientOptions are invalid there

Also fix broken docs links

This comment was marked as off-topic.

@JasonSteving99 JasonSteving99 enabled auto-merge (squash) April 15, 2026 19:42
@JasonSteving99 JasonSteving99 merged commit 447472e into main Apr 15, 2026
103 of 115 checks passed
@JasonSteving99 JasonSteving99 deleted the feat/openai-agents-plugin-sandbox-support branch April 15, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants