class documentation
class SandboxClientProvider: (source)
Constructor: SandboxClientProvider(name, client)
A named sandbox client provider for Temporal workflows.
Warning
This class is experimental and may change in future versions. Use with caution in production environments.
Wraps a BaseSandboxClient with a unique name so that multiple sandbox backends can be registered on a single Temporal worker. Each provider gets its own set of Temporal activities whose names are prefixed with the provider name, allowing them to coexist on the same task queue.
On the worker side, pass one or more providers to the plugin:
plugin = OpenAIAgentsPlugin(
sandbox_clients=[
SandboxClientProvider("daytona", DaytonaSandboxClient()),
SandboxClientProvider("local", UnixLocalSandboxClient()),
],
)
On the workflow side, reference a provider by name via
temporalio.contrib.openai_agents.workflow.temporal_sandbox_client:
run_config = RunConfig(
sandbox=SandboxRunConfig(
client=temporal_sandbox_client("daytona"),
...
),
)
| Parameters | |
| name | A unique name for this sandbox backend (e.g. "daytona", "local"). Must match the name used on the workflow side. |
| client | The real BaseSandboxClient that performs sandbox lifecycle and I/O operations on the worker. |
| Method | __init__ |
Initialize the provider. |
| Property | name |
The provider name used as an activity-name prefix. |
| Method | _get |
Return all activity callables for registration with a Temporal Worker. |
| Async Method | _session |
Undocumented |
| Instance Variable | _client |
Undocumented |
| Instance Variable | _name |
Undocumented |
| Instance Variable | _sessions |
Undocumented |