OpenAI Agents SDK
openai-agents-runta lets an OpenAI Agents SDK SandboxAgent run inside a Runta runtime. Keep your agent, manifest, and runner flow the same; set Runta as the sandbox backend in SandboxRunConfig. Treat this provider as pre-release unless your workspace release channel says otherwise.
Install
Section titled “Install”From the Runta Python SDK repository or integration package source:
cd integrations/openai-agents-runtauv sync --extra devSet credentials:
export OPENAI_API_KEY=sk-...export RUNTA_ENDPOINT=https://api.runta.devexport RUNTA_TOKEN=rt_...The provider imports as agents_runta:
from agents_runta.sandbox import RuntaSandboxClient, RuntaSandboxClientOptionsRun an Agent
Section titled “Run an Agent”Pass the Runta client and options into SandboxRunConfig. The Agents SDK creates the sandbox session for the run.
import asyncio
from agents import Runnerfrom agents.run import RunConfigfrom agents.sandbox import Manifest, SandboxAgent, SandboxRunConfigfrom agents.sandbox.entries import File
from agents_runta.sandbox import RuntaSandboxClient, RuntaSandboxClientOptions
manifest = Manifest( root="/workspace", entries={ "input/request.md": File( content=b"Create /workspace/report.md and summarize this request." ), },)
agent = SandboxAgent( name="Runta Sandbox Builder", instructions="Use the sandbox filesystem and shell tools to complete the task.", default_manifest=manifest,)
async def main() -> None: result = await Runner.run( agent, "Read input/request.md, create report.md, and say what you changed.", run_config=RunConfig( sandbox=SandboxRunConfig( client=RuntaSandboxClient(), options=RuntaSandboxClientOptions( name_prefix="openai-agent-demo", root="/workspace", vcpus=2, memory_mib=2048, pause_on_exit=True, ), ) ), ) print(result.final_output)
asyncio.run(main())The agent receives the OpenAI Agents SDK sandbox filesystem and shell tools. Those tools execute against the Runta runtime workspace.