Skip to content

Commit 601367f

Browse files
committed
Remove persistence beta labels and update API methods to GA
Persistence is no longer in beta. Remove all beta notes, rename betaPause/beta_pause to pause, betaCreate/beta_create to Sandbox.create, and rename "Limitations while in beta" to "Limitations".
1 parent ff59ade commit 601367f

3 files changed

Lines changed: 21 additions & 27 deletions

File tree

docs/agents/openclaw.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ This sandbox is created with a 10-minute timeout and auto-pause enabled — afte
394394
```typescript JavaScript & TypeScript
395395
import { Sandbox } from 'e2b'
396396

397-
const sandbox = await Sandbox.betaCreate('openclaw', {
397+
const sandbox = await Sandbox.create('openclaw', {
398398
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
399399
autoPause: true,
400400
timeoutMs: 10 * 60 * 1000,
@@ -412,7 +412,7 @@ console.log(`Sandbox ID: ${sandbox.sandboxId}`)
412412
import os
413413
from e2b import Sandbox
414414

415-
sandbox = Sandbox.beta_create("openclaw", envs={
415+
sandbox = Sandbox.create("openclaw", envs={
416416
"ANTHROPIC_API_KEY": os.environ["ANTHROPIC_API_KEY"],
417417
}, auto_pause=True, timeout=10 * 60)
418418

docs/agents/opencode.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ OpenCode includes a [headless HTTP server](https://opencode.ai/docs/server/) tha
120120
import { Sandbox } from 'e2b'
121121
import { createOpencodeClient } from '@opencode-ai/sdk'
122122

123-
const sandbox = await Sandbox.betaCreate('opencode', {
123+
const sandbox = await Sandbox.create('opencode', {
124124
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
125125
autoPause: true,
126126
timeoutMs: 10 * 60 * 1000,
@@ -166,7 +166,7 @@ import time
166166
import requests
167167
from e2b import Sandbox
168168

169-
sandbox = Sandbox.beta_create("opencode", envs={
169+
sandbox = Sandbox.create("opencode", envs={
170170
"ANTHROPIC_API_KEY": os.environ["ANTHROPIC_API_KEY"],
171171
}, auto_pause=True, timeout=10 * 60)
172172

docs/sandbox/persistence.mdx

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ title: "Sandbox persistence"
33
sidebarTitle: Persistence
44
---
55

6-
<Note>
7-
Some persistence features (auto-pause) are in beta. See [limitations](#limitations-while-in-beta) for details.
8-
</Note>
9-
106
The sandbox persistence allows you to pause your sandbox and resume it later from the same state it was in when you paused it.
117

128
This includes not only state of the sandbox's filesystem but also the sandbox's memory. This means all running processes, loaded variables, data, etc.
@@ -48,7 +44,7 @@ import { Sandbox } from '@e2b/code-interpreter'
4844
const sandbox = await Sandbox.create() // Starts in Running state
4945

5046
// Pause the sandbox
51-
await sandbox.betaPause() // Running → Paused
47+
await sandbox.pause() // Running → Paused
5248

5349
// Resume the sandbox
5450
await sandbox.connect() // Running/Paused → Running
@@ -63,7 +59,7 @@ from e2b_code_interpreter import Sandbox
6359
sandbox = Sandbox.create() # Starts in Running state
6460

6561
# Pause the sandbox
66-
sandbox.betaPause() # Running → Paused
62+
sandbox.pause() # Running → Paused
6763

6864
# Resume the sandbox
6965
sandbox.connect() # Running/Paused → Running
@@ -85,7 +81,7 @@ console.log('Sandbox created', sbx.sandboxId)
8581

8682
// Pause the sandbox
8783
// You can save the sandbox ID in your database to resume the sandbox later
88-
await sbx.betaPause()
84+
await sbx.pause()
8985
console.log('Sandbox paused', sbx.sandboxId)
9086
```
9187
```python Python highlight={8-9}
@@ -96,7 +92,7 @@ print('Sandbox created', sbx.sandbox_id)
9692

9793
# Pause the sandbox
9894
# You can save the sandbox ID in your database to resume the sandbox later
99-
sbx.beta_pause()
95+
sbx.pause()
10096
print('Sandbox paused', sbx.sandbox_id)
10197
```
10298
</CodeGroup>
@@ -115,7 +111,7 @@ console.log('Sandbox created', sbx.sandboxId)
115111

