From 0929093c31c08a3ad571e6b411ddaf0702c0108d Mon Sep 17 00:00:00 2001 From: ShawnSiao Date: Mon, 27 Jul 2026 21:07:53 +0800 Subject: [PATCH 1/2] docs: document Vercel S3 mounts --- docs/sandbox/clients.md | 46 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/docs/sandbox/clients.md b/docs/sandbox/clients.md index bd21da63d3..6117d4bc7c 100644 --- a/docs/sandbox/clients.md +++ b/docs/sandbox/clients.md @@ -113,7 +113,7 @@ Hosted sandbox clients expose provider-specific mount strategies. Choose the bac | `DaytonaSandboxClient` | Supports rclone-backed cloud storage mounts with `DaytonaCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | | `E2BSandboxClient` | Supports rclone-backed cloud storage mounts with `E2BCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | | `RunloopSandboxClient` | Supports rclone-backed cloud storage mounts with `RunloopCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | -| `VercelSandboxClient` | No hosted-specific mount strategy is currently exposed. Use manifest files, repos, or other workspace inputs instead. | +| `VercelSandboxClient` | Supports create-time S3 mounts with `VercelCloudBucketMountStrategy` on `S3Mount`. Mounts must be ephemeral; sessions containing them cannot be resumed. | @@ -130,8 +130,50 @@ The table below summarizes which remote storage entries each backend can mount d | `DaytonaSandboxClient` | ✓ | ✓ | ✓ | ✓ | ✓ | - | | `E2BSandboxClient` | ✓ | ✓ | ✓ | ✓ | ✓ | - | | `RunloopSandboxClient` | ✓ | ✓ | ✓ | ✓ | ✓ | - | -| `VercelSandboxClient` | - | - | - | - | - | - | +| `VercelSandboxClient` | ✓ | - | - | - | - | - | +### Vercel S3 mounts + +Vercel supports `S3Mount` through `VercelCloudBucketMountStrategy`. Declare the mount in the manifest passed to `VercelSandboxClient.create`; the mount topology is fixed at sandbox creation time. + +```python +import os + +from agents.extensions.sandbox.vercel import ( + VercelCloudBucketMountStrategy, + VercelSandboxClient, + VercelSandboxClientOptions, +) +from agents.sandbox import Manifest +from agents.sandbox.entries import S3Mount + +manifest = Manifest( + root="/workspace", + entries={ + "data": S3Mount( + bucket="my-data-bucket", + region="us-east-1", + access_key_id=os.environ["AWS_ACCESS_KEY_ID"], + secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"], + mount_strategy=VercelCloudBucketMountStrategy(), + ) + }, +) + +session = await VercelSandboxClient().create( + manifest=manifest, + options=VercelSandboxClientOptions(allow_s3_credential_exposure=True), +) +``` + +Important constraints: + +- The strategy supports only `S3Mount`; R2, GCS, Azure Blob, Box, and S3 Files entries are not supported by the Vercel backend. +- Vercel S3 mounts must remain ephemeral and cannot target the workspace root, overlap other manifest entries, or change after creation. +- Inline S3 credentials are exposed to code running in the sandbox. `allow_s3_credential_exposure=True` is required when credentials are present; use credentials scoped to that sandbox and bucket. +- Credentials are removed from serialized session state. A session containing S3 mounts cannot be resumed; create a new sandbox from the trusted manifest instead. +- Native snapshots cannot be hydrated while S3 mounts are active. Remote bucket contents are not copied into workspace persistence. + For more runnable examples, browse [examples/sandbox/](https://github.com/openai/openai-agents-python/tree/main/examples/sandbox) for local, coding, memory, handoff, and agent-composition patterns, and [examples/sandbox/extensions/](https://github.com/openai/openai-agents-python/tree/main/examples/sandbox/extensions) for hosted sandbox clients. From 20562b541491db2ad1fa9e5298e8d0203e325928 Mon Sep 17 00:00:00 2001 From: ShawnSiao Date: Mon, 27 Jul 2026 23:26:09 +0800 Subject: [PATCH 2/2] docs: clarify Vercel S3 mount constraints --- docs/sandbox/clients.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/sandbox/clients.md b/docs/sandbox/clients.md index 6117d4bc7c..6c7fcf035e 100644 --- a/docs/sandbox/clients.md +++ b/docs/sandbox/clients.md @@ -113,7 +113,7 @@ Hosted sandbox clients expose provider-specific mount strategies. Choose the bac | `DaytonaSandboxClient` | Supports rclone-backed cloud storage mounts with `DaytonaCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | | `E2BSandboxClient` | Supports rclone-backed cloud storage mounts with `E2BCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | | `RunloopSandboxClient` | Supports rclone-backed cloud storage mounts with `RunloopCloudBucketMountStrategy`; use it with `S3Mount`, `GCSMount`, `R2Mount`, `AzureBlobMount`, and `BoxMount`. | -| `VercelSandboxClient` | Supports create-time S3 mounts with `VercelCloudBucketMountStrategy` on `S3Mount`. Mounts must be ephemeral; sessions containing them cannot be resumed. | +| `VercelSandboxClient` | Supports create-time `S3Mount` entries through `VercelCloudBucketMountStrategy`. | @@ -136,7 +136,10 @@ The table below summarizes which remote storage entries each backend can mount d ### Vercel S3 mounts -Vercel supports `S3Mount` through `VercelCloudBucketMountStrategy`. Declare the mount in the manifest passed to `VercelSandboxClient.create`; the mount topology is fixed at sandbox creation time. +Vercel supports create-time `S3Mount` entries through +`VercelCloudBucketMountStrategy`. Declare the mount in the manifest passed to +`VercelSandboxClient.create`. The mount topology is fixed for the lifetime of +the sandbox session. ```python import os @@ -157,6 +160,7 @@ manifest = Manifest( region="us-east-1", access_key_id=os.environ["AWS_ACCESS_KEY_ID"], secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"], + ephemeral=True, mount_strategy=VercelCloudBucketMountStrategy(), ) }, @@ -168,12 +172,8 @@ session = await VercelSandboxClient().create( ) ``` -Important constraints: - -- The strategy supports only `S3Mount`; R2, GCS, Azure Blob, Box, and S3 Files entries are not supported by the Vercel backend. -- Vercel S3 mounts must remain ephemeral and cannot target the workspace root, overlap other manifest entries, or change after creation. -- Inline S3 credentials are exposed to code running in the sandbox. `allow_s3_credential_exposure=True` is required when credentials are present; use credentials scoped to that sandbox and bucket. -- Credentials are removed from serialized session state. A session containing S3 mounts cannot be resumed; create a new sandbox from the trusted manifest instead. -- Native snapshots cannot be hydrated while S3 mounts are active. Remote bucket contents are not copied into workspace persistence. +- Inline credentials are exposed to code running in the sandbox. Set `allow_s3_credential_exposure=True` only for credentials scoped to that sandbox and bucket. +- Credentials are removed from serialized session state. Sessions containing Vercel S3 mounts cannot be resumed; create a new sandbox from a trusted manifest instead. +- Workspace persistence temporarily unmounts S3 buckets, so persisted workspace data excludes remote bucket contents. Native snapshot hydration is not supported while S3 mounts are active. For more runnable examples, browse [examples/sandbox/](https://github.com/openai/openai-agents-python/tree/main/examples/sandbox) for local, coding, memory, handoff, and agent-composition patterns, and [examples/sandbox/extensions/](https://github.com/openai/openai-agents-python/tree/main/examples/sandbox/extensions) for hosted sandbox clients.