Skip to content

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.

From the Runta Python SDK repository or integration package source:

Terminal window
cd integrations/openai-agents-runta
uv sync --extra dev

Set credentials:

Terminal window
export OPENAI_API_KEY=sk-...
export RUNTA_ENDPOINT=https://api.runta.dev
export RUNTA_TOKEN=rt_...

The provider imports as agents_runta:

from agents_runta.sandbox import RuntaSandboxClient, RuntaSandboxClientOptions

Pass the Runta client and options into SandboxRunConfig. The Agents SDK creates the sandbox session for the run.

import asyncio
from agents import Runner
from agents.run import RunConfig
from agents.sandbox import Manifest, SandboxAgent, SandboxRunConfig
from 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.