Warpdrive

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:

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

MethodPathPurpose
GET/api/healthLiveness, container runtime status, and engine version.
GET/api/capabilitiesThe providers and runtime options this build supports.
GET/api/docs/uiSwagger UI built from the live route table.
GET/api/docs/routesEvery route as a flat list.
GET/api/eventsServer-sent event stream for all Instances. ?filter= takes comma-separated patterns such as sandbox:*; ?since= resumes from a sequence number.

Instances

MethodPathPurpose
GET/api/sandboxesList Instances.
POST/api/sandboxesCreate an Instance. workspacePath is required; name, orchestrator ({ repo, branch? }), and mcpEnabled are optional.
GET/api/sandboxes/:idRead one Instance.
DELETE/api/sandboxes/:idDelete an Instance.
GET/api/sandboxes/:id/statusCurrent state of the Instance.
POST/api/sandboxes/:id/startStart the Instance.
POST/api/sandboxes/:id/stopStop the Instance.
POST/api/sandboxes/:id/rebuildRebuild the Instance.
POST/api/sandboxes/:id/execRun a command, e.g. {"command":"ls /ws"}.
GET/api/sandboxes/:id/terminalInteractive terminal over WebSocket.
GET/api/sandboxes/:id/eventsServer-sent events for one Instance.
GET/api/sandboxes/:id/preview/urlsPreview addresses for servers running in the Instance.
GET/api/sandboxes/:id/providers/statusWhich AI providers are set up in the Instance.

Orchestrator

MethodPathPurpose
POST/api/sandboxes/:id/orchestrator/setupClone an Orchestrator repository and run its setup. Body: { repo, branch?, force? }.
POST/api/sandboxes/:id/orchestrator/pull-latestFetch new commits from the Orchestrator's repository.
POST/api/sandboxes/:id/orchestrator/refreshApply the fetched copy to the running Instance. Call pull-latest first to pick up new commits.
GET/api/sandboxes/:id/orchestrator/statusThe Orchestrator's health and status sections.
GET/api/sandboxes/:id/orchestrator/actionsActions declared in the manifest.
POST/api/sandboxes/:id/orchestrator/actions/:actionIdRun an action.
GET/api/sandboxes/:id/orchestrator/actions/runsRecent action runs.
POST/api/sandboxes/:id/orchestrator/actions/runs/:actionRunId/cancelCancel a running action.
GET/api/sandboxes/:id/orchestrator/processesSupervised processes and their state.
GET/api/sandboxes/:id/orchestrator/processes/:name/logsLogs for one supervised process.

MCP servers, snapshots, and settings

MethodPathPurpose
GET/api/sandboxes/:id/mcp/catalogMCP servers this Instance can turn on.
GET/api/sandboxes/:id/mcpMCP servers turned on for the Instance, and whether they are running.
PATCH/api/sandboxes/:id/mcpReplace the Instance's MCP list: { "mcpEnabled": [ ... ] }.
GET/api/sandboxes/:id/snapshotsList snapshots.
POST/api/sandboxes/:id/snapshotsTake a snapshot.
POST/api/sandboxes/:id/snapshots/:snapshotId/restoreRestore a snapshot.
GET/api/configRead engine settings. PATCH updates them.
PUT/api/config/environment/:nameSet 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.sh

A 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#

FieldWhat it declares
infrastructurerequires (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.
sessionsTerminal sessions, each with name, pattern, and role.
actionsButtons the app can run: id, name, command, plus optional session, params, outputs, dependsOn, parallelGroup, and async.
processesLong-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.
lifecyclepostStart, 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.
userAgentIntegrationCommands, files, and settings to install for the claude and opencode agents.
state, eventsJSON 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:

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:

  1. 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.

  2. 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.