Skip to content

An open-source, faster Devin alternative

TypeScript

update docs

Brian Reardone7a8c6be428a
diff --git a/docs/api-reference/preview/create.mdx b/docs/api-reference/preview/create.mdx
index d9545385..91fd171c 100644
--- a/docs/api-reference/preview/create.mdx
+++ b/docs/api-reference/preview/create.mdx
@@ -26,7 +26,7 @@ Create a preview URL to expose a port from the sandbox.
{
"id": "pv-abc123",
"sandboxId": "sb-abc123",
- "hostname": "sb-abc123-p3000.preview.opencomputer.dev",
+ "hostname": "sb-abc123-p3000.workers.opencomputer.dev",
"port": 3000,
"sslStatus": "active",
"createdAt": "2025-01-15T10:30:00Z"
diff --git a/docs/api-reference/preview/list.mdx b/docs/api-reference/preview/list.mdx
index d4b56a41..532b85b6 100644
--- a/docs/api-reference/preview/list.mdx
+++ b/docs/api-reference/preview/list.mdx
@@ -15,7 +15,7 @@ List all preview URLs for a sandbox.
{
"id": "pv-abc123",
"sandboxId": "sb-abc123",
- "hostname": "sb-abc123-p3000.preview.opencomputer.dev",
+ "hostname": "sb-abc123-p3000.workers.opencomputer.dev",
"port": 3000,
"sslStatus": "active",
"createdAt": "2025-01-15T10:30:00Z"
diff --git a/docs/cli/preview.mdx b/docs/cli/preview.mdx
index f22ce664..a72f356b 100644
--- a/docs/cli/preview.mdx
+++ b/docs/cli/preview.mdx
@@ -9,7 +9,7 @@ Create a public HTTPS URL that proxies traffic to a port inside your sandbox:
```bash
oc preview create sb-abc123 --port 3000
-# → hostname: sb-abc123-p3000.preview.opencomputer.dev
+# → hostname: sb-abc123-p3000.workers.opencomputer.dev
```
## Sharing a Dev Server
@@ -37,8 +37,8 @@ oc preview create sb-abc123 --port 8080 # API server
oc preview list sb-abc123
# PORT HOSTNAME SSL CREATED
-# 3000 sb-abc123-p3000.preview.opencomputer.dev active ...
-# 8080 sb-abc123-p8080.preview.opencomputer.dev active ...
+# 3000 sb-abc123-p3000.workers.opencomputer.dev active ...
+# 8080 sb-abc123-p8080.workers.opencomputer.dev active ...
```
## Custom Domains
diff --git a/docs/cli/sandbox.mdx b/docs/cli/sandbox.mdx
index 6a4a5d8f..c2b3e6ad 100644
--- a/docs/cli/sandbox.mdx
+++ b/docs/cli/sandbox.mdx
@@ -5,7 +5,7 @@ description: "Create, manage, and control sandbox lifecycles from the CLI"
## Creating a Sandbox
-`oc create` (shortcut for `oc sandbox create`) provisions a new Firecracker microVM:
+`oc create` (shortcut for `oc sandbox create`) provisions a new sandbox VM:
```bash
oc create
diff --git a/docs/how-it-works.mdx b/docs/how-it-works.mdx
index 6a1786ac..eac5f601 100644
--- a/docs/how-it-works.mdx
+++ b/docs/how-it-works.mdx
@@ -3,24 +3,24 @@ title: "How It Works"
description: "Architecture and key technical decisions"
---
-Your code talks to a **control plane** API, which provisions a Firecracker microVM on a worker node. Commands, file operations, and agent sessions run inside that VM — events and I/O stream back over WebSocket. The control plane transparently proxies data-plane requests to the correct worker.
+Your code talks to a **control plane** API, which provisions a virtual machine on a worker node. Commands, file operations, and agent sessions run inside that VM — events and I/O stream back over WebSocket. The control plane transparently proxies data-plane requests to the correct worker.
SDK users only need an API key. The SDK handles routing automatically.
<Steps>
<Step title="Create">
- Your code calls the control plane (`X-API-Key` auth). A Firecracker microVM boots in ~150ms.
+ Your code calls the control plane (`X-API-Key` auth). A VM boots from a golden snapshot in ~300ms.
</Step>
<Step title="Operate">
Run commands, read/write files, start agent sessions. All execution happens inside the VM. The control plane routes requests to the correct worker automatically.
</Step>
</Steps>
-## Firecracker microVMs
+## Virtual Machines
Each sandbox is a real virtual machine with its own Linux kernel, memory, and disk. Isolation is hardware-level (KVM), not namespace-based like containers.
-Why not containers? Containers share a kernel. A kernel exploit in one container compromises every other container on the host. Firecracker VMs eliminate that attack surface entirely — the same isolation model that powers AWS Lambda.
+Why not containers? Containers share a kernel. A kernel exploit in one container compromises every other container on the host. KVM-based VMs eliminate that attack surface entirely.
## Hibernation
diff --git a/docs/introduction.mdx b/docs/introduction.mdx
index 01ca7721..6e141075 100644
--- a/docs/introduction.mdx
+++ b/docs/introduction.mdx
@@ -3,7 +3,7 @@ title: "Introduction"
description: "Cloud sandboxes for AI agents"
---
-OpenComputer gives your AI agents a full Linux VM in the cloud. Each sandbox is an isolated Firecracker microVM with its own filesystem, network, and process space — persistent, long-running, and capable of hibernating when idle. Run Claude inside a sandbox and it can write files, install packages, run commands, and build complete projects autonomously.
+OpenComputer gives your AI agents a full Linux VM in the cloud. Each sandbox is an isolated virtual machine with its own filesystem, network, and process space — persistent, long-running, and capable of hibernating when idle. Run Claude inside a sandbox and it can write files, install packages, run commands, and build complete projects autonomously.
<CardGroup cols={2}>
<Card title="Claude Agent SDK built in" icon="robot">
@@ -16,7 +16,7 @@ OpenComputer gives your AI agents a full Linux VM in the cloud. Each sandbox is
Named snapshots you can fork from. Try five approaches in parallel from the same starting point — like git branches for VMs.
</Card>
<Card title="Full Linux VM" icon="server">
- Not a container. Real VM with its own kernel, memory, and disk. Hardware-level isolation via Firecracker — the same technology behind AWS Lambda.
+ Not a container. Real VM with its own kernel, memory, and disk. Hardware-level isolation via KVM.
</Card>
</CardGroup>
@@ -87,7 +87,7 @@ await sandbox.kill()
Working agent in 2 minutes
</Card>
<Card title="How It Works" icon="microchip" href="/how-it-works">
- Architecture: Firecracker VMs, hibernation, checkpoints
+ Architecture: VMs, hibernation, checkpoints
</Card>
<Card title="Agents" icon="robot" href="/agents/overview">
Run Claude inside sandboxes
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index 58b67d20..48020fa3 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -75,7 +75,7 @@ asyncio.run(main())
## What Just Happened
-You created a cloud VM (Firecracker microVM), ran Claude inside it with bash and file tools, and Claude autonomously scaffolded a Next.js app, installed dependencies, and started the dev server. Events streamed back to your code in real-time over WebSocket. The preview URL exposes the running dev server to the internet.
+You created a cloud VM, ran Claude inside it with bash and file tools, and Claude autonomously scaffolded a Next.js app, installed dependencies, and started the dev server. Events streamed back to your code in real-time over WebSocket. The preview URL exposes the running dev server to the internet.
## Next Steps
diff --git a/docs/reference/typescript-sdk/sandbox.mdx b/docs/reference/typescript-sdk/sandbox.mdx
index 52166fc7..c5fa26b7 100644
--- a/docs/reference/typescript-sdk/sandbox.mdx
+++ b/docs/reference/typescript-sdk/sandbox.mdx
@@ -34,11 +34,15 @@ Create a new sandbox. [HTTP API →](/api-reference/sandboxes/create)
</ParamField>
<ParamField body="cpuCount" type="number">
- CPU cores (max 4)
+ CPU cores
</ParamField>
<ParamField body="memoryMB" type="number">
- Memory in MB (max 2048)
+ Memory in MB
+</ParamField>
+
+<ParamField body="secretStore" type="string">
+ Secret store name — resolves encrypted secrets and egress allowlist
</ParamField>
<ParamField body="image" type="Image">
@@ -209,6 +213,23 @@ Revert in-place to a checkpoint. [HTTP API →](/api-reference/checkpoints/resto
[HTTP API →](/api-reference/checkpoints/delete) — **Returns:** `Promise<void>`
+### `sandbox.getPreviewDomain(port)`
+
+Get the preview URL domain for a specific port. No API call — constructs the hostname locally.
+
+<ParamField body="port" type="number" required>
+ Port number
+</ParamField>
+
+**Returns:** `string` (e.g., `sb-abc123-p3000.workers.opencomputer.dev`)
+
+```typescript
+const domain = sandbox.getPreviewDomain(3000);
+console.log(`https://${domain}`);
+```
+
+---
+
### `sandbox.createPreviewURL(opts)`
[HTTP API →](/api-reference/preview/create)
@@ -247,6 +268,10 @@ Revert in-place to a checkpoint. [HTTP API →](/api-reference/checkpoints/resto
Current status (readonly)
</ParamField>
+<ParamField body="domain" type="string">
+ Preview URL domain for port 80 (e.g., `sb-abc123-p80.workers.opencomputer.dev`). Returns empty string if sandbox domain is not configured.
+</ParamField>
+
<ParamField body="agent" type="Agent">
[Agent sessions](/reference/typescript-sdk/agent)
</ParamField>
@@ -282,6 +307,7 @@ interface SandboxOpts {
metadata?: Record<string, string>;
cpuCount?: number;
memoryMB?: number;
+ secretStore?: string;
image?: Image;
snapshot?: string;
onBuildLog?: (log: string) => void;
diff --git a/docs/sandboxes/overview.mdx b/docs/sandboxes/overview.mdx
index e2a461f2..aa5fb778 100644
--- a/docs/sandboxes/overview.mdx
+++ b/docs/sandboxes/overview.mdx
@@ -75,13 +75,16 @@ curl -X POST https://app.opencomputer.dev/api/sandboxes \
| `timeout` | number | `300` | Idle timeout in seconds (resets on every operation) |
| `envs` | object | — | Environment variables set inside the VM |
| `metadata` | object | — | Arbitrary key-value pairs stored with the sandbox |
-| `cpuCount` | number | — | CPU cores (max 4). TypeScript and HTTP API only |
-| `memoryMB` | number | — | Memory in MB (max 2048). TypeScript and HTTP API only |
+| `cpuCount` | number | — | CPU cores. TypeScript and HTTP API only |
+| `memoryMB` | number | — | Memory in MB. TypeScript and HTTP API only |
+| `secretStore` | string | — | Secret store name — resolves encrypted secrets and egress allowlist |
+| `image` | Image | — | Declarative image definition (see [Templates](/sandboxes/templates)) |
+| `snapshot` | string | — | Name of a pre-built snapshot for instant boot |
| `apiKey` | string | — | Defaults to `OPENCOMPUTER_API_KEY` env var |
| `apiUrl` | string | — | Defaults to `OPENCOMPUTER_API_URL` env var |
<Note>
- `cpuCount` and `memoryMB` are not available in the Python SDK. Use the [HTTP API](/reference/api#sandbox-lifecycle) directly for custom resources from Python.
+ `cpuCount`, `memoryMB`, and `secretStore` are not available in the Python SDK. Use the [HTTP API](/reference/api#sandbox-lifecycle) directly for custom resources from Python.
</Note>
## Connecting to an Existing Sandbox
@@ -154,6 +157,7 @@ Content-Type: application/json
| --- | --- | --- | --- |
| Sandbox ID | `sandbox.sandboxId` | `sandbox.sandbox_id` | Unique identifier |
| Status | `sandbox.status` | `sandbox.status` | Current lifecycle state |
+| Domain | `sandbox.domain` | — | Preview URL domain for port 80 |
| Agent | `sandbox.agent` | `sandbox.agent` | [Agent sessions](/agents/overview) |
| Exec | `sandbox.exec` | `sandbox.exec` | [Command execution](/sandboxes/running-commands) |
| Files | `sandbox.files` | `sandbox.files` | [Filesystem](/sandboxes/working-with-files) |
diff --git a/docs/sandboxes/preview-urls.mdx b/docs/sandboxes/preview-urls.mdx
index a94adbdb..effc693e 100644
--- a/docs/sandboxes/preview-urls.mdx
+++ b/docs/sandboxes/preview-urls.mdx
@@ -3,7 +3,29 @@ title: "Preview URLs"
description: "Expose sandbox ports to the internet"
---
-A preview URL is a public HTTPS endpoint that routes traffic to a port inside your sandbox. Start a web server, create a preview URL, and share the link.
+A preview URL is a public HTTPS endpoint that routes traffic to a port inside your sandbox. Start a web server and access it immediately via the sandbox's domain.
+
+## Quick Access
+
+Every sandbox has a built-in `domain` property that gives you instant access to port 80 without creating a preview URL explicitly:
+
+```typescript
+const sandbox = await Sandbox.create();
+await sandbox.exec.run("python3 -m http.server 80 &");
+
+console.log(sandbox.domain);
+// → sb-abc123-p80.workers.opencomputer.dev
+
+// For other ports:
+console.log(sandbox.getPreviewDomain(3000));
+// → sb-abc123-p3000.workers.opencomputer.dev
+```
+
+The `domain` and `getPreviewDomain(port)` properties construct the preview hostname directly — no API call needed. Traffic is routed through the control plane proxy to the correct sandbox.
+
+## Explicit Preview URLs
+
+For tracking, custom domains, or auth configuration, use the preview URL API:
<CodeGroup>
@@ -15,7 +37,7 @@ await sandbox.exec.run("npx create-next-app@latest /app --yes", { timeout: 120 }
sandbox.exec.start("npm run dev -- --port 3000", { cwd: "/app" });
const preview = await sandbox.createPreviewURL({ port: 3000 });
-console.log(preview.hostname); // sb-abc123-p3000.preview.opencomputer.dev
+console.log(preview.hostname); // sb-abc123-p3000.workers.opencomputer.dev
```
```python Python
diff --git a/docs/sessions-api/messages.mdx b/docs/sessions-api/messages.mdx
index b6a910da..a64d6d78 100644
--- a/docs/sessions-api/messages.mdx
+++ b/docs/sessions-api/messages.mdx
@@ -40,7 +40,7 @@ Returns the full session object (same shape as [create](/sessions-api/sessions#c
"id": "session_abc123",
"status": "running",
"sandboxId": "sb-31317626",
- "previewUrl": "https://sb-31317626-p3000.preview.opencomputer.dev",
+ "previewUrl": "https://sb-31317626-p3000.workers.opencomputer.dev",
"project": {
"title": "Build a todo app",
"framework": "nextjs",
diff --git a/docs/sessions-api/overview.mdx b/docs/sessions-api/overview.mdx
index 5b2addab..8216021c 100644
--- a/docs/sessions-api/overview.mdx
+++ b/docs/sessions-api/overview.mdx
@@ -30,7 +30,7 @@ All endpoints that return sessions use this shape:
id: string; // "session_abc123"
status: "ready" | "running" | "error";
sandboxId: string | null; // "sb-31317626"
- previewUrl: string; // "https://sb-xxx-p3000.preview.opencomputer.dev"
+ previewUrl: string; // "https://sb-xxx-p3000.workers.opencomputer.dev"
userId: string;
project: {
title: string;
diff --git a/docs/sessions-api/sessions.mdx b/docs/sessions-api/sessions.mdx
index 90c2dc6b..a1141746 100644
--- a/docs/sessions-api/sessions.mdx
+++ b/docs/sessions-api/sessions.mdx
@@ -76,7 +76,7 @@ curl -X POST https://api.opencomputer.dev/v1/sessions \
"id": "session_abc123",
"status": "running",
"sandboxId": "sb-31317626",
- "previewUrl": "https://sb-31317626-p3000.preview.opencomputer.dev",
+ "previewUrl": "https://sb-31317626-p3000.workers.opencomputer.dev",
"project": {
"title": "Build a todo app",
"framework": "nextjs",