Support for using the OpenAI Agents SDK as part of Temporal workflows.
This module provides compatibility between the OpenAI Agents SDK and Temporal workflows.
| Package | sandbox |
Sandbox support for Temporal OpenAI Agents plugin. |
| Module | testing |
Testing utilities for OpenAI agents. |
| Module | workflow |
Workflow-specific primitives for working with the OpenAI Agents SDK in a workflow context |
| Module | _errors |
Error types for the OpenAI Agents SDK Temporal integration. |
| Module | _heartbeat |
No module docstring; 0/1 type variable, 1/2 function documented |
| Module | _invoke |
A temporal activity that invokes a LLM model. |
| Module | _mcp |
Undocumented |
| Module | _model |
Parameters for configuring Temporal activity execution for model calls. |
| Module | _openai |
No module docstring; 3/5 functions, 1/1 class documented |
| Module | _otel |
OTEL-aware variant of OpenAI Agents trace interceptor. |
| Module | _temporal |
No module docstring; 1/1 class documented |
| Module | _temporal |
Initialize Temporal OpenAI Agents overrides. |
| Module | _temporal |
Provides support for integration with OpenAI Agents SDK tracing across workflows |
| Module | _temporal |
Worker-environment secrets: the reference form, and the allowlist both forms share. |
| Module | _trace |
Adds OpenAI Agents traces and spans to Temporal workflows and activities. |
From __init__.py:
| Class | |
Make every environment variable on the worker resolvable. |
| Class | |
Parameters for configuring Temporal activity execution for model calls. |
| Class | |
Temporal plugin for integrating OpenAI agents with Temporal workflows. |
| Class | |
PayloadConverter for OpenAI agents. |
| Class | |
A named sandbox client provider for Temporal workflows. |
| Class | |
A stateful MCP server implementation for Temporal workflows. |
| Class | |
A stateless MCP server implementation for Temporal workflows. |
| Class | |
A sandbox environment variable whose value is read on the Temporal Worker. |
| Exception | |
Error that terminates the calling workflow or update. |
| Function | temporal |
Refer to a secret held in the Temporal Worker's environment. |
Refer to a secret held in the Temporal Worker's environment.
Warning
This function is experimental and may change in future versions. Use with caution in production environments.
Use it for a hosted tool credential that should come from the worker's environment rather than being written into your workflow. Put the returned reference in a HostedMCPTool's authorization or header value, or in the value of a domain_secrets entry under a ShellTool or CodeInterpreterTool. The reference carries only the variable's name, never its value.
Every worker that runs model activities must set the variable and name it in OpenAIAgentsPlugin(resolvable_worker_env_vars=[...]). A name the worker allows but has not set resolves to an empty value.
| Parameters | |
name:str | Name of the environment variable to read on the worker. |
| Returns | |
str | A reference string to use in place of the secret. |