---
title: How to Deploy Apps from Harness Runtime Sessions (public)
description: Deploy code that an agent builds in a DigitalOcean Harness Runtime session to App Platform, start sessions from App Platform, and debug failed …
product: App Platform
url: https://docs.digitalocean.com/products/app-platform/how-to/deploy-from-harness-runtime/
last_updated: "2026-11-24"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Deploy Apps from Harness Runtime Sessions (public)

App Platform is a fully managed Platform-as-a-Service (PaaS) that deploys applications from Git repositories or container images. It automatically builds, deploys, and scales components while handling all underlying infrastructure.

You can deploy an application that an agent builds in a [DigitalOcean Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/index.html.md) session directly to App Platform. When the session’s environment includes the App Builder pack, the agent proposes a deployment plan, and after you approve it, pushes the code to a GitHub repository and creates or updates the App Platform app. The Control Panel then links the session and the app, so you can move between them and keep iterating in the same session.

This feature is in [public preview](https://docs.digitalocean.com/platform/product-lifecycle/index.html.md#public-preview) and is available to all teams. You don’t need to opt in to this feature separately.

## How Deploying from a Session Works

The App Builder pack adds tools and skills to a Harness Runtime environment:

- **Tools:** [Action Gateway](https://docs.digitalocean.com/products/managed-agents/action-gateway/index.html.md) tools to create, update, inspect, and delete App Platform apps, read deployment status and logs, list regions, and view and resize Managed Databases clusters.
- **Skills:** `app-platform-deploy`, `app-platform-github`, `app-platform-tools`, and `app-platform-debug`, which tell the agent how to prepare an app, use GitHub, call the tools, and diagnose failed deployments. To read them, open a skill’s preview in the **Skills** section when you create the environment. The pack manages these skills, so you can view them but not edit them.

When you ask the agent to deploy, it:

1. Checks whether the code in the session’s workspace can run on App Platform. If it can’t, the agent lists what is missing and stops.
2. Proposes a plan: an [app spec](https://docs.digitalocean.com/products/app-platform/reference/app-spec/index.html.md), a repository name and visibility, an app name, and whether it is creating a new app or updating an existing one.
3. Waits for you to approve the plan in the chat.
4. Creates the GitHub repository if needed and pushes the code.
5. Creates or updates the App Platform app with the repository as its source and autodeploy turned on.

Autodeploy is the same **Autodeploy** setting you can choose when you [create an app from a Git repository](https://docs.digitalocean.com/products/app-platform/how-to/create-apps/index.html.md). It appears as `deploy_on_push: true` in the app spec the agent proposes, so you can ask the agent to turn it off before you approve the plan.

App Platform then builds and deploys the app. The result is a standard App Platform app, so you can manage it like any other app.

The skills instruct the agent not to create repositories, push code, or create, update, or delete apps until you approve in the chat. This is an instruction to the agent, not an enforced control. To require approval for these actions regardless of what the agent decides, add `ask` rules to the environment’s [permission policy](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/configure-permissions/index.html.md).

## Prerequisites

To deploy from a session, you need:

- Access to Harness Runtime, and acceptance of the [Managed Agents Public Preview Terms](https://www.digitalocean.com/legal/mars-preview-terms) and the [Public Preview Terms for App Platform Deployment from Harness Runtime](https://www.digitalocean.com/legal/app-platform-deployment-preview-terms). See [Harness Runtime availability](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/availability/index.html.md).
- A GitHub account connected to Harness Runtime. The agent uses this connection to create repositories and push code. See [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).
- The DigitalOcean GitHub App installed on your GitHub account with access to the repositories the agent deploys from. If it isn’t installed, the agent sends you a link to install it.

## Create an Environment with the App Builder Pack

You cannot edit an environment after you create it, so add the App Builder pack when you create the environment. You can add the pack only in the Control Panel.

1. Go to the [**Harness Runtime** page](https://cloud.digitalocean.com/managed-agents/harness-runtime/?utm_source=docs-agent&utm_medium=md) and click **Create Environment**.
2. Choose a harness, model, and sandbox size as described in [Create an Environment in the Control Panel](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/create-managed-agent/index.html.md#create-an-environment-in-the-control-panel).
3. Under **Template Capabilities**, select **App Builder**. This adds the App Platform tools and skills to the environment.
4. Under **CLI Authentication**, select **Allow GitHub access**. Then, under **Use an existing connection**, select a GitHub connection, or click **Connect a different GitHub account** and authorize one.
5. Enter a **Name** for the environment, then click **Create Environment**.

**Warning**:

  Selecting **Allow GitHub access** doesn’t connect an account on its own. If you create the environment without selecting or connecting a GitHub account, the agent can’t push code to a repository, so App Platform has no source to deploy from and track.

## Deploy an App from a Session

Start a session from the environment and build your application. When it is ready, ask the agent to deploy it to App Platform. The agent assesses the workspace and proposes a plan.

The first time the agent calls a DigitalOcean tool, it may reply with a link to authorize the connection. Open the link, confirm, and then tell the agent to continue.

Review the plan the agent proposes. The plan includes the repository’s visibility. Repositories the agent creates are private unless you ask for a public one. Reply in the chat to approve the plan or ask for changes.

After the agent creates or updates the app, the session page shows it under **Deployed App**. Click **View in App Platform** to open the app’s overview page.

To change the app later, ask the agent in the same session. It pushes the changes to the repository, and App Platform redeploys the app automatically.

## Start an App from the Create App Page

You can also start from App Platform. Go to the [**Apps** page](https://cloud.digitalocean.com/apps?utm_source=docs-agent&utm_medium=md), click **Create App**, and select **Harness Runtime** as the source. Under **Start from Harness Runtime**, choose one of the following tabs:

- **New Agent:** Click **Create Agent** to create an environment with the App Builder pack already selected, then start a session from it.
- **New Session:** Click **Create Session** to start a session from an environment you already have.

In each case, you continue in Harness Runtime, where you build the app and deploy it as described in [Deploy an App from a Session](#deploy-an-app-from-a-session).

## Manage Sessions from the App Overview

The app’s overview page has a **Harness Runtime Sessions** card that lists the sessions linked to the app and the status of each. Use the actions menu next to a session to resume, pause, or delete it. Deleting a session permanently destroys it and its sandbox.

To start a new session for the app, click **Harness Runtime Session**. In the **Create Session** window, select an **Environment**, enter a **Session name**, and click **Create Session**. The new session is linked to the app.

To create a new environment from the overview page, click **Harness Runtime Agent**.

## Debug a Failed Deployment with an Agent

When a deployment fails, the deployment’s details page offers **Debug with agent**. Debugging runs in a Harness Runtime session, part of [Managed Agents](https://docs.digitalocean.com/products/managed-agents/index.html.md), so the session is billed at [Harness Runtime pricing](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/pricing/index.html.md), not App Platform pricing.

Click **Debug with agent**, then in the **Choose a debug agent** window, select **Use an existing agent** and choose an environment with the App Builder pack, or select **Create a new agent**. Click **Continue** to start a Harness Runtime session with the app’s deployment details.

The agent reads the failed phase’s logs and the app spec, then reports the root cause and a proposed fix. It updates the app spec, or clones the repository and opens a pull request, only after you approve. If the app has autodeploy turned on, merging the pull request redeploys the app.

## How Apps and Sessions Are Linked

The Control Panel links a session and an app when:

- You direct the agent to create or update the app from a session whose environment includes the App Builder pack.
- You create a session from the app’s overview page.

Linked apps appear under **Deployed App** on the session page, and linked sessions appear in the **Harness Runtime Sessions** card on the app’s overview page. Deleting an app or a session removes it from these lists.

## Pricing

The integration doesn’t add a separate charge. Each product bills for its own resources:

- **App Platform:** App Platform bills for running the deployed app, including any databases or other resources in its app spec, at standard [App Platform pricing](https://docs.digitalocean.com/products/app-platform/details/pricing/index.html.md), the same as an app you create yourself. The agent’s work to create or update the app is covered by the Harness Runtime and Action Gateway charges below.
- **Harness Runtime:** Every session is billed at [Harness Runtime pricing](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/pricing/index.html.md), whether you start it in Harness Runtime, from the App Platform **Create App** page, from an app’s overview page, or with **Debug with agent**. The Harness Runtime pricing page explains how session compute and model inference are billed.
- **Action Gateway:** The App Builder pack’s App Platform and database tool calls are billed at [Action Gateway pricing](https://docs.digitalocean.com/products/managed-agents/action-gateway/details/pricing/index.html.md).

## Limitations

- **Pack set at creation:** You cannot add the App Builder pack to an existing environment or session. To deploy work from an existing session, create a new environment with the pack selected and start a new session in it. The Control Panel doesn’t copy the existing session’s files into the new session. The new session is billed separately at Harness Runtime pricing.
- **Control Panel only:** You can’t add the App Builder pack to an environment with `doctl` or an environment spec.
- **GitHub only:** The agent deploys from GitHub repositories. It does not use GitLab, Bitbucket, or container registries.