Skip to content

feat(sandbox): add Tensorlake sandbox backend#3484

Closed
cooleel wants to merge 1 commit into
openai:mainfrom
tensorlakeai:sw/add_tensorlake_sandbox
Closed

feat(sandbox): add Tensorlake sandbox backend#3484
cooleel wants to merge 1 commit into
openai:mainfrom
tensorlakeai:sw/add_tensorlake_sandbox

Conversation

@cooleel

@cooleel cooleel commented May 21, 2026

Copy link
Copy Markdown

Summary

Adds a Tensorlake-backed sandbox provider underagents.extensions.sandbox.tensorlake, following the existing extension pattern used by the other cloud backends. The tensorlake SDK is imported lazily so users without the extra can still import the package.

Highlights

  • Installable via uv sync --extra tensorlake (or pip install "openai-agents[tensorlake]").
  • pause_on_exit for suspend/resume of named sandboxes.
  • Two workspace persistence modes: "tar"and "snapshot".
  • Additive change — no existing public APIs are affected.

Includes a docs reference page, a manual runner example at examples/sandbox/extensions/tensorlake_runner.py, and a unit test suite.

Demo

import asyncio
import sys
from pathlib import Path

from agents import ModelSettings, Runner
from agents.extensions.sandbox import (
  DEFAULT_TENSORLAKE_WORKSPACE_ROOT,
  TensorlakeSandboxClient,
  TensorlakeSandboxClientOptions,
)
from agents.run import RunConfig
from agents.sandbox import Manifest, SandboxAgent, SandboxRunConfig
from agents.sandbox.entries import File

if __package__ is None or __package__ == "":
  sys.path.insert(0, str(Path(__file__).resolve().parents[3]))

from examples.sandbox.misc.workspace_shell import WorkspaceShellCapability 


async def main() -> None:
  manifest = Manifest(
      root=DEFAULT_TENSORLAKE_WORKSPACE_ROOT,
      entries={
          "README.md": File(content=b"# Tensorlake demo workspace\n"),
          "todo.md": File(content=b"1. Inspect files.\n2. Summarize.\n"),
      },
  )

  agent = SandboxAgent(
      name="Tensorlake Demo",
      model="gpt-5.5",
      instructions="Inspect the workspace and summarize it in two sentences.",
      default_manifest=manifest,
      capabilities=[WorkspaceShellCapability()],
      model_settings=ModelSettings(tool_choice="required"),
  )

  run_config = RunConfig(
      sandbox=SandboxRunConfig(
          client=TensorlakeSandboxClient(),
          options=TensorlakeSandboxClientOptions(
              workspace_persistence="snapshot",
              timeout_secs=300,
          ),
      ),
      workflow_name="Tensorlake demo",
  )

  result = await Runner.run(agent, "Summarize the workspace.", run_config=run_config)
  print(result.final_output)


if __name__ == "__main__":
  asyncio.run(main())

Run it with OPENAI_API_KEY and TENSORLAKE_API_KEY exported.

Test plan

  • make lint, make format, make typecheck, make tests pass locally.
  • Manual validation via examples/sandbox/extensions/tensorlake_runner.py
    against a live Tensorlake account.

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 666a4c75b2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py
Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd014dcd95

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebae66da71

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfcd5d7eb0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated
Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py
@cooleel
cooleel force-pushed the sw/add_tensorlake_sandbox branch from dfcd5d7 to c2df6ef Compare May 22, 2026 05:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2df6efe67

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated
@cooleel
cooleel force-pushed the sw/add_tensorlake_sandbox branch from c2df6ef to e0268e0 Compare May 23, 2026 04:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0268e014f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eca12a4901

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 646c6d90db

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df1f57a803

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated
Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 900690a487

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py
@cooleel
cooleel force-pushed the sw/add_tensorlake_sandbox branch from 900690a to d8aa1bd Compare June 2, 2026 20:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8aa1bdae9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agents/extensions/sandbox/tensorlake/sandbox.py
@seratch

seratch commented Jul 16, 2026

Copy link
Copy Markdown
Member

Thanks for putting this together, and for the substantial work that went into the implementation.

At this time, we're not actively adding new third-party sandbox provider implementations directly to the SDK. We would prefer provider-specific integrations like this one to live in a separate package maintained by the provider team, so they can evolve and be released alongside the underlying service.

Given this direction, we're going to close this PR. Thanks again for the contribution and for your understanding.

@seratch seratch closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants