Harness Runtime DoTs SDK Referencepublic
Last verified 20 Nov 2026
DigitalOcean Harness Runtime provides managed, hardware-isolated microVM sandboxes with built-in tools such as Chromium to run harnesses and execute arbitrary code. Rich lifecycle APIs preserve conversational history and working state across sessions, letting you pause, resume, and fork work to control costs and adapt to the nonlinear nature of agentic workflows. Scale complete agents such as Claude Code or use sandboxes independently for code execution, all through the same service. See What You Can Build for example use cases.
DoTs is the official DigitalOcean TypeScript client library. Install it with npm i @digitalocean/dots. For quickstart examples, see the DoTs SDK reference.
The Harness Runtime modules are:
-
Harness Runtime: Manage sessions, agent configs, workspace transfers, and triggers.
-
Harness Runtime Workspaces: Create and manage persistent workspaces that outlive a session.
These modules are the low-level API client generated from the OpenAPI spec. For most workflows, use HarnessRuntime from @digitalocean/dots/harness-runtime, a hand-written layer over them. It creates a session from an agent manifest and waits until it is ready, streams its work, handles approvals, forks sessions, keeps files in a persistent workspace, and starts runs from a schedule or a webhook.
The following example creates a session and runs a prompt:
import { HarnessRuntime } from "@digitalocean/dots/harness-runtime";
import { readFileSync } from "node:fs";
const hr = new HarnessRuntime(); // reads DIGITALOCEAN_ACCESS_TOKEN
const manifest = readFileSync("agent.yaml", "utf8"); // an agent manifest, such as examples/harness-runtime/agent.yaml in the DoTs repo
const session = await hr.sessions.create({ manifest });
const result = await session.run("Find and fix the flaky test", { onText: (t) => process.stdout.write(t) });
await session.destroy();For more examples, error types, and limitations, see the DoTs GitHub repo.