@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.
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:- Read
resources.get()to verifyentitlement.status === "active", sufficient Memory (ram_limit_mib - ram_used_mib),storage_status, andmachine_count_constraints(persistent_computers). - 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. - Reuse the existing Computer when it already holds the target repository, environment, or authorized session.
- 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.
Run a verified task
Choose whether your Agent is connecting to an existing Computer or creating a new one with a savedidempotency_key:
- Create a Computer
- Reuse an existing Computer
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
runningComputer 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.okistrue, inspectexit_code,timed_out, andoutput_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:
Defensive recovery & failure decisions
The SDK never retries automatically. Branch onerror.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 withcomputer(id).assistance.request(), deliver the returneddashboard_urlto the human, wait while state iswaiting_humanorhuman_active, and re-observe the application after control returns toagent. 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.