# DigitalOcean Harness Runtime – DigitalOcean Documentation > Run AI coding agents in isolated DigitalOcean sandboxes with session lifecycle, permissions, and a YAML environment spec. - [DigitalOcean Harness Runtime Quickstart](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/quickstart/index.html.md): Start a Harness Runtime session with one command. Install doctl, authenticate with doctl auth init and a DigitalOcean personal access token, export OPENAI_API_KEY, then run doctl harness-runtime … ## DigitalOcean Harness Runtime Examples Worked examples of Harness Runtime, each with a complete environment spec and the commands to run it, covering coding, marketing, document review, incident response, and multi-tenant agent products. - [Refactor a Repository](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/refactor-a-repository/index.html.md): Run Claude Code against one of your sandbox repositories on DigitalOcean Serverless Inference, approve its shell commands as it works, disconnect, and resume the same workspace later. - [Review Pull Requests Automatically](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/review-pull-requests/index.html.md): Fire a Harness Runtime session from a GitHub webhook so every pull request gets an unattended first-pass review delivered to Slack. - [Draft Marketing Content on a Schedule](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/draft-marketing-content/index.html.md): Run a weekly agent that researches a topic with Action Gateway web search, drafts copy in your brand voice using an inline skill, and commits it to a content repository for review. - [Review Documents Against a Policy](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/review-documents/index.html.md): Run a locked-down Harness Runtime environment that reads contracts or policy documents, flags clauses against your checklist, and leaves nothing behind when the session ends. - [Triage Incidents From an Alert](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/triage-incidents/index.html.md): Start a Harness Runtime session from an alerting webhook, let the agent query your own observability MCP server, and deliver a triage summary to Slack before anyone opens a laptop. - [Serve Many Tenants From One Environment](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/serve-tenants/index.html.md): Save a Harness Runtime environment once as an Environment Config, start an isolated session per customer from it, and fork a warmed-up checkpoint to run evaluations in parallel. ## DigitalOcean Harness Runtime How-Tos Task-focused guides for deploying agents, managing sessions, permissions, files, and tools. - [Create Harness Runtime Environments](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/create-harness-agents/index.html.md): Define an environment, save it as a reusable config, build a custom sandbox image, and set what the agent is allowed to do. - [How to Create an Environment Using a Coding Adapter](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/create-managed-agent/index.html.md): Choose a Harness Runtime adapter for Codex CLI, Claude Code, or OpenCode and start a session from a YAML spec or the Control Panel. - [How to Use Environment Configs](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/use-agent-configs/index.html.md): Save a Harness Runtime spec as a reusable Environment Config, then start sessions from it without resubmitting the YAML. - [How to Use a Custom Sandbox Template (BYOT)](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/use-custom-template/index.html.md): Build a Container Registry image, register it as a Harness Runtime template, and start a session from it. - [How to Configure Agent Permissions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/configure-permissions/index.html.md): Write session permission policies that allow, deny, or require approval for agent actions. - [How to Secure Harness Runtime Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/secure-sessions/index.html.md): A checklist for hardening a Harness Runtime session, covering workload isolation, credentials, egress, permission policies, unattended controllers, and cleanup. - [Run Agent Frameworks on Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-agent-frameworks/index.html.md): Deploy framework-based agents such as LangGraph, Hermes, and OpenAI Agents API instead of a coding adapter. - [How to Run a LangGraph Agent on Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-langgraph-agent/index.html.md): Package a LangGraph repository, configure model credentials, and deploy your graph on Harness Runtime. - [How to Run a Hermes Agent on Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-hermes-agent/index.html.md): Run the Hermes gateway as a long-lived agent inside a Harness Runtime sandbox and reach its admin dashboard from your machine. - [How to Run an OpenAI Agents API Session](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-openai-agents-api-session/index.html.md): Connect an OpenAI Agents API session to a DigitalOcean Harness Runtime sandbox using the CLI, PyDo, or an OpenAI webhook controller. - [Connect Tools to Harness Runtime Environments](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/connect-tools/index.html.md): Give an environment governed access to Action Gateway tools and to a team GitHub account. - [How to Connect Action Gateway to Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/connect-action-gateway/index.html.md): Attach Action Gateway tools or versioned Toolbelts to a Harness Runtime agent through its environment spec. - [How to Connect GitHub to a Harness Runtime Session](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/connect-github/index.html.md): Connect a team GitHub account with OAuth so a session can clone, commit, and open pull requests. - [Work with Harness Runtime Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/work-with-sessions/index.html.md): Attach to running sessions, move files in and out, reach ports inside the sandbox, and checkpoint or fork a session. - [How to Manage Harness Runtime Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/manage-sessions/index.html.md): List, show, pause, resume, attach, detach, log, and remove Harness Runtime sessions with doctl harness-runtime or the Control Panel. - [How to Connect Through the Codex CLI Proxy](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/use-codex-proxy/index.html.md): Start a local doctl proxy so your local Codex CLI drives a hosted Codex session. - [How to Upload and Download Session Files](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/transfer-files/index.html.md): Upload files into a sandbox and download agent output to your local machine. - [How to Forward Sandbox Ports](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/forward-ports/index.html.md): Open a local tunnel to a port inside a session's sandbox with doctl harness-runtime port-forward. - [How to Checkpoint, Fork, and Roll Back Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/checkpoint-fork-rollback-sessions/index.html.md): Save a Harness Runtime session as a checkpoint, then fork it into parallel copies or roll the same session back in place. - [Operate Harness Runtime Agents](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/operate-agents/index.html.md): Run agents unattended on a schedule or webhook, monitor their activity, and keep the prepaid balance funded. - [How to Run Agents on a Schedule or From a Webhook](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-agents-with-triggers/index.html.md): Create cron and webhook triggers that start Harness Runtime sessions unattended and deliver the results to email or Slack. - [How to Monitor Harness Runtime Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/monitor-sessions/index.html.md): View Harness Runtime metrics in DigitalOcean Insights, including session lifecycle, token usage, approval activity, and sandbox resource usage. - [How to Manage Harness Runtime Prepayment](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/manage-ahr-prepayment/index.html.md): Fund the shared prepaid balance for Harness Runtime and understand what happens when the balance reaches $0. ## DigitalOcean Harness Runtime Reference Environment spec reference and links to API and doctl resources for Harness Runtime. - [Environment Spec Reference](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/reference/environment-spec/index.html.md): Field reference for the YAML environment specification, covering the adapter, sandbox, credentials, egress, tools, skills, and permission fields. ## DigitalOcean Harness Runtime Concepts Explanations of Harness Runtime environments, sandboxes, sessions, runs, adapters, permissions, approvals, secrets, and network egress. - [DigitalOcean Harness Runtime Overview](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/overview/index.html.md): Harness Runtime runs Codex CLI, Claude Code, OpenCode, LangGraph, and Hermes in isolated DigitalOcean sandboxes, configured with a YAML environment spec or the Control Panel and driven with doctl. - [Managed Agents Architecture](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/architecture/index.html.md): How Harness Runtime, Action Gateway, and the DigitalOcean services around them fit together to run and govern AI agents. - [Agent Adapters](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/agent-adapters/index.html.md): Harness Runtime adapters select which coding agent or framework runs in the sandbox and which platform features, such as approvals and checkpoints, apply to the session. - [Environments and Sandboxes](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/environments/index.html.md): A Harness Runtime environment is a reusable configuration object defining what an agent needs to do work, and a sandbox is the isolated microVM a session provisions from it. - [Sessions](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/sessions/index.html.md): A Harness Runtime session is one running instance of an environment, with its own sandbox, state, and history, and a run is a single agent turn inside it. - [Permission Policies](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/permissions/index.html.md): Harness Runtime permission policies allow, require approval for, or deny the actions an agent takes, and set the filesystem and network access of the sandbox it runs in. - [Approvals](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/approvals/index.html.md): Harness Runtime pauses an agent and requests human approval when its permission policy marks an action as ask, and you can approve, reject, or defer from the terminal or out of band. - [Secrets and Configuration](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/secrets/index.html.md): How Harness Runtime environments carry configuration, credentials, and scoped secrets, which bind a credential to one HTTPS destination so it never enters the sandbox. - [Network Egress](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/concepts/egress/index.html.md): A Harness Runtime sandbox reaches any host by default, and naming even one allowed host turns on an allowlist that denies everything else. ## DigitalOcean Harness Runtime Details Use cases, features, pricing, availability, limits, and data privacy for Harness Runtime. - [What You Can Build](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/what-you-can-build/index.html.md): Use cases for Managed Agents, including Harness Runtime and Action Gateway. - [DigitalOcean Harness Runtime Features](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/features/index.html.md): Harness Runtime capabilities for agent adapters, session lifecycle, permissions, secrets, GitHub, Action Gateway tools, BYOT templates, and sandbox size slugs. - [DigitalOcean Harness Runtime Pricing](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/pricing/index.html.md): Billing components for Harness Runtime compute, storage, tools, and inference. - [DigitalOcean Harness Runtime Availability](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/availability/index.html.md): Datacenter regions where Harness Runtime sessions and sandboxes are available. - [DigitalOcean Harness Runtime Limits](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/limits/index.html.md): Session, compute, file transfer, and networking limits for Harness Runtime. - [DigitalOcean Managed Agent Runtime Services: Harness Runtime & Action Gateway (Insights Enabled): Data Privacy](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/data-privacy/index.html.md): Privacy disclosures for Harness Runtime and Action Gateway during public preview.