Sandbox
Create, connect to, list, pause, resume, fork and kill sandboxes, and the sandbox’s own settings.
Every method shows the same operation in each SDK; pick a language once and every tab on the site follows it.
Sandbox
Section titled “Sandbox”One sandbox, with optional short-lived data-plane access from create/connect/resume.
run_code and the *_code_context methods need a template with the interpreter kernel (code-interpreter-all).
Properties
Section titled “Properties”Python exposes these as methods; see below.
| Property | Type | Description |
|---|---|---|
LIVE_STATES |
SandboxState[] |
|
settleTimeoutMs |
number |
How long a pause, resume or connect that waits follows the sandbox, in milliseconds (a test may shorten it). |
Go exposes these as methods; see below.
Ruby exposes these as methods; see below.
Java exposes these as methods; see below.
connect()
Section titled “connect()”def connect(cls, sandbox_id: str, *, timeout_seconds: int | None=None, on_resume: str | None=None, wait: bool=True, request_timeout: float | None=None, client: SandboxClient | None=None) -> 'Sandbox'A handle to sandbox_id with fresh data-plane access. **This resumes a paused sandbox** (and may extend its timeout): use Sandbox.get for a handle that leaves a paused sandbox paused. on_resume is how a paused sandbox comes back: "restore" (the default) brings back its memory and processes, "reboot" keeps only the disk and boots the guest cold from it (a sandbox paused with mode="filesystem" always reboots). It is ignored for a running sandbox. The API answers once a resume is accepted; with wait (the default) this follows the sandbox until it has left resuming/starting, as resume does, so commands and files work at once. wait=False returns at once.
| Parameter | Type | Default |
|---|---|---|
sandbox_id |
str |
|
timeout_seconds |
int | None |
None |
on_resume |
str | None |
None |
wait |
bool |
True |
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns 'Sandbox'
sdk/python/svm/sandbox.py:307static async connect(id: string, client: SandboxClient = new SandboxClient(), timeoutSeconds?: number, onResume?: OnResume, wait = true): Promise<Sandbox>Resumes a paused sandbox; get does not. onResume is how it comes back: restore (the default) brings back its memory and processes, reboot keeps only the disk and boots the guest cold from it (a sandbox paused with mode filesystem always reboots). It is ignored for a running sandbox. The API answers once a resume is accepted; with wait (the default) this follows the sandbox until it has left resuming/starting, as resume does, so commands and files work at once. wait = false returns at once.
| Parameter | Type | Default |
|---|---|---|
id |
string |
|
client |
SandboxClient |
new SandboxClient() |
timeoutSeconds |
number |
optional |
onResume |
OnResume |
optional |
wait |
boolean |
true |
Returns Promise<Sandbox>
sdk/typescript/src/sandbox.ts:64Not in the Go SDK’s Sandbox.
def self.connect(sandbox_id, client: Client.new, timeout_seconds: nil, on_resume: nil, wait: true)A handle with fresh data-plane access. This resumes a paused sandbox. on_resume is how it comes back: “restore” (the default) brings back its memory and processes, “reboot” keeps only the disk and boots the guest cold from it (a sandbox paused with mode “filesystem” always reboots). It is ignored for a running sandbox. The API answers once a resume is accepted; with wait (the default) this follows the sandbox until it has left resuming/starting, as #resume does, so commands and files work at once. +wait: false+ returns at once.
| Parameter | Type | Default |
|---|---|---|
sandbox_id |
||
client |
Client.new |
|
timeout_seconds |
nil |
|
on_resume |
nil |
|
wait |
true |
sdk/ruby/lib/svm/sandbox.rb:46public static Sandbox connect(Client client, String sandboxId)public static Sandbox connect(Client client, String sandboxId, String onResume)public static Sandbox connect(Client client, String sandboxId, String onResume, boolean wait)A handle to the sandbox with fresh data-plane access. <b>This resumes a paused sandbox</b> (and may extend its timeout): use get(Client, String) for a handle that leaves a paused sandbox paused.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
sandboxId |
String |
|
onResume |
String |
optional |
wait |
boolean |
optional |
Returns Sandbox
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:108create()
Section titled “create()”def create(cls, *, template: str='base', timeout_seconds: int=300, metadata: dict[str, str] | None=None, envs: dict[str, str] | None=None, cpu_count: int | None=None, memory_mb: int | None=None, disk_mb: int | None=None, network: dict[str, Any] | None=None, secure: bool=True, auto_pause: bool=False, profile: str | None=None, gpu: str | None=None, volume_mounts: list[dict[str, Any]] | None=None, git_credentials: list[dict[str, str]] | None=None, bucket_mounts: list[dict[str, Any]] | None=None, snapshot_id: str | None=None, mcp_servers: list[dict[str, Any]] | None=None, name: str | None=None, lifecycle: dict[str, Any] | None=None, private_network: bool=False, idempotency_key: str | None=None, wait: bool=False, prefer_wait_seconds: int | None=None, request_timeout: float | None=None, client: SandboxClient | None=None) -> 'Sandbox'| Parameter | Type | Default |
|---|---|---|
template |
str |
'base' |
timeout_seconds |
int |
300 |
metadata |
dict[str, str] | None |
None |
envs |
dict[str, str] | None |
None |
cpu_count |
int | None |
None |
memory_mb |
int | None |
None |
disk_mb |
int | None |
None |
network |
dict[str, Any] | None |
None |
secure |
bool |
True |
auto_pause |
bool |
False |
profile |
str | None |
None |
gpu |
str | None |
None |
volume_mounts |
list[dict[str, Any]] | None |
None |
git_credentials |
list[dict[str, str]] | None |
None |
bucket_mounts |
list[dict[str, Any]] | None |
None |
snapshot_id |
str | None |
None |
mcp_servers |
list[dict[str, Any]] | None |
None |
name |
str | None |
None |
lifecycle |
dict[str, Any] | None |
None |
private_network |
bool |
False |
idempotency_key |
str | None |
None |
wait |
bool |
False |
prefer_wait_seconds |
int | None |
None |
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns 'Sandbox'
sdk/python/svm/sandbox.py:243static async create(options: CreateSandboxOptions = {}, client: SandboxClient = new SandboxClient()): Promise<Sandbox>| Parameter | Type | Default |
|---|---|---|
options |
CreateSandboxOptions |
{} |
client |
SandboxClient |
new SandboxClient() |
Returns Promise<Sandbox>
sdk/typescript/src/sandbox.ts:48Not in the Go SDK’s Sandbox.
def self.create(client: Client.new, template: "base", timeout_seconds: 300, metadata: nil, envs: nil, cpu_count: nil, memory_mb: nil, disk_mb: nil, network: nil, secure: true, auto_pause: false, volume_mounts: nil, snapshot_id: nil, profile: nil, name: nil, lifecycle: nil, private_network: false, mcp_servers: nil, git_credentials: nil, bucket_mounts: nil, gpu: nil, wait: false, idempotency_key: nil, request_timeout: nil)name makes the sandbox findable with Sandbox.get_by_name; lifecycle ({ auto_stop_seconds:, ephemeral:, persistent: … }) replaces timeout_seconds when it sets an auto-stop timer; private_network joins the team’s private network; mcp_servers, git_credentials, bucket_mounts and gpu are sent as the contract’s CreateSandboxRequest has them.
| Parameter | Type | Default |
|---|---|---|
client |
Client.new |
|
template |
"base" |
|
timeout_seconds |
300 |
|
metadata |
nil |
|
envs |
nil |
|
cpu_count |
nil |
|
memory_mb |
nil |
|
disk_mb |
nil |
|
network |
nil |
|
secure |
true |
|
auto_pause |
false |
|
volume_mounts |
nil |
|
snapshot_id |
nil |
|
profile |
nil |
|
name |
nil |
|
lifecycle |
nil |
|
private_network |
false |
|
mcp_servers |
nil |
|
git_credentials |
nil |
|
bucket_mounts |
nil |
|
gpu |
nil |
|
wait |
false |
|
idempotency_key |
nil |
|
request_timeout |
nil |
sdk/ruby/lib/svm/sandbox.rb:19public static Sandbox create(Client client, CreateOptions o)public static Sandbox create(Client client, String template)public static Sandbox create(Client client, String template, Map<String, String> metadata)A sandbox of template, waited on until it runs.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
template |
String |
|
metadata |
Map<String, String> |
optional |
Returns Sandbox
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:59def get(cls, sandbox_id: str, *, request_timeout: float | None=None, client: SandboxClient | None=None) -> 'Sandbox'A handle to sandbox_id without data-plane access, and without changing its state: a paused sandbox stays paused. Lifecycle calls (get_info, pause, resume, kill, snapshots, fork) work; commands and files need resume() or Sandbox.connect first.
| Parameter | Type | Default |
|---|---|---|
sandbox_id |
str |
|
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns 'Sandbox'
sdk/python/svm/sandbox.py:327static async get(id: string, client: SandboxClient = new SandboxClient()): Promise<Sandbox>Lifecycle-only handle; a paused sandbox stays paused.
| Parameter | Type | Default |
|---|---|---|
id |
string |
|
client |
SandboxClient |
new SandboxClient() |
Returns Promise<Sandbox>
sdk/typescript/src/sandbox.ts:77Not in the Go SDK’s Sandbox.
def self.get(sandbox_id, client: Client.new)A handle to the sandbox sandbox_id with what the API says about it; it carries no data-plane access (commands and files need Sandbox.connect).
| Parameter | Type | Default |
|---|---|---|
sandbox_id |
||
client |
Client.new |
sdk/ruby/lib/svm/sandbox.rb:59public static Sandbox get(Client client, String sandboxId)A handle to the sandbox without data-plane access, and without changing its state: a paused sandbox stays paused. Lifecycle calls (getInfo, pause, resume, kill, snapshots, fork) work; commands and files need resume(boolean) or connect(Client, String) first.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
sandboxId |
String |
Returns Sandbox
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:144list()
Section titled “list()”def list(cls, *, state: str | list[str] | None=None, metadata: dict[str, str] | None=None, template: str | None=None, page_size: int | None=None, page_token: str | None=None, request_timeout: float | None=None, client: SandboxClient | None=None) -> SandboxPage['Sandbox']One page of the team’s sandboxes. **Without state this includes killed, failed and lost ones** (the API’s default, kept for history); pass state=Sandbox.LIVE_STATES for the ones that exist now.
| Parameter | Type | Default |
|---|---|---|
state |
str | list[str] | None |
None |
metadata |
dict[str, str] | None |
None |
template |
str | None |
None |
page_size |
int | None |
None |
page_token |
str | None |
None |
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns SandboxPage['Sandbox']
sdk/python/svm/sandbox.py:356static async list(options: ListSandboxesOptions = {}, client: SandboxClient = new SandboxClient()): Promise<SandboxPage<Sandbox>>Without state this includes killed sandboxes (see LIVE_STATES).
| Parameter | Type | Default |
|---|---|---|
options |
ListSandboxesOptions |
{} |
client |
SandboxClient |
new SandboxClient() |
Returns Promise<SandboxPage<Sandbox>>
sdk/typescript/src/sandbox.ts:97Not in the Go SDK’s Sandbox.
def self.list(client: Client.new, state: nil, template: nil, metadata: nil, page_size: nil, page_token: nil)metadata is a Hash of keys that must all match.
| Parameter | Type | Default |
|---|---|---|
client |
Client.new |
|
state |
nil |
|
template |
nil |
|
metadata |
nil |
|
page_size |
nil |
|
page_token |
nil |
sdk/ruby/lib/svm/sandbox.rb:65public static SandboxPage<Sandbox> list(Client client, String state)public static SandboxPage<Sandbox> list(Client client, String state, String template, Map<String, String> metadata, int pageSize)public static SandboxPage<Sandbox> list(Client client, String state, String template, Map<String, String> metadata, int pageSize, String pageToken)The first page of the team’s sandboxes, optionally filtered by state. <b>Without a state this includes killed, failed and lost ones</b> (the API’s default, kept for history). See list(Client, String, String, Map, int, String) for the next pages.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
state |
String |
|
template |
String |
optional |
metadata |
Map<String, String> |
optional |
pageSize |
int |
optional |
pageToken |
String |
optional |
Returns SandboxPage<Sandbox>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:153access()
Section titled “access()”Not in the Python SDK’s Sandbox.
access: SandboxAccess | undefinedProperty.
func (s *Sandbox) Access() (SandboxAccess, bool)Access returns a copy of the current credentials. Tokens are never serialized.
Returns (SandboxAccess, bool)
sdk/go/sandbox.go:303def accesssdk/ruby/lib/svm/sandbox.rb:211public Map<String, Object> access()The data-plane access (data_plane_url, envd_access_token, expires_at …) or null when the sandbox carries none.
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:311attach_domain()
Section titled “attach_domain()”def attach_domain(self, domain: str, port: int) -> dict[str, Any]SandboxExtrasServe port on a custom domain the team claimed with create_domain (it serves once verify_domain passes).
| Parameter | Type | Default |
|---|---|---|
domain |
str |
|
port |
int |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:183attachDomain(domain: string, port: number): Promise<unknown>Serve port on a custom domain the team claimed with createDomain (it serves once verifyDomain passes).
| Parameter | Type | Default |
|---|---|---|
domain |
string |
|
port |
number |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:233func (s *Sandbox) AttachDomain(ctx context.Context, domain string, port int) (map[string]any, error)AttachDomain serves port on a custom domain the team claimed with CreateDomain (it serves once VerifyDomain passes).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
domain |
string |
|
port |
int |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:110def attach_domain(domain, port)Attaches a custom domain to a port of this sandbox.
| Parameter | Type | Default |
|---|---|---|
domain |
||
port |
sdk/ruby/lib/svm/sandbox_extras.rb:37public Map<String, Object> attachDomain(String domain, int port)SandboxHelpersAttaches a custom domain to a port of this sandbox.
| Parameter | Type | Default |
|---|---|---|
domain |
String |
|
port |
int |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:51backup()
Section titled “backup()”def backup(self, directory: str, *, provider: str, bucket: str, secret_name: str, prefix: str | None=None, request_timeout: float | None=600.0) -> dict[str, Any]SandboxExtrasArchive directory into the team’s bucket (provider is s3, gcs or azure_blob) with the credentials of the team secret secret_name, which never enter the sandbox. The result is the backup: pass it to restore_backup.
| Parameter | Type | Default |
|---|---|---|
directory |
str |
|
provider |
str |
|
bucket |
str |
|
secret_name |
str |
|
prefix |
str | None |
None |
request_timeout |
float | None |
600.0 |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:148backup(directory: string, to: BackupTarget): Promise<SandboxBackup>Archive directory into the team’s bucket with a team secret’s credentials (never sent into the sandbox).
| Parameter | Type | Default |
|---|---|---|
directory |
string |
|
to |
BackupTarget |
Returns Promise<SandboxBackup>
sdk/typescript/src/sandbox.ts:220func (s *Sandbox) Backup(ctx context.Context, directory string, to BackupTarget) (SandboxBackup, error)Backup archives directory of the running sandbox into the team’s bucket.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
directory |
string |
|
to |
BackupTarget |
Returns (SandboxBackup, error)
sdk/go/volume.go:312def backup(directory, provider:, bucket:, secret_name:, prefix: nil)Packs a directory of the sandbox and uploads it to the team’s bucket (provider, bucket and the secret holding its credentials).
| Parameter | Type | Default |
|---|---|---|
directory |
||
provider |
||
bucket |
||
secret_name |
||
prefix |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:103public Map<String, Object> backup(String directory, String provider, String bucket, String secretName, String prefix)SandboxHelpersPacks a directory of the sandbox and uploads it to the team’s bucket (provider, bucket and the secret holding its credentials).
| Parameter | Type | Default |
|---|---|---|
directory |
String |
|
provider |
String |
|
bucket |
String |
|
secretName |
String |
|
prefix |
String |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:112browser()
Section titled “browser()”browser: BrowserProperty (read-only).
Accessibility-tree browsing through the sandbox’s Playwright MCP server (INT-014); needs the browser template.
browser: BrowserProperty (read-only).
Accessibility-tree browsing through the sandbox’s Playwright MCP server (INT-014); needs the browser template.
func (s *Sandbox) Browser(options ...BrowserOptions) *BrowserBrowser returns the sandbox’s browser client; it needs the browser template.
| Parameter | Type | Default |
|---|---|---|
options |
...BrowserOptions |
optional |
Returns *Browser
sdk/go/guest_browser.go:96def browserAccessibility-tree browsing through the sandbox’s Playwright MCP server (INT-014); needs the browser template.
Source:sdk/ruby/lib/svm/browser.rb:233public Browser browser()Accessibility-tree browsing through the sandbox’s Playwright MCP server (needs the browser template).
Returns Browser
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:248client()
Section titled “client()”Not in the Python SDK’s Sandbox.
client: SandboxClientProperty (read-only).
Not in the Go SDK’s Sandbox.
clientProperty (read-only).
public Client client()Returns Client
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:183close()
Section titled “close()”Not in the Python SDK’s Sandbox.
Not in the TypeScript SDK’s Sandbox.
Not in the Go SDK’s Sandbox.
Not in the Ruby SDK’s Sandbox.
public void close()Kills the sandbox: use in try-with-resources.
Source:sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:618close_transports()
Section titled “close_transports()”Not in the Python SDK’s Sandbox.
Not in the TypeScript SDK’s Sandbox.
func (s *Sandbox) CloseTransports() errorCloseTransports releases local transports without changing sandbox state (it does not kill the sandbox; Kill does). The next client a Sandbox accessor returns opens new ones.
Returns error
sdk/go/sandbox.go:573def close_transportsEnds the data-plane calls in flight and drops the clients; the sandbox keeps running (#kill, or the block form #with, ends it). A later call opens new ones.
Source:sdk/ruby/lib/svm/sandbox.rb:237Not in the Java SDK’s Sandbox.
commands()
Section titled “commands()”commandsProperty (read-only).
commands: ProcessClientProperty (read-only).
func (s *Sandbox) Commands() (*ProcessClient, error)Commands returns the sandbox’s process client.
Returns (*ProcessClient, error)
sdk/go/process.go:149def commandsCommands and files go over the data plane (envd) only; they need the access that create, connect and resume return. Each client has its own channel (its #close ends only its own calls); they share the sandbox’s data-plane access.
Source:sdk/ruby/lib/svm/sandbox.rb:205public ProcessClient commands()Commands, PTYs and signals over the data plane (envd); needs the access that create, connect and resume return.
Returns ProcessClient
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:185connect_by_name()
Section titled “connect_by_name()”def connect_by_name(cls, name: str, *, timeout_seconds: int | None=None, on_resume: str | None=None, wait: bool=True, request_timeout: float | None=None, client: SandboxClient | None=None) -> 'Sandbox'Connect to the team’s live sandbox that has name, resuming it if it is stopped (see connect for on_resume and wait).
| Parameter | Type | Default |
|---|---|---|
name |
str |
|
timeout_seconds |
int | None |
None |
on_resume |
str | None |
None |
wait |
bool |
True |
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns 'Sandbox'
sdk/python/svm/sandbox.py:345static async connectByName(name: string, client: SandboxClient = new SandboxClient(), timeoutSeconds?: number, onResume?: OnResume, wait = true): Promise<Sandbox>Connect to the team’s live sandbox that has name, resuming it if it is stopped (see connect for onResume and wait).
| Parameter | Type | Default |
|---|---|---|
name |
string |
|
client |
SandboxClient |
new SandboxClient() |
timeoutSeconds |
number |
optional |
onResume |
OnResume |
optional |
wait |
boolean |
true |
Returns Promise<Sandbox>
sdk/typescript/src/sandbox.ts:87Not in the Go SDK’s Sandbox.
def self.connect_by_name(name, client: Client.new, timeout_seconds: nil, on_resume: nil, wait: true)Connects to the team’s live sandbox called name, resuming it if it is stopped. See Sandbox.connect for on_resume and wait.
| Parameter | Type | Default |
|---|---|---|
name |
||
client |
Client.new |
|
timeout_seconds |
nil |
|
on_resume |
nil |
|
wait |
true |
sdk/ruby/lib/svm/sandbox_extras.rb:14public static Sandbox connectByName(Client client, String name)public static Sandbox connectByName(Client client, String name, String onResume)public static Sandbox connectByName(Client client, String name, String onResume, boolean wait)Connects to the team’s live sandbox called name, resuming it if it is stopped.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
name |
String |
|
onResume |
String |
optional |
wait |
boolean |
optional |
Returns Sandbox
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:274create_code_context()
Section titled “create_code_context()”def create_code_context(self, cwd: Optional[str]=None, language: Optional[str]=None, request_timeout: Optional[float]=None) -> ContextCodeInterpreterMixinA new kernel context for language (python by default) working in cwd.
| Parameter | Type | Default |
|---|---|---|
cwd |
Optional[str] |
None |
language |
Optional[str] |
None |
request_timeout |
Optional[float] |
None |
Returns Context
sdk/python/svm/code_interpreter.py:229createCodeContext(options: { cwd?: string; language?: RunCodeLanguage; requestTimeoutMs?: number } = {}): Promise<Context>Start a new kernel context (python unless language says otherwise), optionally in cwd.
| Parameter | Type | Default |
|---|---|---|
options |
{ cwd?: string; language?: RunCodeLanguage; requestTimeoutMs?: number } |
{} |
Returns Promise<Context>
sdk/typescript/src/sandbox.ts:305func (s *Sandbox) CreateCodeContext(ctx context.Context, language, cwd string) (Context, error)CreateCodeContext starts a kernel context for language (“python” when empty) working in cwd (the default when empty).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
language |
string |
|
cwd |
string |
Returns (Context, error)
sdk/go/interpreter.go:312def create_code_context(cwd: nil, language: nil, request_timeout: nil)Starts a kernel (python by default) that keeps state between cells.
| Parameter | Type | Default |
|---|---|---|
cwd |
nil |
|
language |
nil |
|
request_timeout |
nil |
sdk/ruby/lib/svm/code_interpreter.rb:197public Context createCodeContext(String cwd, String language)A new kernel context for language (python when null) working in cwd (null for the default).
| Parameter | Type | Default |
|---|---|---|
cwd |
String |
|
language |
String |
Returns Context
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:602create_snapshot()
Section titled “create_snapshot()”def create_snapshot(self, *, name: str | None=None, idempotency_key: str | None=None, request_timeout: float | None=120.0) -> dict[str, Any]SandboxExtrasSnapshot this sandbox; the result carries snapshot_id. A snapshot of a large sandbox takes a minute or more, so the call waits up to request_timeout (120 s) instead of the client’s default.
| Parameter | Type | Default |
|---|---|---|
name |
str | None |
None |
idempotency_key |
str | None |
None |
request_timeout |
float | None |
120.0 |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:256createSnapshot(name?: string, requestTimeoutMs?: number): Promise<{ snapshot_id: string }>| Parameter | Type | Default |
|---|---|---|
name |
string |
optional |
requestTimeoutMs |
number |
optional |
Returns Promise<{ snapshot_id: string }>
sdk/typescript/src/sandbox.ts:253func (s *Sandbox) CreateSnapshot(ctx context.Context, name string) (string, error)CreateSnapshot snapshots the sandbox and returns the snapshot id. A snapshot of a large sandbox takes a minute or more, so the call waits up to two minutes unless ctx ends sooner.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
name |
string |
Returns (string, error)
sdk/go/sandbox_extras.go:249def create_snapshot(name: nil, request_timeout: 120)| Parameter | Type | Default |
|---|---|---|
name |
nil |
|
request_timeout |
120 |
sdk/ruby/lib/svm/sandbox.rb:161public String createSnapshot(String name)Snapshot this sandbox; a large one takes a minute or more, so the call waits up to two minutes. Returns the snapshot id.
| Parameter | Type | Default |
|---|---|---|
name |
String |
Returns String
Raises SandboxException
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:479delete_backup()
Section titled “delete_backup()”def delete_backup(cls, object_name: str, *, provider: str, bucket: str, secret_name: str, client: 'SandboxClient | None'=None) -> NoneSandboxExtrasDelete one backup object (its object_name as backup or list_backups returned it) from the team’s bucket, without a sandbox. Deleting an object that is already gone is not an error.
| Parameter | Type | Default |
|---|---|---|
object_name |
str |
|
provider |
str |
|
bucket |
str |
|
secret_name |
str |
|
client |
'SandboxClient | None' |
None |
sdk/python/svm/sandbox_extras.py:295static deleteBackup(objectName: string, location: BackupLocation, client: SandboxClient = new SandboxClient()): Promise<void>Delete one backup object (its object_name) from the team’s bucket, without a sandbox; one already gone is not an error.
| Parameter | Type | Default |
|---|---|---|
objectName |
string |
|
location |
BackupLocation |
|
client |
SandboxClient |
new SandboxClient() |
sdk/typescript/src/sandbox.ts:276Not in the Go SDK’s Sandbox.
def self.delete_backup(object_name, provider:, bucket:, secret_name:, client: Client.new)Deletes one backup object (its “object_name”, as #backup or ::list_backups returned it) from the team’s bucket, without a sandbox. An object that is already gone is not an error.
| Parameter | Type | Default |
|---|---|---|
object_name |
||
provider |
||
bucket |
||
secret_name |
||
client |
Client.new |
sdk/ruby/lib/svm/sandbox_extras.rb:97public static void deleteBackup(Client client, String objectName, String provider, String bucket, String secretName)Delete one backup object (its object_name) from the team’s bucket, without a sandbox; one already gone is not an error.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
objectName |
String |
|
provider |
String |
|
bucket |
String |
|
secretName |
String |
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:510delete_snapshot()
Section titled “delete_snapshot()”def delete_snapshot(cls, snapshot_id: str, *, client: 'SandboxClient | None'=None) -> NoneSandboxExtras| Parameter | Type | Default |
|---|---|---|
snapshot_id |
str |
|
client |
'SandboxClient | None' |
None |
sdk/python/svm/sandbox_extras.py:275static async deleteSnapshot(snapshotId: string, client: SandboxClient = new SandboxClient()): Promise<void>| Parameter | Type | Default |
|---|---|---|
snapshotId |
string |
|
client |
SandboxClient |
new SandboxClient() |
sdk/typescript/src/sandbox.ts:264func (s *Sandbox) DeleteSnapshot(ctx context.Context, snapshotID string) errorDeleteSnapshot deletes one of the caller’s snapshots.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
snapshotID |
string |
Returns error
sdk/go/sandbox_extras.go:299def self.delete_snapshot(snapshot_id, client: Client.new)Delete a snapshot; sandboxes started from it keep their own disks.
| Parameter | Type | Default |
|---|---|---|
snapshot_id |
||
client |
Client.new |
sdk/ruby/lib/svm/sandbox.rb:166public static void deleteSnapshot(Client client, String snapshotId)Delete a snapshot; sandboxes started from it keep their own disks.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
snapshotId |
String |
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:487desktop()
Section titled “desktop()”desktop: DesktopClientProperty (read-only).
Computer-use controls for a sandbox created from the desktop template.
desktop: DesktopClientProperty (read-only).
Computer-use controls for a sandbox created from the desktop template.
func (s *Sandbox) Desktop() *DesktopDesktop returns the computer-use controls of a sandbox (needs a desktop template). On a Windows sandbox (Info().OS() is “windows”) the controls drive the Windows session through WindowsDesktop; otherwise they are the X11 ones.
Returns *Desktop
sdk/go/desktop.go:92def desktopComputer-use controls for a running desktop sandbox (needs a desktop template); a Windows sandbox gets the Windows driver.
Source:sdk/ruby/lib/svm/desktop.rb:307public Desktop desktop()Computer-use controls for a running desktop sandbox (needs a desktop template): the Windows driver (WindowsDesktop) on a Windows sandbox, the X11 one otherwise.
Returns Desktop
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:242egress()
Section titled “egress()”def egress(self) -> dict[str, Any]SandboxExtrasThe layer-7 egress rules, with ca_certificate (trust it in the guest) and proxy_url (set as HTTPS_PROXY).
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:135egress(): Promise<unknown>The layer-7 egress rules, with ca_certificate (trust it in the guest) and proxy_url (set as HTTPS_PROXY).
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:214func (s *Sandbox) Egress(ctx context.Context) (map[string]any, error)Egress returns the layer-7 egress rules, with ca_certificate (trust it in the guest) and proxy_url (set as HTTPS_PROXY).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:74def egressThe layer-7 egress rules, with the CA certificate the guest trusts and the proxy_url to set as HTTPS_PROXY.
Source:sdk/ruby/lib/svm/sandbox.rb:134public Map<String, Object> egress()The layer-7 egress rules, with the CA certificate the guest trusts and the proxy_url to set as HTTPS_PROXY.
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:433egress_proxy()
Section titled “egress_proxy()”def egress_proxy(self) -> dict[str, Any]SandboxExtrasThis sandbox’s customer egress proxy setting and the one in force (effective_source, effective_url).
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:242egressProxy(): Promise<unknown>This sandbox’s customer egress proxy setting and the one in force (effective_source, effective_url).
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:250func (s *Sandbox) EgressProxy(ctx context.Context) (map[string]any, error)EgressProxy returns this sandbox’s customer egress proxy setting and the one in force (effective_source, effective_url).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:238def egress_proxysdk/ruby/lib/svm/sandbox_extras.rb:76public Map<String, Object> egressProxy()SandboxHelpersReturns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:104files()
Section titled “files()”filesProperty (read-only).
files: FileClientProperty (read-only).
func (s *Sandbox) Files() (*FileClient, error)Files returns the sandbox’s filesystem client.
Returns (*FileClient, error)
sdk/go/files.go:115def filessdk/ruby/lib/svm/sandbox.rb:206public FileClient files()Files over the data plane (envd): resumable downloads, verified uploads, watchers.
Returns FileClient
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:187fork()
Section titled “fork()”def fork(self, count: int=1, *, metadata: dict[str, str] | None=None, timeout_seconds: int | None=None, idempotency_key: str | None=None, request_timeout: float | None=300.0) -> list['Sandbox']SandboxExtrasCopy this running sandbox, memory, disk and running processes, into count children in one call. This sandbox is paused for the capture and keeps running; no snapshot is left behind. The call waits up to request_timeout (300 s), since writing a large guest’s memory takes a while. The children carry this sandbox’s metadata unless metadata is given ({} for none), so a cleanup that selects by metadata finds them too. timeout_seconds is each child’s lifetime (the API’s default is 300 s).
| Parameter | Type | Default |
|---|---|---|
count |
int |
1 |
metadata |
dict[str, str] | None |
None |
timeout_seconds |
int | None |
None |
idempotency_key |
str | None |
None |
request_timeout |
float | None |
300.0 |
Returns list['Sandbox']
sdk/python/svm/sandbox_extras.py:324fork(count = 1, options: ForkOptions = {}): Promise<Sandbox[]>Copy this running sandbox, memory, disk and processes, into count children; it keeps running and no snapshot is left. The children carry this sandbox’s metadata unless metadata is given ({} for none).
| Parameter | Type | Default |
|---|---|---|
count |
number |
1 |
options |
ForkOptions |
{} |
Returns Promise<Sandbox[]>
sdk/typescript/src/sandbox.ts:289func (s *Sandbox) Fork(ctx context.Context, count int, opts ...ForkOptions) ([]*Sandbox, error)Fork copies the running sandbox, memory, disk and running processes, into count children in one call (API-017). The sandbox is paused for the capture and keeps running; no snapshot is left behind. Like CreateSnapshot it waits longer than an ordinary call (five minutes unless ctx ends sooner); the client’s own Timeout must allow it too.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
count |
int |
|
opts |
...ForkOptions |
optional |
Returns ([]*Sandbox, error)
sdk/go/sandbox_extras.go:366def fork(count = 1, metadata: nil, timeout_seconds: nil, idempotency_key: nil, request_timeout: 300)Copy this running sandbox, memory, disk and running processes, into count children in one call. It keeps running and no snapshot is left behind; the call waits up to request_timeout (300 s) for the capture. timeout_seconds is the children’s timeout (the parent’s when left out). The children carry this sandbox’s metadata unless metadata is given ({} for none), as in Python, so a cleanup that selects by metadata finds them too.
| Parameter | Type | Default |
|---|---|---|
count |
1 |
|
metadata |
nil |
|
timeout_seconds |
nil |
|
idempotency_key |
nil |
|
request_timeout |
300 |
sdk/ruby/lib/svm/sandbox.rb:187public List<Sandbox> fork(int count)public List<Sandbox> fork(int count, Map<String, String> metadata, Integer timeoutSeconds)Copy this running sandbox, memory, disk and running processes, into count children in one call. It keeps running and no snapshot is left behind; the call waits up to five minutes for the capture.
| Parameter | Type | Default |
|---|---|---|
count |
int |
|
metadata |
Map<String, String> |
optional |
timeoutSeconds |
Integer |
optional |
Returns List<Sandbox>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:544forward_local()
Section titled “forward_local()”def forward_local(self, port: int, *, local_port: int=0, host: str='127.0.0.1')Listen on host:local_port (0 asks for a free port) and forward each connection to port in the sandbox, over the envd port forward (ports.forward), one stream per connection.
Returns a LocalForward: its url and port say where to point a browser; close() stops it.
| Parameter | Type | Default |
|---|---|---|
port |
int |
|
local_port |
int |
0 |
host |
str |
'127.0.0.1' |
sdk/python/svm/sandbox.py:453async forwardLocal(port: number, options: { localPort?: number; host?: string } = {}): Promise<import("./forward-node.js").LocalForward>Listen on host:localPort (0 for any free port) and forward each connection to port in the sandbox over the envd port forward (Node only). close() stops it; the default host is loopback, and anything that can reach the local port can reach the sandbox port.
| Parameter | Type | Default |
|---|---|---|
port |
number |
|
options |
{ localPort?: number; host?: string } |
{} |
Returns Promise<import("./forward-node.js").LocalForward>
sdk/typescript/src/sandbox.ts:174func (s *Sandbox) ForwardLocal(ctx context.Context, port uint32, localAddr string) (*LocalForward, error)ForwardLocal listens on localAddr (“127.0.0.1:0” for any free loopback port) and forwards each connection to port in the sandbox over the envd port forward, one stream per connection. Binding beyond loopback exposes the sandbox port to the network.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
port |
uint32 |
|
localAddr |
string |
Returns (*LocalForward, error)
sdk/go/forward_local.go:29def forward_local(port, local_host: "127.0.0.1", local_port: 0)Listens on a local address and relays each connection to port in the sandbox. Returns the listener (Forward#addr, #url, #close).
| Parameter | Type | Default |
|---|---|---|
port |
||
local_host |
"127.0.0.1" |
|
local_port |
0 |
sdk/ruby/lib/svm/streams.rb:234public Forward forwardLocal(int port, String localHost, int localPort)Listens on a local address and relays each connection to port in the sandbox.
| Parameter | Type | Default |
|---|---|---|
port |
int |
|
localHost |
String |
|
localPort |
int |
Returns Forward
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:308from_snapshot()
Section titled “from_snapshot()”def from_snapshot(cls, snapshot_id: str, *, count: int=1, metadata: dict[str, str] | None=None, timeout_seconds: int | None=None, client: 'SandboxClient | None'=None) -> list['Sandbox']SandboxExtrasStart count sandboxes from a snapshot, each connected and ready for commands and files. metadata tags every new sandbox and timeout_seconds sets its lifetime (the API’s default is 300 s); these are the create options the snapshot fork call takes (template, resources and the rest come from the snapshot).
| Parameter | Type | Default |
|---|---|---|
snapshot_id |
str |
|
count |
int |
1 |
metadata |
dict[str, str] | None |
None |
timeout_seconds |
int | None |
None |
client |
'SandboxClient | None' |
None |
Returns list['Sandbox']
sdk/python/svm/sandbox_extras.py:303static fromSnapshot(snapshotId: string, countOrOptions: number | FromSnapshotOptions = 1, client?: SandboxClient): Promise<Sandbox[]>Start count sandboxes from a snapshot, each connected and ready for commands and files. Pass an options object to set their metadata (tags) and timeoutSeconds as well: Sandbox.fromSnapshot(id, { count: 2, metadata: { run: "r1" } }).
| Parameter | Type | Default |
|---|---|---|
snapshotId |
string |
|
countOrOptions |
number | FromSnapshotOptions |
1 |
client |
SandboxClient |
optional |
Returns Promise<Sandbox[]>
sdk/typescript/src/sandbox.ts:283Not in the Go SDK’s Sandbox.
def self.from_snapshot(snapshot_id, client: Client.new, count: 1, metadata: nil, timeout_seconds: nil, idempotency_key: nil)Starts count sandboxes from a snapshot, each connected and running. metadata tags them (for Sandbox.list(metadata:)) and timeout_seconds is their timeout (the API’s default when left out).
| Parameter | Type | Default |
|---|---|---|
snapshot_id |
||
client |
Client.new |
|
count |
1 |
|
metadata |
nil |
|
timeout_seconds |
nil |
|
idempotency_key |
nil |
sdk/ruby/lib/svm/sandbox.rb:172public static List<Sandbox> fromSnapshot(Client client, String snapshotId, int count)public static List<Sandbox> fromSnapshot(Client client, String snapshotId, int count, Map<String, String> metadata, Integer timeoutSeconds)Starts count sandboxes from a snapshot, each connected and ready for commands and files.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
snapshotId |
String |
|
count |
int |
|
metadata |
Map<String, String> |
optional |
timeoutSeconds |
Integer |
optional |
Returns List<Sandbox>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:515get_by_name()
Section titled “get_by_name()”def get_by_name(cls, name: str, *, request_timeout: float | None=None, client: SandboxClient | None=None) -> 'Sandbox'The team’s live sandbox that has name (no data-plane access: connect it to run commands).
| Parameter | Type | Default |
|---|---|---|
name |
str |
|
request_timeout |
float | None |
None |
client |
SandboxClient | None |
None |
Returns 'Sandbox'
sdk/python/svm/sandbox.py:336static async getByName(name: string, client: SandboxClient = new SandboxClient()): Promise<Sandbox>The team’s live sandbox that has name, without data-plane access (connect it to run commands).
| Parameter | Type | Default |
|---|---|---|
name |
string |
|
client |
SandboxClient |
new SandboxClient() |
Returns Promise<Sandbox>
sdk/typescript/src/sandbox.ts:82Not in the Go SDK’s Sandbox.
def self.get_by_name(name, client: Client.new)The team’s live sandbox called name (1 to 63 characters); it carries no data-plane access until connected.
| Parameter | Type | Default |
|---|---|---|
name |
||
client |
Client.new |
sdk/ruby/lib/svm/sandbox_extras.rb:7public static Sandbox getByName(Client client, String name)The team’s live sandbox called name (1 to 63 characters); it carries no data-plane access until connected.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
name |
String |
Returns Sandbox
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:266get_host()
Section titled “get_host()”def get_host(self, port: int) -> strThe public host of port in this sandbox: <port>-<sandbox id>.<domain>, served over HTTPS (HTTP, WebSocket and SSE) for as long as something listens on the port. A sandbox created with secure=True (the default) also wants its access.traffic_access_token in the X-Traffic-Access-Token header; the token changes when the sandbox resumes. Needs a handle from create, connect or resume, which carry the domain.
| Parameter | Type | Default |
|---|---|---|
port |
int |
Returns str
sdk/python/svm/sandbox.py:436getHost(port: number): stringThe public host of port in this sandbox: <port>-<sandbox id>.<domain>, served over HTTPS (HTTP, WebSocket and SSE) for as long as something listens on the port. A sandbox created with secure: true (the default) also wants its access.trafficAccessToken in the X-Traffic-Access-Token header; the token changes when the sandbox resumes. Needs a handle from create, connect or resume, which carry the domain.
| Parameter | Type | Default |
|---|---|---|
port |
number |
Returns string
Raises DataPlaneUnavailableError
sdk/typescript/src/sandbox.ts:158func (s *Sandbox) GetHost(port int) (string, error)GetHost returns the public host of port in this sandbox: “<port>-<sandbox id>.<domain>”, served over HTTPS (HTTP, WebSocket and SSE) for as long as something listens on the port. A sandbox created secure (the default) also wants the access’s TrafficAccessToken in the X-Traffic-Access-Token header; the token changes when the sandbox resumes. It needs a handle from Create, Connect or Resume, which carry the domain; no request is made.
| Parameter | Type | Default |
|---|---|---|
port |
int |
Returns (string, error)
sdk/go/sandbox.go:290def get_host(port)The public host of port in this sandbox: “<port>-<sandbox id>.<domain>”, served over HTTPS (HTTP, WebSocket and SSE) for as long as something listens on the port. A sandbox created secure (the default) also wants the access’s traffic_access_token in the X-Traffic-Access-Token header; the token changes when the sandbox resumes. Needs a handle from create, connect or resume, which carry the domain.
| Parameter | Type | Default |
|---|---|---|
port |
Raises DataPlaneUnavailableError
sdk/ruby/lib/svm/sandbox.rb:217public String getHost(int port)The public host of port in this sandbox: <port>-<sandbox id>.<domain>, served over HTTPS (HTTP, WebSocket and SSE) for as long as something listens on the port. A sandbox created secure (the default) also wants the access’s traffic_access_token in the X-Traffic-Access-Token header; the token changes when the sandbox resumes. Needs a handle from create, connect or resume, which carry the domain.
| Parameter | Type | Default |
|---|---|---|
port |
int |
Returns String
Raises DataPlaneUnavailableException
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:290get_info()
Section titled “get_info()”def get_info(self, *, request_timeout: float | None=None) -> SandboxInfo| Parameter | Type | Default |
|---|---|---|
request_timeout |
float | None |
None |
Returns SandboxInfo
sdk/python/svm/sandbox.py:463async getInfo(): Promise<SandboxInfo>Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:315func (s *Sandbox) GetInfo(ctx context.Context) (SandboxInfo, error)GetInfo refreshes public state; it does not rotate or return data-plane access.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (SandboxInfo, error)
sdk/go/sandbox.go:435def get_info(request_timeout: nil)| Parameter | Type | Default |
|---|---|---|
request_timeout |
nil |
sdk/ruby/lib/svm/sandbox.rb:86public Map<String, Object> getInfo()Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:375get_mcp_token()
Section titled “get_mcp_token()”def get_mcp_token(self) -> str | NoneSandboxExtrasThe gateway’s traffic token. Send it in the X-Traffic-Access-Token header, not Authorization: Bearer (401); None when secure=False. Secret; it changes when the sandbox resumes, so fetch it again after a resume.
Returns str \| None
sdk/python/svm/sandbox_extras.py:237getMcpToken(): Promise<string | undefined>Gateway traffic token; send it in the X-Traffic-Access-Token header, not Authorization: Bearer (401). Undefined when secure: false. Secret; it changes when the sandbox resumes, so fetch it again after a resume.
Returns Promise<string \| undefined>
sdk/typescript/src/sandbox.ts:248func (s *Sandbox) GetMcpToken(ctx context.Context) (string, error)GetMcpToken returns its traffic token (empty when secure is off). Send it in the X-Traffic-Access-Token header, not Authorization: Bearer (401); treat it as secret. It changes when the sandbox resumes, so fetch it again after a resume.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (string, error)
sdk/go/sandbox_extras.go:208def get_mcp_tokenThe gateway traffic token, or nil when secure: false. Send it in the X-Traffic-Access-Token header, not Authorization: Bearer (401). Secret; it changes when the sandbox resumes, so fetch it again after a resume.
Source:sdk/ruby/lib/svm/sandbox_extras.rb:66public String getMcpToken()SandboxHelpersGateway traffic token, or null when secure is off. Send it in the X-Traffic-Access-Token header, not Authorization: Bearer (401). Secret; it changes when the sandbox resumes, so fetch it again after a resume.
Returns String
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:94get_mcp_url()
Section titled “get_mcp_url()”def get_mcp_url(self) -> strSandboxExtrasThe index URL (https://<port>-<id>.<domain>/mcp) of this running sandbox’s MCP gateway; a GET lists the servers. Send MCP JSON-RPC to <url>/<server name>, with get_mcp_token in the X-Traffic-Access-Token header (Authorization: Bearer is refused with 401).
Returns str
sdk/python/svm/sandbox_extras.py:231getMcpUrl(): Promise<string>The index URL (https://<port>-<id>.<domain>/mcp) of this sandbox’s MCP gateway, which serves the MCP servers it was created with (mcpServers); a GET lists them. Send MCP JSON-RPC to <url>/<server name> with {@link getMcpToken} in the X-Traffic-Access-Token header (Authorization: Bearer is refused with 401). The sandbox must be running.
Returns Promise<string>
sdk/typescript/src/sandbox.ts:245func (s *Sandbox) GetMcpURL(ctx context.Context) (string, error)GetMcpURL returns the index URL (https://<port>-<id>.<domain>/mcp) of the running sandbox’s MCP gateway; a GET lists the servers. Send MCP JSON-RPC to <url>/<server name>, with GetMcpToken in the X-Traffic-Access-Token header (Authorization: Bearer gets 401).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (string, error)
sdk/go/sandbox_extras.go:194def get_mcp_urlThe index URL (https://<port>-<id>.<domain>/mcp) of this running sandbox’s MCP gateway; a GET lists the servers. Send MCP JSON-RPC to “<url>/<server name>”, with #get_mcp_token in the X-Traffic-Access-Token header (Authorization: Bearer gets 401).
Source:sdk/ruby/lib/svm/sandbox_extras.rb:60public String getMcpUrl()SandboxHelpersThe index URL (https://<port>-<id>.<domain>/mcp) of this running sandbox’s MCP gateway; a GET lists the servers. Send MCP JSON-RPC to <url>/<server name>, with getMcpToken() in the X-Traffic-Access-Token header (Authorization: Bearer gets 401).
Returns String
Raises SandboxException
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:84get_snapshot()
Section titled “get_snapshot()”def get_snapshot(cls, snapshot_id: str, *, client: 'SandboxClient | None'=None) -> dict[str, Any]SandboxExtrasOne snapshot of the caller’s (snapshot_id, name, source_sandbox_id, template_id, size_bytes, metadata, created_at; a snapshot listed is ready to restore, it has no state field).
| Parameter | Type | Default |
|---|---|---|
snapshot_id |
str |
|
client |
'SandboxClient | None' |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:270static async getSnapshot(snapshotId: string, client: SandboxClient = new SandboxClient()): Promise<Record<string, unknown>>One snapshot: its id, name, source sandbox, template and creation time.
| Parameter | Type | Default |
|---|---|---|
snapshotId |
string |
|
client |
SandboxClient |
new SandboxClient() |
Returns Promise<Record<string, unknown>>
sdk/typescript/src/sandbox.ts:261func (s *Sandbox) GetSnapshot(ctx context.Context, snapshotID string) (map[string]any, error)GetSnapshot returns one of the caller’s snapshots (snapshot_id, name, source_sandbox_id, …).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
snapshotID |
string |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:294def self.get_snapshot(snapshot_id, client: Client.new)| Parameter | Type | Default |
|---|---|---|
snapshot_id |
||
client |
Client.new |
sdk/ruby/lib/svm/sandbox.rb:199public static Map<String, Object> getSnapshot(Client client, String snapshotId)| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
snapshotId |
String |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:569gitProperty (read-only).
Clone, status, branches, commit, push, pull, remotes and config with git in the sandbox.
git: GitProperty (read-only).
Clone, status, branches, commit, push, pull, remotes and config with git in the sandbox.
func (s *Sandbox) Git() *GitGit returns clone, status, branches, commit, push, pull, remotes and config with git in the sandbox.
Returns *Git
sdk/go/git_client.go:37def gitClone, status, branches, commit, push, pull, remotes and config with git in the sandbox.
Source:sdk/ruby/lib/svm/git.rb:401public Git git()Clone, status, branches, commit, push, pull, remotes and config with git in the sandbox.
Returns Git
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:231id: strProperty (read-only).
id: stringProperty (read-only).
Not in the Go SDK’s Sandbox.
def idsdk/ruby/lib/svm/sandbox.rb:83public String id()Returns String
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:180identity_token()
Section titled “identity_token()”def identity_token(self, audience: str, *, ttl_seconds: int | None=None) -> dict[str, Any]SandboxExtrasA short-lived OIDC token (token, expires_at) naming this sandbox, its team and template, for a cloud provider that trusts the issuer (e.g. AWS AssumeRoleWithWebIdentity with audience="sts.amazonaws.com").
| Parameter | Type | Default |
|---|---|---|
audience |
str |
|
ttl_seconds |
int | None |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:223identityToken(audience: string, ttlSeconds?: number): Promise<unknown>A short-lived OIDC token naming this sandbox, its team and template, for a cloud provider that trusts the issuer.
| Parameter | Type | Default |
|---|---|---|
audience |
string |
|
ttlSeconds |
number |
optional |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:241func (s *Sandbox) IdentityToken(ctx context.Context, audience string, ttlSeconds int) (map[string]any, error)IdentityToken issues a short-lived OIDC token (token, expires_at) naming this sandbox, its team and template, for a cloud provider that trusts the issuer, e.g. AWS AssumeRoleWithWebIdentity with audience “sts.amazonaws.com”. ttlSeconds 0 is the default (15 minutes).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
audience |
string |
|
ttlSeconds |
int |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:220def identity_token(audience, ttl_seconds: nil)A short-lived identity token for the sandbox, for audience.
| Parameter | Type | Default |
|---|---|---|
audience |
||
ttl_seconds |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:71public Map<String, Object> identityToken(String audience, int ttlSeconds)SandboxHelpersA short-lived identity token for the sandbox, for audience; ttlSeconds 0 leaves the TTL to the platform.
| Parameter | Type | Default |
|---|---|---|
audience |
String |
|
ttlSeconds |
int |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:100inbound()
Section titled “inbound()”def inbound(self) -> dict[str, Any]SandboxExtrasThe inbound allowlist of this sandbox’s public URLs and custom domains (allow_cidrs; empty means open).
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:173inbound(): Promise<unknown>The inbound allowlist of the public URLs and custom domains (allow_cidrs; empty means open).
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:228func (s *Sandbox) Inbound(ctx context.Context) (map[string]any, error)Inbound returns the inbound allowlist of the public URLs and custom domains (allow_cidrs; empty means open).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:95def inboundsdk/ruby/lib/svm/sandbox_extras.rb:28public Map<String, Object> inbound()SandboxHelpersReturns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:42info()
Section titled “info()”Not in the Python SDK’s Sandbox.
info: SandboxInfoProperty.
func (s *Sandbox) Info() SandboxInfoInfo returns the latest public lifecycle information.
Returns SandboxInfo
sdk/go/sandbox.go:284infoProperty (read-only).
public Map<String, Object> info()Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:182initialize()
Section titled “initialize()”Not in the Python SDK’s Sandbox.
Not in the TypeScript SDK’s Sandbox.
Not in the Go SDK’s Sandbox.
def initialize(client, info)| Parameter | Type | Default |
|---|---|---|
client |
||
info |
sdk/ruby/lib/svm/sandbox.rb:12Not in the Java SDK’s Sandbox.
is_running()
Section titled “is_running()”def is_running(self) -> boolSandboxExtrasWhether the sandbox is running right now (asks the API; does not use the cached state).
Returns bool
sdk/python/svm/sandbox_extras.py:112isRunning(): Promise<boolean>Returns Promise<boolean>
sdk/typescript/src/sandbox.ts:207func (s *Sandbox) IsRunning(ctx context.Context) (bool, error)IsRunning asks the API whether the sandbox is running right now.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (bool, error)
sdk/go/sandbox_extras.go:15def is_running?sdk/ruby/lib/svm/sandbox.rb:90public boolean isRunning()Returns boolean
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:380kill()
Section titled “kill()”def kill(self, *, request_timeout: float | None=None) -> boolSandboxExtrasStop and delete the sandbox. True when it existed, False when it was already gone, so a cleanup can call it twice. A second kill on the handle that killed it returns False without a request. Another handle of a sandbox that has already ended may still get True: the API’s kill is idempotent and answers success for an ended sandbox.
The server waits up to 30 s for a sandbox that is still starting, pausing or resuming before it stops it, so the default wait here is longer than the client’s usual timeout.
| Parameter | Type | Default |
|---|---|---|
request_timeout |
float | None |
None |
Returns bool
sdk/python/svm/sandbox_extras.py:93async kill(): Promise<boolean>Stop and delete the sandbox. Resolves true when it existed, false when it was already gone, so a cleanup can call it twice. A second kill on the handle that killed it resolves false without a request. Another handle of a sandbox that has already ended (one from get or list, say) may still resolve true: the API’s kill is idempotent and answers success for it.
Returns Promise<boolean>
sdk/typescript/src/sandbox.ts:402func (s *Sandbox) Kill(ctx context.Context) (bool, error)Kill terminates a sandbox and closes local data-plane transports. It reports whether the sandbox existed: false with a nil error is a sandbox that was already gone, or that this handle had already killed (then no request is sent). Another handle of a sandbox that has ended may still get true: the API’s kill is idempotent. After Kill, data-plane calls on this handle fail with a *ProcessError (code SANDBOX_NOT_RUNNING).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (bool, error)
Raises ProcessError
sdk/go/sandbox.go:517def kill(request_timeout: nil)Delete the sandbox; true when it existed, false when it was already gone, so a cleanup can call it twice. A second kill from this object returns false without a request. Another handle of a sandbox that has ended (a Sandbox.get or Sandbox.connect made before the kill) may still get true, because the API’s kill is idempotent. Afterwards the data-plane clients raise SandboxError.
| Parameter | Type | Default |
|---|---|---|
request_timeout |
nil |
Raises SandboxError
sdk/ruby/lib/svm/sandbox.rb:150public boolean kill()Delete the sandbox: true when it existed, false when it was already gone, so a cleanup can call it twice. A handle that already killed the sandbox returns false without a request. Another handle of a sandbox that has ended may still get true: the API’s kill is idempotent while it remembers the sandbox. Afterwards the data-plane clients of this handle are closed, and commands and files on it throw DataPlaneUnavailableException.
Returns boolean
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:450list_backups()
Section titled “list_backups()”def list_backups(cls, *, provider: str, bucket: str, secret_name: str, prefix: str | None=None, page_token: str | None=None, page_size: int | None=None, client: 'SandboxClient | None'=None) -> dict[str, Any]SandboxExtrasOne page of the backup objects in the team’s bucket, without a sandbox: {"items": [{"object\_name", "size\_bytes", "modified\_at"}], "next\_page\_token"}. prefix is the one the backups were created with (every object under it is listed; the whole bucket without one). It names a folder, not the start of a name: nightly lists nightly/... and is the same as nightly/, while night lists nothing of it. Pass next_page_token back as page_token for the next page (absent on the last). secret_name is the team secret holding the bucket credentials, as for backup.
| Parameter | Type | Default |
|---|---|---|
provider |
str |
|
bucket |
str |
|
secret_name |
str |
|
prefix |
str | None |
None |
page_token |
str | None |
None |
page_size |
int | None |
None |
client |
'SandboxClient | None' |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:279static listBackups(options: BackupListOptions, client: SandboxClient = new SandboxClient()): Promise<BackupPage>One page of the backup objects in the team’s bucket, without a sandbox. prefix is the one the backups were created with. It names a folder, not the start of a name: nightly lists nightly/... and is the same as nightly/, while night lists nothing of it. Pass next_page_token back as pageToken for the next page.
| Parameter | Type | Default |
|---|---|---|
options |
BackupListOptions |
|
client |
SandboxClient |
new SandboxClient() |
Returns Promise<BackupPage>
sdk/typescript/src/sandbox.ts:272Not in the Go SDK’s Sandbox.
def self.list_backups(provider:, bucket:, secret_name:, prefix: nil, page_token: nil, page_size: nil, client: Client.new)One page of the backup objects in the team’s bucket, without a sandbox: {“items” => [{“object_name”, “size_bytes”, “modified_at”}], “next_page_token”}. prefix is the one the backups were created with (every object under it; the whole bucket without one). It names a folder, not the start of a name: “nightly” lists “nightly/…” and is the same as “nightly/”, while “night” lists nothing of it. Pass “next_page_token” back as page_token for the next page (nil on the last).
| Parameter | Type | Default |
|---|---|---|
provider |
||
bucket |
||
secret_name |
||
prefix |
nil |
|
page_token |
nil |
|
page_size |
nil |
|
client |
Client.new |
sdk/ruby/lib/svm/sandbox_extras.rb:88public static Map<String, Object> listBackups(Client client, String provider, String bucket, String secretName)public static Map<String, Object> listBackups(Client client, String provider, String bucket, String secretName, String prefix, String pageToken, Integer pageSize)listBackups(Client, String, String, String, String, String, Integer) of the whole bucket, first page.
| Parameter | Type | Default |
|---|---|---|
client |
Client |
|
provider |
String |
|
bucket |
String |
|
secretName |
String |
|
prefix |
String |
optional |
pageToken |
String |
optional |
pageSize |
Integer |
optional |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:492list_code_contexts()
Section titled “list_code_contexts()”def list_code_contexts(self) -> List[Context]CodeInterpreterMixinReturns List[Context]
sdk/python/svm/code_interpreter.py:233listCodeContexts(): Promise<Context[]>The kernel contexts running in this sandbox.
Returns Promise<Context[]>
sdk/typescript/src/sandbox.ts:309func (s *Sandbox) ListCodeContexts(ctx context.Context) ([]Context, error)ListCodeContexts returns the sandbox’s kernel contexts.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns ([]Context, error)
sdk/go/interpreter.go:320def list_code_contextsThe sandbox’s running kernels.
Source:sdk/ruby/lib/svm/code_interpreter.rb:202public List<Context> listCodeContexts()The sandbox’s running interpreter contexts.
Returns List<Context>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:605list_snapshots()
Section titled “list_snapshots()”def list_snapshots(cls, *, source_sandbox_id: str | None=None, client: 'SandboxClient | None'=None) -> list[dict[str, Any]]SandboxExtrasThe caller’s snapshots, optionally only those of one sandbox.
| Parameter | Type | Default |
|---|---|---|
source_sandbox_id |
str | None |
None |
client |
'SandboxClient | None' |
None |
Returns list[dict[str, Any]]
sdk/python/svm/sandbox_extras.py:264static listSnapshots(sourceSandboxId?: string, client: SandboxClient = new SandboxClient()): Promise<Array<Record<string, unknown>>>Snapshots of the account, or of one source sandbox.
| Parameter | Type | Default |
|---|---|---|
sourceSandboxId |
string |
optional |
client |
SandboxClient |
new SandboxClient() |
Returns Promise<Array<Record<string, unknown>>>
sdk/typescript/src/sandbox.ts:257func (s *Sandbox) ListSnapshots(ctx context.Context) ([]map[string]any, error)ListSnapshots returns this sandbox’s snapshots (those taken of it), every page.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns ([]map[string]any, error)
sdk/go/sandbox_extras.go:272def self.list_snapshots(client: Client.new, source_sandbox_id: nil)| Parameter | Type | Default |
|---|---|---|
client |
Client.new |
|
source_sandbox_id |
nil |
sdk/ruby/lib/svm/sandbox.rb:195public static List<Map<String, Object>> listSnapshots(Client client)| Parameter | Type | Default |
|---|---|---|
client |
Client |
Returns List<Map<String, Object>>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:564lspProperty (read-only).
Completions, definitions, references and diagnostics from a language server in the sandbox.
lsp: LanguageServersProperty (read-only).
Completions, definitions, references and diagnostics from a language server in the sandbox.
func (s *Sandbox) LSP() *LanguageServersLSP returns completions, definitions, references and diagnostics from a language server in the sandbox.
Returns *LanguageServers
sdk/go/guest_tools.go:56def lspCompletions, definitions, references and diagnostics from a language server in the sandbox.
Source:sdk/ruby/lib/svm/mcp_approvals.rb:62public LanguageServers lsp()Completions, definitions, references and diagnostics from a language server in the sandbox.
Returns LanguageServers
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:251mcp_approvals()
Section titled “mcp_approvals()”mcp_approvalsProperty (read-only).
Decide tool calls the MCP gateway holds for approval, and read its audit log (INT-010).
mcpApprovals: McpApprovalsProperty (read-only).
Decide tool calls the MCP gateway holds for approval, and read its audit log (INT-010).
func (s *Sandbox) MCPApprovals() *MCPApprovalsMCPApprovals decides tool calls the MCP gateway holds for approval and reads its audit log (INT-010).
Returns *MCPApprovals
sdk/go/guest_tools.go:59def mcp_approvalssdk/ruby/lib/svm/mcp_approvals.rb:63public McpApprovals mcpApprovals()Returns McpApprovals
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:253metrics()
Section titled “metrics()”metricsProperty (read-only).
The sandbox’s own CPU, memory, disk and process figures (see MetricsClient).
metrics: MetricsClientProperty (read-only).
The sandbox’s own CPU, memory, disk and process figures.
func (s *Sandbox) Metrics() (*MetricsClient, error)Metrics returns the sandbox’s metrics client.
Returns (*MetricsClient, error)
sdk/go/envd_extra.go:41def metricssdk/ruby/lib/svm/sandbox.rb:208public MetricsClient metrics()Returns MetricsClient
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:259open_tunnel()
Section titled “open_tunnel()”def open_tunnel(self, port: int)A raw TCP tunnel to port inside the sandbox (see Tunnel).
| Parameter | Type | Default |
|---|---|---|
port |
int |
sdk/python/svm/sandbox.py:448async openTunnel(port: number): Promise<import("./tunnel-node.js").Tunnel>A raw TCP tunnel to port inside the sandbox over a WebSocket (Node only; see Tunnel).
| Parameter | Type | Default |
|---|---|---|
port |
number |
Returns Promise<import("./tunnel-node.js").Tunnel>
sdk/typescript/src/sandbox.ts:167func (s *Sandbox) OpenTunnel(ctx context.Context, port int) (*Tunnel, error)OpenTunnel opens a raw TCP tunnel to port inside the sandbox (openSandboxTunnel: GET /v2/sandboxes/{sandbox_id}/tunnel/{port}). The data-plane edge upgrades the request to a WebSocket whose binary messages carry the TCP byte stream.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
port |
int |
Returns (*Tunnel, error)
sdk/go/rest_stream.go:254def open_tunnel(port)A byte tunnel to a TCP port inside the sandbox (the port must be 1..65535).
| Parameter | Type | Default |
|---|---|---|
port |
sdk/ruby/lib/svm/streams.rb:227public Tunnel openTunnel(int port)A byte tunnel to a TCP port inside the sandbox (1..65535), over a WebSocket.
| Parameter | Type | Default |
|---|---|---|
port |
int |
Returns Tunnel
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:301otel_export()
Section titled “otel_export()”def otel_export(self) -> dict[str, Any]SandboxExtrasThe OpenTelemetry export in force for this sandbox: its own, or the team’s (scope). Header values are never returned.
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:187otelExport(): Promise<unknown>The OpenTelemetry export in force for this sandbox: its own, or the team’s (scope).
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:235func (s *Sandbox) OtelExport(ctx context.Context) (map[string]any, error)OtelExport returns the OpenTelemetry export in force for the sandbox: its own, or the team’s (scope).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:115def otel_exportsdk/ruby/lib/svm/sandbox_extras.rb:41public Map<String, Object> otelExport()SandboxHelpersReturns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:53pause()
Section titled “pause()”def pause(self, *, wait: bool=False, mode: str | None=None, request_timeout: float | None=None) -> SandboxInfoPause the sandbox. mode="memory" (the default) keeps memory and disk; mode="filesystem" keeps only the disk (written to the object store), so the sandbox reboots when it resumes and a request to its URL does not wake it.
| Parameter | Type | Default |
|---|---|---|
wait |
bool |
False |
mode |
str | None |
None |
request_timeout |
float | None |
None |
Returns SandboxInfo
sdk/python/svm/sandbox.py:491async pause(wait = false, mode?: PauseMode): Promise<SandboxInfo>mode is what the pause keeps: memory (the default) memory and disk, filesystem only the disk, so the sandbox reboots when it resumes.
| Parameter | Type | Default |
|---|---|---|
wait |
boolean |
false |
mode |
PauseMode |
optional |
Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:374func (s *Sandbox) Pause(ctx context.Context, options PauseSandboxOptions) (SandboxInfo, error)Pause pauses a sandbox; see PauseSandboxOptions for what it keeps and whether to wait until the pause is durable.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
options |
PauseSandboxOptions |
Returns (SandboxInfo, error)
sdk/go/sandbox.go:475def pause(wait: false, mode: nil)mode is what the pause keeps: “memory” (the default) memory and disk, “filesystem” only the disk (in the object store), so the sandbox reboots when it resumes and a request to its URL does not wake it.
| Parameter | Type | Default |
|---|---|---|
wait |
false |
|
mode |
nil |
sdk/ruby/lib/svm/sandbox.rb:110public Map<String, Object> pause(boolean wait)public Map<String, Object> pause(boolean wait, String mode)Pauses the sandbox. mode is what the pause keeps: "memory" (the default, also for null) memory and disk, "filesystem" only the disk (in the object store), so the sandbox reboots when it resumes and a request to its URL does not wake it.
| Parameter | Type | Default |
|---|---|---|
wait |
boolean |
|
mode |
String |
optional |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:399ports()
Section titled “ports()”portsProperty (read-only).
The ports listening in the sandbox and TCP forwards to them (see PortClient).
ports: PortClientProperty (read-only).
The ports listening in the sandbox and TCP forwards to them.
func (s *Sandbox) Ports() (*PortClient, error)Ports returns the sandbox’s port client.
Returns (*PortClient, error)
sdk/go/envd_extra.go:98def portssdk/ruby/lib/svm/sandbox.rb:209public PortClient ports()Returns PortClient
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:260private_network()
Section titled “private_network()”def private_network(self) -> dict[str, Any]SandboxExtrasThis sandbox’s name and address on its team’s private network, and its teammates with reachable (same host only).
Create the sandbox with private_network=True to join; otherwise this raises NotFoundError.
Returns dict[str, Any]
Raises NotFoundError
sdk/python/svm/sandbox_extras.py:166privateNetwork(): Promise<unknown>This sandbox’s name and address on its team’s private network, and its teammates with reachable (same host only). Create it with privateNetwork: true to join.
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:226func (s *Sandbox) PrivateNetwork(ctx context.Context) (map[string]any, error)PrivateNetwork returns this sandbox’s name and address on its team’s private network and its teammates, each with Reachable (same host only). A sandbox created without PrivateNetwork gets a not-found error.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:90def private_networksdk/ruby/lib/svm/sandbox_extras.rb:27public Map<String, Object> privateNetwork()SandboxHelpersReturns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:40ptyProperty (read-only).
pty: PtyClientProperty (read-only).
func (s *Sandbox) Pty() (*PtyClient, error)Pty returns the sandbox’s terminal client.
Returns (*PtyClient, error)
sdk/go/pty.go:16def ptysdk/ruby/lib/svm/sandbox.rb:207public PtyClient pty()Interactive shells on a PTY.
Returns PtyClient
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:258record_tool_call()
Section titled “record_tool_call()”def record_tool_call(self, name: str, *, started_at: datetime | str, duration_ms: int, run_id: str | None=None, call_id: str | None=None, status: str='ok', error_type: str | None=None, model: str | None=None, input_tokens: int | None=None, output_tokens: int | None=None, cost_usd: float | None=None, effect_ids: list[str] | None=None, tool_type: str | None=None, attributes: dict[str, str] | None=None) -> dict[str, Any]SandboxExtrasReport a tool call the agent made in its own process as a GenAI execute_tool span in this sandbox’s trace, with the run, its tokens and cost, and the effects-ledger ids it caused. exported in the result is False when no export is in force.
| Parameter | Type | Default |
|---|---|---|
name |
str |
|
started_at |
datetime | str |
|
duration_ms |
int |
|
run_id |
str | None |
None |
call_id |
str | None |
None |
status |
str |
'ok' |
error_type |
str | None |
None |
model |
str | None |
None |
input_tokens |
int | None |
None |
output_tokens |
int | None |
None |
cost_usd |
float | None |
None |
effect_ids |
list[str] | None |
None |
tool_type |
str | None |
None |
attributes |
dict[str, str] | None |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:205recordToolCall(call: ToolCallReport): Promise<{ trace_id: string; span_id: string; exported: boolean }>Report an agent tool call as a GenAI execute_tool span in this sandbox’s trace.
| Parameter | Type | Default |
|---|---|---|
call |
ToolCallReport |
Returns Promise<{ trace_id: string; span_id: string; exported: boolean }>
sdk/typescript/src/sandbox.ts:239func (s *Sandbox) RecordToolCall(ctx context.Context, c ToolCallReport) (map[string]any, error)RecordToolCall reports a tool call the agent made in its own process as a GenAI execute_tool span in the sandbox’s trace, with its run, tokens, cost and the effects-ledger ids it caused. exported is false when no export is in force.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
c |
ToolCallReport |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:164def record_tool_call(name:, started_at:, duration_ms:, failed: false, run_id: nil, call_id: nil, error_type: nil, model: nil, type: nil, input_tokens: nil, output_tokens: nil, cost_usd: nil, effect_ids: nil, attributes: nil)Records one tool call the agent made in this sandbox (a span in its trace, and its cost).
| Parameter | Type | Default |
|---|---|---|
name |
||
started_at |
||
duration_ms |
||
failed |
false |
|
run_id |
nil |
|
call_id |
nil |
|
error_type |
nil |
|
model |
nil |
|
type |
nil |
|
input_tokens |
nil |
|
output_tokens |
nil |
|
cost_usd |
nil |
|
effect_ids |
nil |
|
attributes |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:49public Map<String, Object> recordToolCall(ToolCall c)SandboxHelpers| Parameter | Type | Default |
|---|---|---|
c |
ToolCall |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:71refresh_access()
Section titled “refresh_access()”def refresh_access(self) -> SandboxAccessFetch the data-plane access again now, through the sandbox’s connect call. The clients do this on their own when the sandbox rejects the token (and shortly before expires_at when there is one). The platform re-issues the sandbox’s current token, so the result is usually the same token: only a resume rotates it, and it ends with the sandbox. Today the access carries no expires_at (None): the token has no fixed lifetime. A changed token is not a sign the refresh worked, nor an unchanged one that it failed.
Returns SandboxAccess
sdk/python/svm/sandbox.py:228async refreshAccess(): Promise<SandboxAccess>Fetch the data-plane access again now, through the sandbox’s connect call. The clients do this on their own when the sandbox rejects the token (and shortly before expires_at when there is one). The platform re-issues the sandbox’s current token, so the result is usually the same token: only a resume rotates it, and it ends with the sandbox. Today the access carries no expires_at: the token has no fixed lifetime.
Returns Promise<SandboxAccess>
sdk/typescript/src/sandbox.ts:133func (s *Sandbox) RefreshAccess(ctx context.Context) errorRefreshAccess fetches the data-plane access again now, through the sandbox’s connect call. The clients do this on their own when the sandbox rejects the token (and shortly before ExpiresAt when there is one). The platform re-issues the sandbox’s current token, so it is usually the same token: only a resume rotates it, and it ends with the sandbox. Today the access carries no expires_at (the token has no fixed lifetime); Access() holds what was fetched.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
Returns error
sdk/go/access.go:223def refresh_accessFetches the data-plane access again now, through the sandbox’s connect call, and returns it. The platform re-issues the sandbox’s current token, so it is usually the same token: only a resume rotates it, and it ends with the sandbox. Today the access carries no “expires_at” (the token has no fixed lifetime).
Raises SandboxError
sdk/ruby/lib/svm/sandbox.rb:227public Map<String, Object> refreshAccess()Fetches the data-plane access again now, through the sandbox’s connect call. The platform re-issues the sandbox’s current token, so it is usually the same token: only a resume rotates it, and it ends with the sandbox. Today the access carries no expires_at (the token has no fixed lifetime).
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:318remove_code_context()
Section titled “remove_code_context()”def remove_code_context(self, context: Union[Context, str]) -> NoneCodeInterpreterMixin| Parameter | Type | Default |
|---|---|---|
context |
Union[Context, str] |
sdk/python/svm/code_interpreter.py:244removeCodeContext(context: Context | string): Promise<void>Stop a context’s kernel and remove it.
| Parameter | Type | Default |
|---|---|---|
context |
Context | string |
sdk/typescript/src/sandbox.ts:313func (s *Sandbox) RemoveCodeContext(ctx context.Context, contextID string) errorRemoveCodeContext stops and deletes a context.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
contextID |
string |
Returns error
sdk/go/interpreter.go:353def remove_code_context(context)| Parameter | Type | Default |
|---|---|---|
context |
sdk/ruby/lib/svm/code_interpreter.rb:213public void removeCodeContext(Context context)public void removeCodeContext(String contextId)Stops a context; its state is gone.
| Parameter | Type | Default |
|---|---|---|
context |
Context |
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:613restart_code_context()
Section titled “restart_code_context()”def restart_code_context(self, context: Union[Context, str]) -> ContextCodeInterpreterMixin| Parameter | Type | Default |
|---|---|---|
context |
Union[Context, str] |
Returns Context
sdk/python/svm/code_interpreter.py:237restartCodeContext(context: Context | string): Promise<Context>Restart a context’s kernel; its variables are gone.
| Parameter | Type | Default |
|---|---|---|
context |
Context | string |
Returns Promise<Context>
sdk/typescript/src/sandbox.ts:311func (s *Sandbox) RestartCodeContext(ctx context.Context, contextID string) (Context, error)RestartCodeContext replaces a context’s kernel with a fresh one; the id stays and its variables are gone.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
contextID |
string |
Returns (Context, error)
sdk/go/interpreter.go:345def restart_code_context(context)Replaces a context’s kernel with a fresh one (its variables are gone).
| Parameter | Type | Default |
|---|---|---|
context |
sdk/ruby/lib/svm/code_interpreter.rb:207public Context restartCodeContext(Context context)public Context restartCodeContext(String contextId)Replaces a context’s kernel with a fresh one; the id stays.
| Parameter | Type | Default |
|---|---|---|
context |
Context |
Returns Context
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:608restore_backup()
Section titled “restore_backup()”def restore_backup(self, backup: dict[str, Any], *, directory: str | None=None, request_timeout: float | None=600.0) -> dict[str, Any]SandboxExtrasUnpack a backup into directory (the directory it was taken from by default), after checking its SHA-256.
| Parameter | Type | Default |
|---|---|---|
backup |
dict[str, Any] |
|
directory |
str | None |
None |
request_timeout |
float | None |
600.0 |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:157restoreBackup(backup: SandboxBackup, directory?: string): Promise<Record<string, unknown>>Unpack a backup into directory (the one it was taken from by default), after checking its SHA-256.
| Parameter | Type | Default |
|---|---|---|
backup |
SandboxBackup |
|
directory |
string |
optional |
Returns Promise<Record<string, unknown>>
sdk/typescript/src/sandbox.ts:222func (s *Sandbox) RestoreBackup(ctx context.Context, backup SandboxBackup, directory string) (map[string]any, error)RestoreBackup unpacks a backup into directory (the one it was taken from when empty) after checking its SHA-256.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
backup |
SandboxBackup |
|
directory |
string |
Returns (map[string]any, error)
sdk/go/volume.go:323def restore_backup(backup, directory: nil)Unpacks a backup (as #backup returned it) into directory (the one it was taken from by default) after checking its SHA-256.
| Parameter | Type | Default |
|---|---|---|
backup |
||
directory |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:109public Map<String, Object> restoreBackup(Map<String, Object> backup, String directory)SandboxHelpersUnpacks a backup (as backup returned it) into directory (the one it was taken from when null) after checking its SHA-256.
| Parameter | Type | Default |
|---|---|---|
backup |
Map<String, Object> |
|
directory |
String |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:117resume()
Section titled “resume()”def resume(self, *, timeout_seconds: int | None=None, on_resume: str | None=None, wait: bool=True, request_timeout: float | None=None) -> SandboxInfoResume a paused sandbox; on_resume is as for connect.
| Parameter | Type | Default |
|---|---|---|
timeout_seconds |
int | None |
None |
on_resume |
str | None |
None |
wait |
bool |
True |
request_timeout |
float | None |
None |
Returns SandboxInfo
sdk/python/svm/sandbox.py:505async resume(timeoutSeconds?: number, wait = true, onResume?: OnResume): Promise<SandboxInfo>onResume is as for connect.
| Parameter | Type | Default |
|---|---|---|
timeoutSeconds |
number |
optional |
wait |
boolean |
true |
onResume |
OnResume |
optional |
Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:384func (s *Sandbox) Resume(ctx context.Context, options ConnectSandboxOptions) (SandboxInfo, error)Resume resumes a paused sandbox, rotates its data-plane credentials and returns once it is running (the API answers when the resume is accepted; calls made before the sandbox runs were refused as “access denied”).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
options |
ConnectSandboxOptions |
Returns (SandboxInfo, error)
sdk/go/sandbox.go:493def resume(timeout_seconds: nil, on_resume: nil, wait: true)on_resume is as for Sandbox.connect.
| Parameter | Type | Default |
|---|---|---|
timeout_seconds |
nil |
|
on_resume |
nil |
|
wait |
true |
sdk/ruby/lib/svm/sandbox.rb:119public Map<String, Object> resume(boolean wait)public Map<String, Object> resume(boolean wait, String onResume)Resumes the sandbox; onResume is as for connect(Client, String, String).
| Parameter | Type | Default |
|---|---|---|
wait |
boolean |
|
onResume |
String |
optional |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:415resume_body()
Section titled “resume_body()”Not in the Python SDK’s Sandbox.
Not in the TypeScript SDK’s Sandbox.
Not in the Go SDK’s Sandbox.
def self.resume_body(timeout_seconds, on_resume)| Parameter | Type | Default |
|---|---|---|
timeout_seconds |
||
on_resume |
sdk/ruby/lib/svm/sandbox.rb:76Not in the Java SDK’s Sandbox.
rollout()
Section titled “rollout()”def rollout(self, n: int, **options: Any) -> 'Rollout'SandboxExtrasFan this sandbox out into n branches, run a command in each and score it: rollouts.create(self, n, ...) with the same options (command or script, verifier, keep, wait, …). The command’s stdout reaches a command or script verifier on its stdin (a script also has it in $SVM_STDOUT).
| Parameter | Type | Default |
|---|---|---|
n |
int |
|
options |
Any |
optional |
Returns 'Rollout'
sdk/python/svm/sandbox_extras.py:342rollout(n: number, options: Omit<CreateRolloutOptions, "client">): Promise<Rollout>Fork this sandbox into n branches, run one command in each, score it and keep the best (see rollouts.create); the command’s stdout reaches a command or script verifier on its stdin (a script also has it in $SVM_STDOUT).
| Parameter | Type | Default |
|---|---|---|
n |
number |
|
options |
Omit<CreateRolloutOptions, "client"> |
Returns Promise<Rollout>
sdk/typescript/src/sandbox.ts:293func (s *Sandbox) Rollout(ctx context.Context, n int, opts RolloutOptions) (*Rollout, error)Rollout fans this sandbox out into n branches and runs opts in each (see the package’s rollout notes). The create forks the sandbox, which waits like Fork (five minutes unless ctx ends sooner); the client’s own Timeout must allow it too. The command’s stdout reaches a command or script verifier on its stdin (a script also has it in $SVM_STDOUT).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
n |
int |
|
opts |
RolloutOptions |
Returns (*Rollout, error)
sdk/go/rollouts.go:164def rollout(count, **options)Forks count branches of this sandbox, runs a command or script in each and scores it (see Rollout.create); the command’s stdout reaches a command or script verifier on its stdin (a script also has it in $SVM_STDOUT).
| Parameter | Type | Default |
|---|---|---|
count |
||
**options |
optional |
sdk/ruby/lib/svm/rollouts.rb:93public Rollout rollout(int count, Rollout.Options options)Forks count branches, runs a command or script in each and scores it (see Rollout and its verifiers).
| Parameter | Type | Default |
|---|---|---|
count |
int |
|
options |
Rollout.Options |
Returns Rollout
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:228run_code()
Section titled “run_code()”def run_code(self, code: str, language: Optional[str]=None, context: Optional[Union[Context, str]]=None, on_stdout: Optional[Callable[[OutputMessage], Any]]=None, on_stderr: Optional[Callable[[OutputMessage], Any]]=None, on_result: Optional[Callable[[Result], Any]]=None, on_error: Optional[Callable[[ExecutionError], Any]]=None, envs: Optional[Dict[str, str]]=None, timeout: Optional[float]=None, request_timeout: Optional[float]=None) -> ExecutionCodeInterpreterMixinRun code in a stateful kernel and return its Execution (results, logs, error). Without context it runs in the sandbox’s default context for language (python by default); envs runs it in a scratch context with those variables. The on_* handlers see output as it arrives. Raises ExecutionTimeoutError after timeout seconds (60 by default).
| Parameter | Type | Default |
|---|---|---|
code |
str |
|
language |
Optional[str] |
None |
context |
Optional[Union[Context, str]] |
None |
on_stdout |
Optional[Callable[[OutputMessage], Any]] |
None |
on_stderr |
Optional[Callable[[OutputMessage], Any]] |
None |
on_result |
Optional[Callable[[Result], Any]] |
None |
on_error |
Optional[Callable[[ExecutionError], Any]] |
None |
envs |
Optional[Dict[str, str]] |
None |
timeout |
Optional[float] |
None |
request_timeout |
Optional[float] |
None |
Returns Execution
Raises CodeInterpreterError, ExecutionTimeoutError
sdk/python/svm/code_interpreter.py:201runCode(code: string, options: RunCodeOptions = {}): Promise<Execution>Run code in a stateful kernel and resolve to its Execution (results, logs, error). Without context it runs in this sandbox’s default context for language (python unless given), which keeps its variables between calls; onStdout/onStderr see output as it arrives. Create the sandbox from a template that carries the language’s kernel (code-interpreter-all for Python).
| Parameter | Type | Default |
|---|---|---|
code |
string |
|
options |
RunCodeOptions |
{} |
Returns Promise<Execution>
sdk/typescript/src/sandbox.ts:303func (s *Sandbox) RunCode(ctx context.Context, code string, options ...RunCodeOptions) (Execution, error)RunCode runs code in a stateful kernel and returns its Execution (results, logs, error). A cell the kernel interrupted at its timeout returns the Execution with an *ExecutionTimeoutError; the client’s HTTP timeout does not cut a cell still within its own.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
code |
string |
|
options |
...RunCodeOptions |
optional |
Returns (Execution, error)
Raises ExecutionTimeoutError
sdk/go/interpreter.go:424def run_code(code, language: nil, context: nil, on_stdout: nil, on_stderr: nil, on_result: nil, on_error: nil, envs: nil, timeout: nil, request_timeout: nil)Runs code and returns a CodeInterpreter::Execution. With context (a CodeInterpreter::Context or its id) the cell runs in that kernel and sees its variables. Without one it runs in the sandbox’s default context for language (python by default): one per language, kept between calls and found again by a second handle of the same sandbox. envs runs it in a scratch context with those variables instead, removed afterwards. on_stdout and on_stderr get each CodeInterpreter::OutputMessage as the cell prints it, on_result each result and on_error the error. timeout (seconds, default 60) bounds the cell: past it ExecutionTimeoutError is raised.
| Parameter | Type | Default |
|---|---|---|
code |
||
language |
nil |
|
context |
nil |
|
on_stdout |
nil |
|
on_stderr |
nil |
|
on_result |
nil |
|
on_error |
nil |
|
envs |
nil |
|
timeout |
nil |
|
request_timeout |
nil |
Raises CodeInterpreterError, ExecutionTimeoutError
sdk/ruby/lib/svm/code_interpreter.rb:154public Execution runCode(String code)public Execution runCode(String code, String language)public Execution runCode(String code, Context context)public Execution runCode(String code, RunCodeOptions options)Runs code in the sandbox’s default python context and returns its Execution (results, logs, error).
| Parameter | Type | Default |
|---|---|---|
code |
String |
|
language |
String |
optional |
Returns Execution
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:578sessions()
Section titled “sessions()”sessionsProperty (read-only).
Persistent shell sessions that keep the working directory and exports between runs.
sessions: SessionsProperty (read-only).
Persistent shell sessions that keep the working directory and exports between runs.
func (s *Sandbox) Sessions() *SessionsSessions returns persistent shell sessions that keep the working directory and exports between runs.
Returns *Sessions
sdk/go/guest_tools.go:50def sessionsThe guest helpers run their commands over the data plane.
Source:sdk/ruby/lib/svm/guest_tools.rb:173public GuestTools.Sessions sessions()Returns GuestTools.Sessions
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:233set_egress_proxy()
Section titled “set_egress_proxy()”def set_egress_proxy(self, mode: str, *, url: str | None=None, username: str | None=None, password: str | None=None, identity_audience: str | None=None) -> dict[str, Any]SandboxExtrasSend allowed egress through the customer’s proxy (mode="proxy", url="http://host:port"), directly ("none"), or as the team says ("inherit"). Applies while layer-7 egress rules are enabled.
| Parameter | Type | Default |
|---|---|---|
mode |
str |
|
url |
str | None |
None |
username |
str | None |
None |
password |
str | None |
None |
identity_audience |
str | None |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:246setEgressProxy(settings: EgressProxySettings): Promise<unknown>Send allowed egress through the customer’s proxy, directly (none), or as the team says (inherit).
| Parameter | Type | Default |
|---|---|---|
settings |
EgressProxySettings |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:252func (s *Sandbox) SetEgressProxy(ctx context.Context, settings EgressProxySettings) (map[string]any, error)SetEgressProxy sends the sandbox’s allowed egress through the customer’s proxy; it applies while layer-7 egress rules are on.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
settings |
EgressProxySettings |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:243def set_egress_proxy(mode:, url: nil, username: nil, password: nil, identity_audience: nil)mode is “inherit” (the team’s setting), “none” or “proxy”; url, username, password and identity_audience go with “proxy”.
| Parameter | Type | Default |
|---|---|---|
mode |
||
url |
nil |
|
username |
nil |
|
password |
nil |
|
identity_audience |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:79public Map<String, Object> setEgressProxy(String mode, String url, String username, String password, String identityAudience)SandboxHelpersmode is “inherit” (the team’s setting), “none” or “proxy”; url, username, password and identityAudience go with “proxy” (null leaves one out).
| Parameter | Type | Default |
|---|---|---|
mode |
String |
|
url |
String |
|
username |
String |
|
password |
String |
|
identityAudience |
String |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:107set_lifecycle()
Section titled “set_lifecycle()”def set_lifecycle(self, *, auto_stop_seconds: int | None=None, auto_archive_seconds: int | None=None, auto_delete_seconds: int | None=None, on_timeout: str | None=None, auto_resume: bool | None=None, request_timeout: float | None=None) -> SandboxInfoReplace the sandbox’s lifecycle timers; a timer left out is turned off. A new auto-stop timer is the deadline from now. on_timeout ("pause" or "kill") is what reaching the deadline does, and auto_resume whether a request to the paused sandbox’s public URL wakes it; unlike the timers, a value left out is left as it is.
| Parameter | Type | Default |
|---|---|---|
auto_stop_seconds |
int | None |
None |
auto_archive_seconds |
int | None |
None |
auto_delete_seconds |
int | None |
None |
on_timeout |
str | None |
None |
auto_resume |
bool | None |
None |
request_timeout |
float | None |
None |
Returns SandboxInfo
sdk/python/svm/sandbox.py:475async setLifecycle(timers: LifecycleTimers): Promise<SandboxInfo>Replace the lifecycle timers; a timer left out is turned off. A new auto-stop timer is the deadline from now. onTimeout and autoResume are not timers: a value left out is left as it is.
| Parameter | Type | Default |
|---|---|---|
timers |
LifecycleTimers |
Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:330func (s *Sandbox) SetLifecycle(ctx context.Context, timers LifecycleTimers) (SandboxInfo, error)SetLifecycle replaces the sandbox’s lifecycle timers; a nil timer is turned off. A new auto-stop timer is the deadline from now. OnTimeout and AutoResume are not timers: left empty (nil) they stay as they are.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
timers |
LifecycleTimers |
Returns (SandboxInfo, error)
sdk/go/sandbox.go:448def set_lifecycle(auto_stop_seconds: nil, auto_archive_seconds: nil, auto_delete_seconds: nil, on_timeout: nil, auto_resume: nil)Replaces the lifecycle timers; a nil timer is turned off. A new auto-stop timer is the deadline from now. on_timeout (“pause” or “kill”) is what reaching the deadline does and auto_resume whether a request to the paused sandbox’s URL wakes it; unlike the timers, a nil one is left as it is.
| Parameter | Type | Default |
|---|---|---|
auto_stop_seconds |
nil |
|
auto_archive_seconds |
nil |
|
auto_delete_seconds |
nil |
|
on_timeout |
nil |
|
auto_resume |
nil |
sdk/ruby/lib/svm/sandbox_extras.rb:21public Map<String, Object> setLifecycle(Integer autoStopSeconds, Integer autoArchiveSeconds, Integer autoDeleteSeconds)public Map<String, Object> setLifecycle(Integer autoStopSeconds, Integer autoArchiveSeconds, Integer autoDeleteSeconds, String onTimeout, Boolean autoResume)SandboxHelpersReplaces the lifecycle timers; a null timer is turned off. A new auto-stop timer is the deadline from now.
| Parameter | Type | Default |
|---|---|---|
autoStopSeconds |
Integer |
|
autoArchiveSeconds |
Integer |
|
autoDeleteSeconds |
Integer |
|
onTimeout |
String |
optional |
autoResume |
Boolean |
optional |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:24set_otel_export()
Section titled “set_otel_export()”def set_otel_export(self, endpoint: str | None=None, *, headers: dict[str, str] | None=None, service_name: str | None=None, enabled: bool=True) -> dict[str, Any]SandboxExtrasSend this sandbox’s spans (lifecycle, commands, files, and GenAI execute_tool spans for tool calls) to an OTLP/HTTP collector, overriding the team’s export. headers=None keeps the headers already set; enabled=False turns export off for this sandbox.
| Parameter | Type | Default |
|---|---|---|
endpoint |
str | None |
None |
headers |
dict[str, str] | None |
None |
service_name |
str | None |
None |
enabled |
bool |
True |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:191setOtelExport(options: OtelExportOptions): Promise<unknown>Send this sandbox’s spans to an OTLP/HTTP collector, overriding the team’s export.
| Parameter | Type | Default |
|---|---|---|
options |
OtelExportOptions |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:237func (s *Sandbox) SetOtelExport(ctx context.Context, o OtelExportOptions) (map[string]any, error)SetOtelExport sends the sandbox’s spans (lifecycle, commands, files, and GenAI execute_tool spans for tool calls) to an OTLP/HTTP collector, overriding the team’s export.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
o |
OtelExportOptions |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:130def set_otel_export(endpoint: nil, headers: nil, service_name: nil, disabled: false)| Parameter | Type | Default |
|---|---|---|
endpoint |
nil |
|
headers |
nil |
|
service_name |
nil |
|
disabled |
false |
sdk/ruby/lib/svm/sandbox_extras.rb:43public Map<String, Object> setOtelExport(String endpoint, Map<String, String> headers, String serviceName, boolean disabled)SandboxHelpers| Parameter | Type | Default |
|---|---|---|
endpoint |
String |
|
headers |
Map<String, String> |
|
serviceName |
String |
|
disabled |
boolean |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:55set_timeout()
Section titled “set_timeout()”def set_timeout(self, timeout_seconds: int, *, request_timeout: float | None=None) -> SandboxInfoSet the remaining lifetime from now; this can move the deadline earlier or later.
| Parameter | Type | Default |
|---|---|---|
timeout_seconds |
int |
|
request_timeout |
float | None |
None |
Returns SandboxInfo
sdk/python/svm/sandbox.py:467async setTimeout(timeoutSeconds: number): Promise<SandboxInfo>Set the remaining lifetime from now; this can move the deadline earlier or later.
| Parameter | Type | Default |
|---|---|---|
timeoutSeconds |
number |
Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:321func (s *Sandbox) SetTimeout(ctx context.Context, seconds int) (SandboxInfo, error)SetTimeout sets the remaining lifetime from now; this can move the deadline earlier or later.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
seconds |
int |
Returns (SandboxInfo, error)
sdk/go/sandbox.go:460def set_timeout(seconds)Set the remaining lifetime from now; this can move the deadline earlier or later.
| Parameter | Type | Default |
|---|---|---|
seconds |
sdk/ruby/lib/svm/sandbox.rb:104public Map<String, Object> setTimeout(int seconds)Sets the remaining lifetime from now; this can move the deadline earlier or later.
| Parameter | Type | Default |
|---|---|---|
seconds |
int |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:394state()
Section titled “state()”state: strProperty (read-only).
state: SandboxInfo["state"]Property (read-only).
Not in the Go SDK’s Sandbox.
def statesdk/ruby/lib/svm/sandbox.rb:84public String state()Returns String
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:181terminals()
Section titled “terminals()”terminalsProperty (read-only).
Long-lived tmux-style terminals an agent can type into and read.
terminals: TerminalsProperty (read-only).
Long-lived tmux-style terminals an agent can type into and read.
func (s *Sandbox) Terminals() *TerminalsTerminals returns long-lived tmux-style terminals an agent can type into and read.
Returns *Terminals
sdk/go/guest_tools.go:53def terminalssdk/ruby/lib/svm/guest_tools.rb:174public GuestTools.Terminals terminals()Returns GuestTools.Terminals
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:255tools()
Section titled “tools()”toolsProperty (read-only).
Token-cheap agent tools in the sandbox: view, search, repo_map, apply_patch and diagnostics, each with a budget.
tools: AgentToolsProperty (read-only).
Token-cheap agent tools in the sandbox: view, search, repoMap, applyPatch and diagnostics, each with a budget.
func (s *Sandbox) Tools(cwd string, cache *ToolCache) *AgentToolsTools returns the agent tools of a sandbox, optionally behind a cache.
| Parameter | Type | Default |
|---|---|---|
cwd |
string |
|
cache |
*ToolCache |
Returns *AgentTools
sdk/go/agent_tools.go:97def tools(cwd: nil, cache: nil)The agent tools, optionally behind a ToolCache.
| Parameter | Type | Default |
|---|---|---|
cwd |
nil |
|
cache |
nil |
sdk/ruby/lib/svm/agent_tools.rb:156public AgentTools tools(String cwd, ToolCache cache)The agent tools, optionally behind a ToolCache.
| Parameter | Type | Default |
|---|---|---|
cwd |
String |
|
cache |
ToolCache |
Returns AgentTools
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:236update_egress()
Section titled “update_egress()”def update_egress(self, *, enabled: bool, default: str, rules: list[dict[str, Any]] | None=None) -> dict[str, Any]SandboxExtrasReplace the layer-7 egress rules; applies within a second, without a restart. Each rule names action and one of domain and cidr, narrowed by port, methods, path and headers. An allow rule may carry "inject": Secret.inject(name, headers) (or Secret.iam_token(audience).inject(headers)): the egress proxy then replaces the placeholder (Secret.fill(name)) in those headers of the HTTPS requests the rule allows with the team secret or a fresh identity token of the sandbox. It works only while enabled, never over plain HTTP, and needs a current server.
| Parameter | Type | Default |
|---|---|---|
enabled |
bool |
|
default |
str |
|
rules |
list[dict[str, Any]] | None |
None |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:139updateEgress(rules: { enabled: boolean; default: "allow" | "deny"; rules?: Array<Record<string, unknown>> }): Promise<unknown>Replace the layer-7 egress rules; applies within a second, without a restart.
| Parameter | Type | Default |
|---|---|---|
rules |
{ enabled: boolean; default: "allow" | "deny"; rules?: Array<Record<string, unknown>> } |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:216func (s *Sandbox) UpdateEgress(ctx context.Context, enabled bool, defaultAction string, rules []EgressRule) (map[string]any, error)UpdateEgress replaces the layer-7 egress rules; they apply within a second, without a restart. defaultAction is “allow” or “deny”. An allow rule may carry Inject (SecretInject, IamToken.Inject), which swaps a placeholder for a team secret or an identity token in the HTTPS requests the rule allows; it works only while enabled.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
enabled |
bool |
|
defaultAction |
string |
|
rules |
[]EgressRule |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:81def update_egress(enabled:, default:, rules: [])Replace the layer-7 egress rules; applies within a second, without a restart, e.g. update_egress(enabled: true, default: “deny”, rules: [{ action: “allow”, domain: “api.github.com”, methods: [“GET”] }]). An allow rule may carry <tt>inject: Secret.inject(name, headers)</tt> (or <tt>Secret.iam_token(audience).inject(headers)</tt>): the egress proxy then replaces the placeholder (Secret.fill(name)) in those headers of the HTTPS requests the rule allows with the team secret or a fresh identity token of the sandbox. It works only while enabled, never over plain HTTP, and needs a current server.
| Parameter | Type | Default |
|---|---|---|
enabled |
||
default |
||
rules |
[] |
sdk/ruby/lib/svm/sandbox.rb:143public Map<String, Object> updateEgress(Map<String, Object> rules)Replace the layer-7 egress rules (enabled, default, rules); applies within a second, without a restart. An allow rule may carry "inject": Secret.inject or IamToken.inject, which swaps a placeholder for a team secret or an identity token in the HTTPS requests the rule allows; it works only while enabled.
| Parameter | Type | Default |
|---|---|---|
rules |
Map<String, Object> |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:440update_inbound()
Section titled “update_inbound()”def update_inbound(self, allow_cidrs: list[str]) -> dict[str, Any]SandboxExtrasAdmit only these client networks to the public URLs and custom domains; others get 403. [] opens them again. The edge applies a change within about 2 seconds (it caches the allowlist that long), so a request sent at once may still see the old list.
| Parameter | Type | Default |
|---|---|---|
allow_cidrs |
list[str] |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:177updateInbound(allowCidrs: string[]): Promise<unknown>Admit only these client networks to the public URLs and custom domains; others get 403. [] opens them again. The edge applies a change within about 2 seconds (it caches the allowlist that long), so a request sent at once may still see the old list.
| Parameter | Type | Default |
|---|---|---|
allowCidrs |
string[] |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:231func (s *Sandbox) UpdateInbound(ctx context.Context, allowCIDRs []string) (map[string]any, error)UpdateInbound admits only these client networks (CIDRs or addresses) to the public URLs and custom domains; others get 403. An empty list opens them again. The edge applies a change within about 2 seconds (it caches the allowlist that long), so a request sent at once may still see the old list.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
allowCIDRs |
[]string |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:102def update_inbound(allow_cidrs)Replaces the inbound allowlist (CIDRs that may reach the sandbox’s public URLs). The edge applies a change within about 2 seconds (it caches the allowlist that long), so a request sent at once may still see the old list.
| Parameter | Type | Default |
|---|---|---|
allow_cidrs |
sdk/ruby/lib/svm/sandbox_extras.rb:32public Map<String, Object> updateInbound(List<String> allowCidrs)SandboxHelpersReplaces the inbound allowlist (CIDRs that may reach the sandbox’s public URLs). The edge applies a change within about 2 seconds (it caches the allowlist that long), so a request sent at once may still see the old list.
| Parameter | Type | Default |
|---|---|---|
allowCidrs |
List<String> |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:48update_network()
Section titled “update_network()”def update_network(self, **policy: Any) -> dict[str, Any]SandboxExtrasChange the egress policy of the running sandbox, e.g. allow_internet_access=True or deny_out=[...].
| Parameter | Type | Default |
|---|---|---|
policy |
Any |
optional |
Returns dict[str, Any]
sdk/python/svm/sandbox_extras.py:131updateNetwork(policy: Record<string, unknown>): Promise<unknown>Replace the egress policy of the running sandbox, e.g. { allow_internet_access: true }.
| Parameter | Type | Default |
|---|---|---|
policy |
Record<string, unknown> |
Returns Promise<unknown>
sdk/typescript/src/sandbox.ts:212func (s *Sandbox) UpdateNetwork(ctx context.Context, policy map[string]any) (map[string]any, error)UpdateNetwork replaces the egress policy of the running sandbox, e.g. {“allow_internet_access”: true}.
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
policy |
map[string]any |
Returns (map[string]any, error)
sdk/go/sandbox_extras.go:49def update_network(**policy)Replace the egress policy, e.g. update_network(allow_internet_access: true).
| Parameter | Type | Default |
|---|---|---|
**policy |
optional |
sdk/ruby/lib/svm/sandbox.rb:129public Map<String, Object> updateNetwork(Map<String, Object> policy)Replace the egress policy, e.g. Map.of("allow_internet_access", true).
| Parameter | Type | Default |
|---|---|---|
policy |
Map<String, Object> |
Returns Map<String, Object>
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:428wait_until_running()
Section titled “wait_until_running()”def wait_until_running(self, timeout: float=120.0, interval: float=0.05) -> SandboxInfoSandboxExtrasPoll until the sandbox is running; raises TimeoutError if it is not within timeout seconds or has ended.
| Parameter | Type | Default |
|---|---|---|
timeout |
float |
120.0 |
interval |
float |
0.05 |
Returns SandboxInfo
Raises TimeoutError
sdk/python/svm/sandbox_extras.py:116waitUntilRunning(timeoutMs?: number, intervalMs?: number): Promise<SandboxInfo>| Parameter | Type | Default |
|---|---|---|
timeoutMs |
number |
optional |
intervalMs |
number |
optional |
Returns Promise<SandboxInfo>
sdk/typescript/src/sandbox.ts:208func (s *Sandbox) WaitUntilRunning(ctx context.Context, timeout time.Duration) (SandboxInfo, error)WaitUntilRunning polls until the sandbox is running, it has ended, or timeout passes (default 2 minutes).
| Parameter | Type | Default |
|---|---|---|
ctx |
context.Context |
|
timeout |
time.Duration |
Returns (SandboxInfo, error)
sdk/go/sandbox_extras.go:21def wait_until_running(timeout: 120, interval: 0.25)| Parameter | Type | Default |
|---|---|---|
timeout |
120 |
|
interval |
0.25 |
Raises SandboxError, TimeoutError
sdk/ruby/lib/svm/sandbox.rb:92public Map<String, Object> waitUntilRunning(Duration timeout)| Parameter | Type | Default |
|---|---|---|
timeout |
Duration |
Returns Map<String, Object>
Raises SandboxException, TimeoutException
sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:382with()
Section titled “with()”Not in the Python SDK’s Sandbox.
Not in the TypeScript SDK’s Sandbox.
Not in the Go SDK’s Sandbox.
def with+sandbox.with { |sb| … }+ kills the sandbox afterwards (Ruby’s take on a context manager).
Source:sdk/ruby/lib/svm/sandbox.rb:243Not in the Java SDK’s Sandbox.
SandboxInfo
Section titled “SandboxInfo”SandboxInfo contains non-secret lifecycle metadata.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
end_at |
str |
|
failure |
dict[str, str] | None |
|
gpu |
str | None |
|
lifecycle |
dict[str, Any] | None |
|
metadata |
dict[str, str] |
|
name |
str | None |
|
private_network |
dict[str, str] | None |
|
profile |
str | None |
|
raw |
dict[str, Any] |
|
sandbox_id |
str |
|
started_at |
str |
|
state |
str |
|
template_id |
str |
| Property | Type | Description |
|---|---|---|
endAt |
string |
|
gpu |
string |
|
lifecycle |
SandboxLifecycle |
The sandbox’s lifecycle policy, where it has one. |
metadata |
Record<string, string> |
|
name |
string |
The sandbox’s name, unique among the team’s live sandboxes (API-018). |
privateNetwork |
{ hostname: string; address: string } |
The sandbox’s name and address on its team’s private network, when it joined one. |
profile |
string |
|
raw |
Readonly<Record<string, unknown>> |
Additional server fields are preserved while the v2 contract evolves. |
sandboxId |
string |
|
startedAt |
string |
|
state |
SandboxState |
|
templateId |
string |
| Property | Type | Description |
|---|---|---|
Alias |
string |
|
AutoPause |
bool |
|
CPUCount |
int |
|
DiskMB |
int |
|
EndAt |
string |
|
EnvdVersion |
string |
|
Failure |
*SandboxFailure |
Failure says why, when the sandbox failed or the host refused its last resume (it is then paused). |
GPU |
string |
|
Lifecycle |
*SandboxLifecycle |
|
MemoryMB |
int |
|
Metadata |
map[string]string |
|
Name |
string |
Name and Lifecycle are the sandbox’s name and lifecycle policy, where it has them. |
PrivateNetwork |
*PrivateAddress |
PrivateNetwork is its name and address on the team’s private network, when it joined one. |
Profile |
string |
|
Region |
string |
|
SandboxID |
string |
|
Secure |
bool |
|
StartedAt |
string |
|
State |
SandboxState |
|
TemplateID |
string |
Not in the Ruby SDK.
Not in the Java SDK.
from_json()
Section titled “from_json()”def from_json(cls, value: dict[str, Any]) -> 'SandboxInfo'| Parameter | Type | Default |
|---|---|---|
value |
dict[str, Any] |
Returns 'SandboxInfo'
sdk/python/svm/sandbox_types.py:86Not in the TypeScript SDK’s SandboxInfo.
Not in the Go SDK’s SandboxInfo.
Not in the Ruby SDK.
Not in the Java SDK.
os: str | NoneProperty (read-only).
Guest OS derived from the server’s explicit VMM profile; unknown stays unknown.
os: "linux" | "windows"Property.
Derived from the explicit profile, not guessed from a template name.
func (i SandboxInfo) OS() stringOS is the guest OS the sandbox’s VMM profile names: “windows”, “linux”, or “” when the profile does not say.
Returns string
sdk/go/sandbox.go:79Not in the Ruby SDK.
Not in the Java SDK.
SandboxPage
Section titled “SandboxPage”SandboxPage is one control-plane page of sandbox records.
Not in the Python SDK’s SandboxPage.
Not in the TypeScript SDK’s SandboxPage.
Not in the Go SDK’s SandboxPage.
Not in the Ruby SDK.
public T get(int index)| Parameter | Type | Default |
|---|---|---|
index |
int |
Returns T
sdk/java/src/main/java/dev/svm/sandbox/SandboxPage.java:28has_next_page()
Section titled “has_next_page()”Not in the Python SDK’s SandboxPage.
Not in the TypeScript SDK’s SandboxPage.
Not in the Go SDK’s SandboxPage.
Not in the Ruby SDK.
public boolean hasNextPage()Whether another page follows.
Returns boolean
sdk/java/src/main/java/dev/svm/sandbox/SandboxPage.java:26items()
Section titled “items()”items: list[T]Property (read-only).
items: T[]Property.
Items: []SandboxInfoProperty.
Not in the Ruby SDK.
public List<T> items()The items of this page.
Returns List<T>
sdk/java/src/main/java/dev/svm/sandbox/SandboxPage.java:20next_page_token()
Section titled “next_page_token()”next_page_token: str | NoneProperty (read-only).
nextPageToken: stringProperty.
NextPageToken: stringProperty.
Not in the Ruby SDK.
public String nextPageToken()The token of the next page, or null when this is the last page.
Returns String
sdk/java/src/main/java/dev/svm/sandbox/SandboxPage.java:23size()
Section titled “size()”Not in the Python SDK’s SandboxPage.
Not in the TypeScript SDK’s SandboxPage.
Not in the Go SDK’s SandboxPage.
Not in the Ruby SDK.
public int size()Returns int
sdk/java/src/main/java/dev/svm/sandbox/SandboxPage.java:30SandboxAccess
Section titled “SandboxAccess”SandboxAccess holds one-time, short-lived data-plane credentials.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
data_plane_url |
str |
|
domain |
str |
|
envd_access_token |
str | None |
|
expires_at |
str | None |
|
git_config |
str | None |
|
traffic_access_token |
str | None |
| Property | Type | Description |
|---|---|---|
dataPlaneUrl |
string |
|
domain |
string |
|
envdAccessToken |
string |
|
expiresAt |
string |
|
gitConfig |
string |
One-time scoped git config returned when the sandbox was created with git credentials (INT-009). |
trafficAccessToken |
string |
| Property | Type | Description |
|---|---|---|
DataPlaneURL |
string |
|
Domain |
string |
|
EnvdAccessToken |
string |
|
ExpiresAt |
string |
|
GitConfig |
string |
GitConfig is the one-time scoped git configuration returned when the sandbox was created with GitCredentials. |
TrafficAccessToken |
string |
TrafficAccessToken authorizes requests to the sandbox’s public URLs, including the MCP gateway URL that Client.GetSandboxMcpGateway returns: send it in the X-Traffic-Access-Token header (an Authorization: Bearer header gets 401). |
Not in the Ruby SDK.
Not in the Java SDK.
from_json()
Section titled “from_json()”def from_json(cls, value: dict[str, Any]) -> 'SandboxAccess'| Parameter | Type | Default |
|---|---|---|
value |
dict[str, Any] |
Returns 'SandboxAccess'
sdk/python/svm/sandbox_types.py:45Not in the TypeScript SDK’s SandboxAccess.
Not in the Go SDK’s SandboxAccess.
Not in the Ruby SDK.
Not in the Java SDK.
marshal_json()
Section titled “marshal_json()”Not in the Python SDK’s SandboxAccess.
Not in the TypeScript SDK’s SandboxAccess.
func (a SandboxAccess) MarshalJSON() ([]byte, error)MarshalJSON intentionally omits short-lived credentials.
Returns ([]byte, error)
sdk/go/sandbox.go:172Not in the Ruby SDK.
Not in the Java SDK.
AccessHandle
Section titled “AccessHandle”Current data-plane access for one sandbox. refresh fetches a new SandboxAccess (the sandbox’s connect call).
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
access |
SandboxAccess |
The access to use now, replaced first when it is within skew seconds of expiring. |
Not in the TypeScript SDK.
Not in the Go SDK.
| Property | Type | Description |
|---|---|---|
headers |
The API client’s proxy (a URI or nil) and extra headers, for every data-plane call. | |
proxy |
The API client’s proxy (a URI or nil) and extra headers, for every data-plane call. |
Not in the Java SDK.
initialize()
Section titled “initialize()”Not in the Python SDK’s AccessHandle.
Not in the TypeScript SDK.
Not in the Go SDK.
def initialize(access, fetch = nil, skew: 30, now: -> { Time.now }, proxy: nil, headers: {})| Parameter | Type | Default |
|---|---|---|
access |
||
fetch |
nil |
|
skew |
30 |
|
now |
-> { Time.now } |
|
proxy |
nil |
|
headers |
{} |
sdk/ruby/lib/svm/envd.rb:53Not in the Java SDK.
metadata()
Section titled “metadata()”def metadata(self) -> tupleReturns tuple
sdk/python/svm/access.py:64Not in the TypeScript SDK.
Not in the Go SDK.
Not in the Ruby SDK’s AccessHandle.
Not in the Java SDK.
refresh()
Section titled “refresh()”Not in the Python SDK’s AccessHandle.
Not in the TypeScript SDK.
Not in the Go SDK.
def refreshsdk/ruby/lib/svm/envd.rb:76Not in the Java SDK.
secrets()
Section titled “secrets()”def secrets(self) -> tuple[str, ...]Returns tuple[str, ...]
sdk/python/svm/access.py:68Not in the TypeScript SDK.
Not in the Go SDK.
def secretssdk/ruby/lib/svm/envd.rb:72Not in the Java SDK.
token()
Section titled “token()”Not in the Python SDK’s AccessHandle.
Not in the TypeScript SDK.
Not in the Go SDK.
def tokensdk/ruby/lib/svm/envd.rb:64Not in the Java SDK.
unauthenticated()
Section titled “unauthenticated()”def unauthenticated(self, error: grpc.RpcError) -> boolWhether error was the sandbox rejecting the token and the call may run again.
The first rejection of a token is retried with the same token after a short wait: a resume, a connect or a rotation mints a token just before the first call and the edge may not have seen it yet (it re-reads a changed record at most every 40 ms). Only a second rejection fetches a new token, which replaces (and so invalidates) the one every other caller holds, so it is the last resort and not the first.
| Parameter | Type | Default |
|---|---|---|
error |
grpc.RpcError |
Returns bool
sdk/python/svm/access.py:78Not in the TypeScript SDK.
Not in the Go SDK.
def unauthenticated?(error)Whether error was the sandbox rejecting the token and a new one is now in place, so the call may run again.
| Parameter | Type | Default |
|---|---|---|
error |
sdk/ruby/lib/svm/envd.rb:82Not in the Java SDK.
unauthenticated_refresh()
Section titled “unauthenticated_refresh()”def unauthenticated_refresh(self) -> boolFetch a new access now; whether the token changed.
Returns bool
sdk/python/svm/access.py:71Not in the TypeScript SDK.
Not in the Go SDK.
Not in the Ruby SDK’s AccessHandle.
Not in the Java SDK.
Not in the Python SDK’s AccessHandle.
Not in the TypeScript SDK.
Not in the Go SDK.
def urlsdk/ruby/lib/svm/envd.rb:62Not in the Java SDK.