# Quickstart

Harnesses are cloud coding environments that let you run coding agents like Claude or Codex in isolated, secure environments on Northflank. Instead of running agents on your local machine or directly against your codebase, Harnesses provide a controlled workspace with its own resources, networking, and configuration.

Run Harnesses in [Northflank's managed cloud](https://northflank.com/features/managed-cloud) or [in your own cloud infrastructure](https://northflank.com/features/bring-your-own-cloud). You can connect repositories, configure ports and environment variables, and monitor resource usage—all from the Northflank dashboard or your local terminal.

## How Harnesses work

When you create a Harness:

1. Northflank provisions a cloud coding environment in your environment (managed cloud or your own infrastructure).

2. You authenticate your coding agent using an API key or linked account.

3. (Optional) You connect a Git repository for the agent to work with.

4. You configure networking, environment variables, and resources.

5. You access the Harness from the Northflank dashboard or connect to it locally using SSH.

An active Harness runs continuously until you pause or delete it. Files in the Harness workspace are preserved when you pause and resume the Harness. You can update its configuration and monitor its resource usage at any time.

Multiple team members can work in the same Harness simultaneously. Your teammates can see what you're doing in real-time and collaborate together in the same environment.

## Create your first Harness

> [!note] Prerequisites
> 

- A [Northflank account](https://app.northflank.com/signup) on a Pay As You Go plan

- A coding agent account or API key (Claude, Codex, Pi, or your own agent)

- A [Git integration](/docs/v1/application/getting-started/link-your-git-account) if you want to connect a repository

To create a Harness:

> [!note] 
> [Click here](https://app.northflank.com/s/project/create/harness) to create a harness.

1. In your Northflank dashboard, [create a new project](/docs/v1/application/getting-started/create-a-project) and click **Harnesses**

2. Select your coding agent (Claude, Codex, OpenCode, Pi) or select **Bring Your Own Agent.**

3. Enter a name for your Harness.

4. Select the environment where you want to run the Harness.

5. Under **Authentication**, select how you want to authenticate your coding agent. You can use an API key or a linked account.

6. Under **Repository**, select an existing repository and branch, create a new repository, or continue without a repository.

7. Optionally, under **Advanced**, configure runtime variables, the runtime image, resources, and workspace storage.

8. Click **Create Harness**.

You'll be redirected to the Harness terminal. If you didn't use an API key, you may need to sign in to your coding agent when you first open it.

![Creating a Harness in the Northflank application](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/create-harness.png)

## Connect to your Harness locally

Access your Harness from your local machine using SSH.

> [!note] Prerequisites
> 

- The [Northflank CLI installed and authenticated](/docs/v1/api/use-the-cli).

- Access to the Harness you want to connect to.

To connect to your Harness:

1. Open the Harness overview.

2. Under **Local access**, click **Connect**.

3. Copy the SSH command shown.

4. Run the command in your terminal.

Example: `northflank dev ssh --projectId harness --harnessId numerous-class`

You can now work in your Harness environment from your local terminal.

![Connect to your Harness locally](https://assets.northflank.com/documentation/v1/application/ai-agents/harnesses/connect-harness.png)

> [!note] Questions?
> Reach out to the Northflank team at [[support@northflank.com](mailto:support@northflank.com)](mailto:support@northflank.com) or [book a demo](https://cal.com/team/northflank/northflank-demo?duration=30).

## Next steps

- [Configure and manage Harnesses: Configure networking, environment variables, resources, and monitor your Harness.](/v1/application/ai-agents/harnesses/configure-and-manage-harnesses)
- [Get started with Agent skills: Give agents domain-specific knowledge about Northflank infrastructure and APIs.](/v1/application/ai-agents/agent-skills)
