Skip to main content
An Agent or automation script operates Deepest through Public API V1 or the @deepest/sdk TypeScript SDK using an Agent API Key. It acts on the exact same Account, Computers, Sandboxes, and resource pool as the Web Console.
Protect your Agent API Key: An Agent API Key is a strong account-wide credential. Keep it in the trusted caller’s secret store—never embed it in prompts, source repositories, Guest files, runtime links, or untrusted tool output.

Prepare the caller

1

Create an Agent API Key in the Console

The human account owner signs in to the Console, redeems an active Beta Invite if needed (Access and retention), and creates a key under Agent Keys.
2

Install the TypeScript SDK

Install @deepest/sdk (0.1.0, MIT) in an ESM project running Node.js 18 or later:
3

Set trusted caller environment variables

Pass DEEPEST_API_URL (your control API origin, e.g. https://console.deepest.dev, without /v1) and DEEPEST_API_KEY from the caller’s environment. https://deepest.dev is the public website, not the Control API—always send Agent API Keys only to your configured control origin (https://console.deepest.dev for hosted Deepest), and never use a Preview, Share, or Viewer runtime URL as baseUrl.

Reuse an existing workspace before creating another

Before creating a new Machine, inspect Account resources and existing Computers:
  1. Read resources.get() to verify entitlement.status === "active", sufficient Memory (ram_limit_mib - ram_used_mib), storage_status, and machine_count_constraints (persistent_computers).
  2. List Computers (computers.list()) and match by stable Computer ID (id)—display names are human labels, not unique identifiers, and renaming a Computer does not change its ID.
  3. Reuse the existing Computer when it already holds the target repository, environment, or authorized session.
  4. Create a new Computer only when the task needs a separate persistent workspace. Use a Sandbox for an eligible temporary headless task (Pro or Max plans; disabled on Starter) that can finish and export results within 24 hours.
Deepest does not automatically select a Machine, migrate projects, or prioritize one Computer over others.

Run a verified task

Choose whether your Agent is connecting to an existing Computer or creating a new one with a saved idempotency_key:
Save one unique DEEPEST_CREATE_KEY alongside your intended ram_mib before calling computers.create(). Reusing that identical key and Memory request lets you recover cleanly if the network drops; generating a random key per retry creates duplicate Computers.
Preflight checks against resources.get() are advisory—another authorized actor or platform capacity check may still change admission between reading resources and submitting Create or Start. The server’s response is authoritative.

Verify and finish cleanly

  • Verify actual task outcomes: A running Computer proves lifecycle only—not that a build succeeded, a file was written, or a remote deployment finished. For file-changing commands, inspect the target file or status explicitly.
  • Check entitlement margin: Before starting long work, verify pool.result.entitlement.expires_at (Unix milliseconds when present) covers the planned duration.
  • Inspect Exec fields: Even when exec.ok is true, inspect exit_code, timed_out, and output_truncated.
  • Stop when idle: Persistent Computers have no automatic idle Stop. When finished and no service needs to keep running, explicitly Stop the Computer to release running Memory while preserving its disk:
Stop frees running Memory and keeps the disk. Only call delete() when the user explicitly wants to destroy the Computer and attached snapshots (and release its persistent_computers count slot).

Defensive recovery & failure decisions

The SDK never retries automatically. Branch on error.code, retry, and structured fields—never prose in error.message: See Errors and Reliability and recovery for the full operation recovery matrix.

Human boundaries and optional tooling

  • Human-only operations: An Agent API Key cannot manage Agent Keys (agentKeys.list, agentKeys.create, agentKeys.revoke), redeem invitations (invites.redeem), or emit human-assistance control signals (assistance.begin, assistance.touch, assistance.complete). Request help with computer(id).assistance.request(), deliver the returned dashboard_url to the human, wait while state is waiting_human or human_active, and re-observe the application after control returns to agent. See Human assistance.
  • No public CLI or MCP server: Deepest does not distribute an official CLI or MCP server. Operate via standard SSH, the HTTP API, or @deepest/sdk. Do not invent package names or commands.
  • No platform browser-control API: Desktop provides visual access and human-handoff coordination on Computers, not screenshot, pixel-click, DOM, CDP, or Playwright APIs. User-managed browser automation tools installed inside the Guest remain ordinary Guest commands.
  • Exact schemas: Use the API Reference (GET /openapi.json) for exact parameters, schemas, and auth scopes.