116112
// Pause the sandbox
117113
// You can save the sandbox ID in your database to resume the sandbox later
118-
await sbx.betaPause()
114+
await sbx.pause()
119115
console.log('Sandbox paused', sbx.sandboxId)
120116

121117
// Connect to the sandbox (it will automatically resume the sandbox, if paused)
@@ -130,7 +126,7 @@ print('Sandbox created', sbx.sandbox_id)
130126

131127
# Pause the sandbox
132128
# You can save the sandbox ID in your database to resume the sandbox later
133-
sbx.beta_pause()
129+
sbx.pause()
134130
print('Sandbox paused', sbx.sandbox_id)
135131

136132
# Connect to the sandbox (it will automatically resume the sandbox, if paused)
@@ -188,7 +184,7 @@ console.log('Sandbox created', sbx.sandboxId)
188184

189185
// Pause the sandbox
190186
// You can save the sandbox ID in your database to resume the sandbox later
191-
await sbx.betaPause()
187+
await sbx.pause()
192188

193189
// Remove the sandbox
194190
await sbx.kill()
@@ -202,7 +198,7 @@ from e2b_code_interpreter import Sandbox
202198
sbx = Sandbox.create()
203199

204200
# Pause the sandbox
205-
sbx.beta_pause()
201+
sbx.pause()
206202

207203
# Remove the sandbox
208204
sbx.kill()
@@ -229,9 +225,7 @@ sbx = Sandbox.connect(sandbox_id, timeout=60) # 60 seconds
229225
</CodeGroup>
230226

231227

232-
### Auto-pause (beta)
233-
234-
**Note: Auto-pause is currently in beta and available through `Sandbox.betaCreate()`/`Sandbox.beta_create()` method.**
228+
### Auto-pause
235229

236230
Sandboxes automatically pause when they've been idle, preserving their full state. You can resume at any time from exactly where you left off. The default inactivity period is 10 minutes — configure it with the `timeoutMs`/`timeout` parameter.
237231

@@ -240,16 +234,16 @@ Sandboxes automatically pause when they've been idle, preserving their full stat
240234
import { Sandbox } from '@e2b/code-interpreter'
241235

242236
// Create sandbox with auto-pause enabled
243-
const sandbox = await Sandbox.betaCreate({
237+
const sandbox = await Sandbox.create({
244238
autoPause: true,
245239
timeoutMs: 10 * 60 * 1000 // Optional: change the default timeout (10 minutes)
246240
})
247241
```
248242
```python Python
249243
from e2b_code_interpreter import Sandbox
250244

251-
# Create sandbox with auto-pause enabled (Beta)
252-
sandbox = Sandbox.beta_create(
245+
# Create sandbox with auto-pause enabled
246+
sandbox = Sandbox.create(
253247
auto_pause=True, # Auto-pause after the sandbox times out
254248
timeout=10 * 60, # Optional: change the default timeout (10 minutes)
255249
)
@@ -264,16 +258,16 @@ If you `.kill()` the sandbox, it will be permanently deleted and you won't be ab
264258
```js JavaScript & TypeScript
265259
import { Sandbox } from '@e2b/code-interpreter'
266260

267-
// Create sandbox with auto-pause enabled (Beta)
268-
const sandbox = await Sandbox.betaCreate({
261+
// Create sandbox with auto-pause enabled
262+
const sandbox = await Sandbox.create({
269263
autoPause: true // Auto-pause after the sandbox times out
270264
})
271265
```
272266
```python Python
273267
from e2b_code_interpreter import Sandbox
274268

275-
# Create sandbox with auto-pause enabled (Beta)
276-
sandbox = Sandbox.beta_create(
269+
# Create sandbox with auto-pause enabled
270+
sandbox = Sandbox.create(
277271
auto_pause=True # Auto-pause after the sandbox times out
278272
)
279273
```
@@ -284,7 +278,7 @@ If you have a service (for example a server) running inside your sandbox and you
284278
If you resume the sandbox, the service will be accessible again but you need to connect clients again.
285279

286280

287-
## Limitations while in beta
281+
## Limitations
288282

289283
### Pause and resume performance
290284
- Pausing a sandbox takes approximately **4 seconds per 1 GiB of RAM**

0 commit comments

Comments
 (0)