Sandbox / SandboxForkOpts
Interface: SandboxForkOpts
Options for forking a sandbox.
Extends
ConnectionOpts
Properties
apiHeaders?
optionalapiHeaders?:Record<string,string>
Additional headers to send with AgentBox API requests.
Inherited from
ConnectionOpts.apiHeaders
apiKey?
optionalapiKey?:string
AgentBox API key to use for authentication.
Default
AGENTBOX_API_KEY // environment variableInherited from
ConnectionOpts.apiKey
count?
optionalcount?:number
Number of forked sandboxes to create.
All forks boot from the same snapshot — the snapshot is captured once regardless of count. Each fork succeeds or fails independently; the outcome of each is reported in its entry of the returned array.
Default
1domain?
optionaldomain?:string
Domain to use for the API.
Default
AGENTBOX_DOMAIN // environment variable or agentbox-runtime.ru
Inherited from
ConnectionOpts.domain
logger?
optionallogger?:Logger
Logger to use for logging messages. It can accept any object that implements Logger interface—for example, console.
Inherited from
ConnectionOpts.logger
proxy?
optionalproxy?:string
Proxy URL to use for requests. In case of a sandbox it applies to all requests made to the returned sandbox.
Example
'http://user:pass@127.0.0.1:8080'Inherited from
ConnectionOpts.proxy
requestTimeoutMs?
optionalrequestTimeoutMs?:number
Timeout for requests to the API in milliseconds.
Default
60_000 // 60 secondsInherited from
ConnectionOpts.requestTimeoutMs
signal?
optionalsignal?:AbortSignal
An optional AbortSignal that can be used to cancel the in-flight request. When the signal is aborted, the underlying fetch is aborted and the returned promise rejects with an AbortError.
Inherited from
ConnectionOpts.signal
timeoutMs?
optionaltimeoutMs?:number
Timeout for the forked sandboxes in milliseconds. Maximum time a sandbox can be kept alive is 24 hours (86_400_000 milliseconds) for Pro users and 1 hour (3_600_000 milliseconds) for Hobby users.
Default
300_000 // 5 minutes