Skip to content

docs(integrations): add OpenAI Agents SDK guide - #1386

Open
ZedingZhang wants to merge 1 commit into
TencentCloud:masterfrom
ZedingZhang:docs/openai-agents-sdk-integration
Open

docs(integrations): add OpenAI Agents SDK guide#1386
ZedingZhang wants to merge 1 commit into
TencentCloud:masterfrom
ZedingZhang:docs/openai-agents-sdk-integration

Conversation

@ZedingZhang

Copy link
Copy Markdown

Summary

  • add bilingual OpenAI Agents SDK integration guides
  • document how to use CubeSandbox through the SDK's built-in E2B sandbox client
  • show the near-zero-refactor migration from E2B Cloud to CubeSandbox
  • link the existing Shell Agent, pause/resume, SWE-bench, and Code Interpreter demos
  • document template readiness, API key, data-plane DNS, timeout, network, and storage considerations

Validation

  • npm run docs:build
  • git diff --check
  • validated the Python integration snippets with compile(...)
  • verified bilingual frontmatter, code-block, and link parity
  • did not rerun the demos against a live CubeSandbox cluster because no cluster credentials or template were available

Related to #244

Autonomously-by: Codex:GPT-5

Related to TencentCloud#244

Autonomously-by: Codex:GPT-5
Signed-off-by: ZedingZhang <me@zedingzhang.com>
@ZedingZhang
ZedingZhang requested a review from fslongjin as a code owner August 19, 2026 06:21
E2BSandboxClientOptions,
E2BSandboxType,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: this snippet is presented as "replace only its sandbox connection settings," but it isn't self-contained — agent is undefined (fine, it's your existing SandboxAgent), and more importantly the envd compatibility patches that both example scripts apply (root username + stdin removal, see simple_demo.py lines 38–82) are required for the filesystem/command calls to actually work against CubeSandbox's envd. A reader copying this snippet verbatim into an existing E2B-backed agent would hit runtime errors. The Caveats section and the following sentence both point this out, so this is non-blocking — consider adding a one-line "requires the envd compat block from simple_demo.py" note right here for readers who stop at the snippet.

@cubesandboxbot

Copy link
Copy Markdown

Review: docs(integrations) add OpenAI Agents SDK guide (#1386)

Overall: approve — no blocking issues. This is a bilingual, documentation-only PR that adds an OpenAI Agents SDK integration guide (docs/guide/integrations/openai-agents-sdk.md + docs/zh/guide/integrations/openai-agents-sdk.md) and registers both on the EN/zh index pages. I verified every factual claim and link in the docs against the base branch.

This review was generated by an AI reviewer and has not been approved by a human.

What I verified

  • All internal links resolve. /guide/quickstart, /guide/connect-existing-cluster, /guide/network-policy, /guide/security-proxy, /guide/persistent-storage (and their /zh/... equivalents) all exist. The EN↔ZH cross-links (../../zh/guide/... and ../../../guide/...) resolve correctly from each file's directory.
  • All external repo links resolve on master. examples/openai-agents-example/{simple_demo.py, main.py, README.md, openai-agents-sandbox-cube-integration.md} and the _zh.md variant all exist in the base tree, as does examples/openai-agents-code-interpreter/.
  • Documented commands match the real code. python main.py --sandbox-only --timeout 60, python simple_demo.py --pause-resume, and python simple_demo.py --question "…" all map to actual argparse flags in the checked-in scripts.
  • .env variables are accurate. E2B_API_URL, E2B_API_KEY, CUBE_TEMPLATE_ID, TOKENHUB_API_KEY, OPENAI_API_KEY/OPENAI_BASE_URL, CUBE_SSL_CERT_FILE all exist in examples/openai-agents-example/.env.example; requirements.txt ships openai-agents[e2b].
  • CLI commands are real. cubemastercli tpl create-from-image … (with --writable-layer-size 1G --expose-port 49983 --cpu 4000 --memory 8192 --probe 49983) and cubemastercli tpl watch --job-id <job_id> match the example README and the canonical template-from-image tutorial.
  • Caveats are accurate. The root-user envd patch and stdin removal match the compatibility blocks in simple_demo.py/main.py; the 49983 (envd) and 49999 (Jupyter code-interpreter gateway) port claims match examples/openai-agents-code-interpreter/README.md.
  • E2B_API_KEY guidance (e2b_000000 when auth is disabled, real key otherwise) matches docs/guide/connect-existing-cluster.md and docs/guide/authentication.md; the CoreDNS claim matches the connect-existing-cluster docs.
  • Bilingual parity is complete. Frontmatter keys, section structure, code blocks, tables, and caveats are aligned between the EN and zh files; both index pages get a matching row. The docs:build CI path (npm run docs:build) should pass — no dead links or malformed admonitions.

Minor, non-blocking observation

  • The "Integration Snippet" is not self-contained as written. The headline says "replace only its sandbox connection settings," but the snippet references an undefined agent and omits the envd compatibility patches (root user + stdin removal) that both example scripts require to actually run against CubeSandbox's envd. The docs do point to simple_demo.py and cover this in Caveats, so it's handled — but a reader copying the snippet verbatim into an existing SandboxAgent would hit runtime errors. A one-line note next to the snippet ("this requires the envd compat block from simple_demo.py") would close the gap.

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