Developer reference
The pieces you touch when you build on Warpdrive: the engine's HTTP API, the Orchestrator manifest, how MCP servers reach an Instance, and what publishing to the Store involves. Everything here is drawn from the current source.
Pre-1.0, may change. Warpdrive is not at 1.0 yet. Routes, fields, and
file formats on this page can change between releases without a deprecation
period. A running engine documents its own routes at
/api/docs/ui, and that is always the version you are talking to.
What the engine is#
The engine is the program that runs Instances: it creates the container for each
one, runs agents and Orchestrators inside it, and streams what happens. The
Warpdrive CLI starts it, and the desktop app ships the same engine. It is an HTTP
API on port 7777.
warpdrive serve # headless engine on 127.0.0.1:7777
curl -s localhost:7777/api/health
In the API an Instance is a sandbox, so Instance routes live under
/api/sandboxes. The port can be moved with
WARPDRIVE_API_PORT.
How requests authenticate#
The engine does not have user accounts. It is protected by where it listens and, when it is shared, by one shared token:
- Local by default. It binds to
127.0.0.1, so only programs on the same computer can reach it. Browser requests are accepted only fromlocalhost,127.0.0.1, or[::1]origins. - Token when shared. If
WARPDRIVE_INTERNAL_API_TOKENis set, every request must send it in thex-warpdrive-internal-tokenheader. A missing or wrong token gets401with the codeINTERNAL_RUNTIME_TOKEN_REQUIRED. - No token, no network. Binding to anything other than loopback (with
WARPDRIVE_API_HOST) needs that token. Without it the engine refuses to start. - Hosted. A hosted engine is never exposed to browsers. The app reaches it through the authenticated Gateway.
Treat the port like a shell. Anyone who can call the engine can run commands in every Instance it hosts. Leave it on loopback, or set the token first.
GET /api/health always answers without a token, so monitors can check
that the engine is up.
Main routes#
These are the main routes. :id is the Instance id returned when the
Instance is created. GET /api/docs/routes lists every route.
Engine and discovery
| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Liveness, container runtime status, and engine version. |
GET | /api/capabilities | The providers and runtime options this build supports. |
GET | /api/docs/ui | Swagger UI built from the live route table. |
GET | /api/docs/routes | Every route as a flat list. |
GET | /api/events | Server-sent event stream for all Instances. ?filter= takes comma-separated patterns such as sandbox:*; ?since= resumes from a sequence number. |
Instances
| Method | Path | Purpose |
|---|---|---|
GET | /api/sandboxes | List Instances. |
POST | /api/sandboxes | Create an Instance. workspacePath is required; name, orchestrator ({ repo, branch? }), and mcpEnabled are optional. |
GET | /api/sandboxes/:id | Read one Instance. |
DELETE | /api/sandboxes/:id | Delete an Instance. |
GET | /api/sandboxes/:id/status | Current state of the Instance. |
POST | /api/sandboxes/:id/start | Start the Instance. |
POST | /api/sandboxes/:id/stop | Stop the Instance. |
POST | /api/sandboxes/:id/rebuild | Rebuild the Instance. |
POST | /api/sandboxes/:id/exec | Run a command, e.g. {"command":"ls /ws"}. |
GET | /api/sandboxes/:id/terminal | Interactive terminal over WebSocket. |
GET | /api/sandboxes/:id/events | Server-sent events for one Instance. |
GET | /api/sandboxes/:id/preview/urls | Preview addresses for servers running in the Instance. |
GET | /api/sandboxes/:id/providers/status | Which AI providers are set up in the Instance. |
Orchestrator
| Method | Path | Purpose |
|---|---|---|
POST | /api/sandboxes/:id/orchestrator/setup | Clone an Orchestrator repository and run its setup. Body: { repo, branch?, force? }. |
POST | /api/sandboxes/:id/orchestrator/pull-latest | Fetch new commits from the Orchestrator's repository. |
POST | /api/sandboxes/:id/orchestrator/refresh | Apply the fetched copy to the running Instance. Call pull-latest first to pick up new commits. |
GET | /api/sandboxes/:id/orchestrator/status | The Orchestrator's health and status sections. |
GET | /api/sandboxes/:id/orchestrator/actions | Actions declared in the manifest. |
POST | /api/sandboxes/:id/orchestrator/actions/:actionId | Run an action. |
GET | /api/sandboxes/:id/orchestrator/actions/runs | Recent action runs. |
POST | /api/sandboxes/:id/orchestrator/actions/runs/:actionRunId/cancel | Cancel a running action. |
GET | /api/sandboxes/:id/orchestrator/processes | Supervised processes and their state. |
GET | /api/sandboxes/:id/orchestrator/processes/:name/logs | Logs for one supervised process. |
MCP servers, snapshots, and settings
| Method | Path | Purpose |
|---|---|---|
GET | /api/sandboxes/:id/mcp/catalog | MCP servers this Instance can turn on. |
GET | /api/sandboxes/:id/mcp | MCP servers turned on for the Instance, and whether they are running. |
PATCH | /api/sandboxes/:id/mcp | Replace the Instance's MCP list: { "mcpEnabled": [ ... ] }. |
GET | /api/sandboxes/:id/snapshots | List snapshots. |
POST | /api/sandboxes/:id/snapshots | Take a snapshot. |
POST | /api/sandboxes/:id/snapshots/:snapshotId/restore | Restore a snapshot. |
GET | /api/config | Read engine settings. PATCH updates them. |
PUT | /api/config/environment/:name | Set an environment variable that Orchestrators can require. |
Internal routes
Some routes are not for you to call directly. POST /api/shutdown and
the image cleanup routes (POST /api/images/prune,
DELETE /api/images/:imageId) are for administering the engine. The
Orchestrator state routes under /api/orchestrator/state/* answer only
requests from inside an Instance. The Sealed App broker and shared-data routes
take a separate token for each App, so an App never holds the engine token.
Orchestrator manifest#
An Orchestrator lives in a Git repository. The engine clones the repository and
reads warpdrive.manifest.yml from its root. Scripts and schema
files named in the manifest are paths relative to that root. Point an Instance at
it with { "repo": "...", "branch": "..." }, either when you create the
Instance or with orchestrator/setup.
my-orchestrator/
├── warpdrive.manifest.yml # must sit at the repository root
└── scripts/
├── setup.sh
└── start-review.shA minimal manifest, with what each field does:
manifest: 3 # required. Only version 3 is accepted.
name: review-crew # required
description: One agent writes, one reviews
version: '0.1.0'
infrastructure:
requires: [bash, tmux, git] # commands the Instance must have
mcp: [serena] # MCP servers to start with the Instance
environment:
- name: GITHUB_TOKEN
required: true # every entry says whether it is required
description: Used to open pull requests
setup:
command: './scripts/setup.sh' # required. A string or a list.
sessions:
- name: lead
pattern: 'lead-session'
role: primary # primary | support | worker
actions:
- id: start-review
name: Start review
command: './scripts/start-review.sh'
session: lead # must name a declared session
params:
- name: branch
type: string # string | enum | number | boolean
required: true
Only manifest, name, and setup.command are
required. If the manifest is not valid, setup stops and the error names the field.
No secrets in the file. The engine rejects fields such as
token, apiKey, password, or
value on requirement entries. Name a credentialReference
instead, and set the value in Warpdrive.
Studio. You do not have to write this file by hand. Studio in the app builds Orchestrators too. Use a Git repository when you want the Orchestrator versioned alongside its scripts.
Manifest fields#
| Field | What it declares |
|---|---|
infrastructure | requires (commands), environment (variables with name and required), mcp (MCP server ids), and requirement lists providers, mcpServers, credentials, and externalTools. A providerId must be a GUID from Warpdrive's catalog, not a name like codex. |
sessions | Terminal sessions, each with name, pattern, and role. |
actions | Buttons the app can run: id, name, command, plus optional session, params, outputs, dependsOn, parallelGroup, and async. |
processes | Long-running programs Warpdrive supervises. command is a list and is not run through a shell. restart sets policy (on-failure, always, never), max_attempts, window_seconds, and backoff. |
lifecycle | postStart, preStop, and preSnapshot hooks. Each has a command and an optional timeoutSeconds from 1 to 300. postStart.runOn can limit the hook to install, restart, or restore. |
userAgentIntegration | Commands, files, and settings to install for the claude and opencode agents. |
state, events | JSON Schema files, relative to the repository root, that check the Orchestrator's saved state and its custom events. |
MCP servers#
MCP servers give an Instance's agents extra tools. An Instance can use a server three ways: turned on for that Instance, provided by its Orchestrator, or added to your catalog as a remote server.
Turn one on for an Instance
Each Instance keeps its own list, mcpEnabled, and does not inherit it
from anywhere. Send the whole list; servers you leave out are stopped.
PATCH /api/sandboxes/:id/mcp
{ "mcpEnabled": ["serena", "context7"] }
Ids come from GET /api/sandboxes/:id/mcp/catalog. If the Instance is
running, new servers start right away. An unknown id is rejected with
MCP_UNKNOWN. Through the Gateway
(PATCH /api/warpdrive/instances/:instanceId/mcp) you send catalog GUIDs
instead, and Warpdrive maps them to server ids for you.
Let the Orchestrator bring it
List server ids under infrastructure.mcp in the manifest. Setup adds
them for that Instance, so anyone who uses the Orchestrator gets them.
How a server is defined
The engine's built-in servers come from the mcp-servers.yml file that
ships with it. You do not edit this file; it shows the shape of an entry:
servers:
serena:
image: warpdrive-mcp-serena # required
execCommand: [serena, start-mcp-server, --project, /workspaces/sandbox] # required
networkType: internal # internal (no internet) | external
requiresWorkspace: true # runs per Instance, with its workspace
defaultEnabled: false # on for new Instances?
volumes:
- source: '${WORKSPACE_DIR}'
target: /workspaces/sandbox
readOnly: false
Each entry sets exactly one of networkType or networkMode.
environment, port, and shmSize are optional.
Add a remote server
You can add your own server to the catalog through the Gateway, with
POST /api/warpdrive/mcp/catalog. A remote server needs a public HTTPS
address with no credentials in it:
{
"serverId": "my-tools", // lowercase letters, digits, . _ -
"name": "My tools",
"url": "https://tools.example.com/mcp",
"transport": "http", // http | sse
"authKind": "bearer" // none | bearer | header (header also needs authHeaderName)
}
Store its secret separately with
PUT /api/warpdrive/mcp/catalog/:recordId/credential. The app shows it
only as a masked label afterwards. Then attach it to an Instance with
POST /api/warpdrive/instances/:instanceId/mcp-apps/:recordId. Adding
servers needs edit access to the Workspace.
Publishing to the Store#
Open to everyone. Anyone can publish an App to the Store at any time. A public listing goes live after Warpdrive reviews it.
You publish from inside the app, from the App or the Space it lives in. The app packages the App and sends:
- The package and its SHA-256 digest and size. The Store checks the digest and size before it keeps anything.
- A source revision and a lockfile digest, which pin the exact code and dependencies.
- A title, optional description and license, and the device capabilities the App may ask for (Bluetooth, location, camera, microphone).
- Dependencies: up to 32 other Store App versions, each already public, reviewed, and installable.
- Visibility:
privateorunlisted. The Store rejects a request to go straight topublic.
An App built from a Space's own folder publishes to its owner's private Store only. A Space can also be shared as a template. You save a draft with its required and optional Apps, license, remix policy, setup needs, and supported devices, then submit it for review.
What review checks#
A new version waits for checks before anyone else can install it. Two kinds of review happen:
-
Automated checks
Warpdrive builds the exact package and runs it. It records whether dependencies restore, the build passes, the App starts and reloads, and it meets the safety, embedding, and remote-service rules. It also checks that the App can be reached when hosted.
-
A person reviews it for the public Store
A Warpdrive reviewer promotes a version to public only after a secret scan and a personal-data scan pass on that exact package. Space templates go through the same scans, plus a dependency check, and the reviewer must have passed a recent MFA check.
Listings stay open to reports afterwards: people can review, comment, and report an App, and moderators can archive a version.