> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moda.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Harness overview

> A harness is a synced map of your agent codebase — agents, tools, prompts, and artifacts — kept current from your GitHub repository.

A harness is a synced map of your agent codebase: the runtime agents Moda found in a repository, the artifacts they use (prompts, tools, skills, evals, model configurations), and the relationships between them, with citations back to source files. This page covers what the harness shows in the dashboard and the recommended setup with the Moda GitHub App.

## What you see in the dashboard

Open **Harness** in the dashboard sidebar (under Improve). The list page shows every synced harness with its runtime agents, capabilities, open questions, and last sync time. Opening a harness shows five tabs:

| Tab             | Contents                                                                                  |
| --------------- | ----------------------------------------------------------------------------------------- |
| Map             | Interactive topology graph of agents, artifacts, and relationships, with a node inspector |
| Inventory       | The captured agents and artifacts as a list                                               |
| Analysis        | The analysis behind the current harness version                                           |
| Captured source | The source files the analysis captured                                                    |
| History         | Previous harness versions — each sync creates a new version                               |

Owners and admins can record a correction to a captured node (**Correct capture**); the correction is saved as a new harness version.

## Recommended setup: the Moda GitHub App

With the GitHub App installed, the harness stays current without any CI configuration: every push to the repository's default branch triggers a hosted analysis, and the result syncs to your workspace automatically.

<Steps>
  <Step title="Connect GitHub">
    In the dashboard, open **Settings → Integrations** and connect GitHub. Install the Moda GitHub App on the repositories you want analyzed. Managing the integration requires the admin or owner role.
  </Step>

  <Step title="Configure the repository">
    Each connected repository has:

    * **Sync mode** — `Hosted analysis` (default), `GitHub Actions`, or `Off` (see [Sync modes](#sync-modes)).
    * **Path scope** (optional) — a path such as `services/agent` that limits analysis to part of the repository, useful in monorepos.
    * **Sync main branch** — on by default; turn it off to stop analyzing pushes without disconnecting the repository.
  </Step>

  <Step title="Push to the default branch">
    Any push to the default branch triggers an analysis. When it completes, the refreshed harness graph syncs to your workspace and a GitHub Check Run posts on the commit.
  </Step>

  <Step title="Verify">
    You should see:

    * A Check Run on the latest default-branch commit titled **"Harness mapped — N agents, M artifacts"**, with agent, artifact, and relationship counts, the number of files and bytes analyzed, and a "View the harness in Moda" link.
    * The repository row in **Settings → Integrations** showing status **Completed** with the analyzed commit SHA.
    * The harness listed under **Harness** in the dashboard.
  </Step>
</Steps>

<Note>
  Hosted analysis covers only the default branch. Pull requests are not analyzed.
</Note>

## Sync modes

Set per repository in **Settings → Integrations**:

| Mode                      | Behavior                                                                                                                     |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Hosted analysis (default) | Moda analyzes the repository server-side on every default-branch push and syncs the result. No CI setup required.            |
| GitHub Actions            | Analysis runs in your own CI with `moda harness analyze --github-actions`. See [Harness analysis in CI](/harness/ci-rescan). |
| Off                       | No analysis runs for this repository, and re-analysis is disabled.                                                           |

## Re-running analysis

For repositories in **Hosted analysis** mode:

* **From the dashboard** — open **Settings → Integrations** and click **Analyze now** on the repository row.
* **From GitHub** — the Check Run has a **Re-analyze** action button.

Analysis run statuses shown in Settings → Integrations: **Queued**, **Running**, **Completed**, **Failed**, and **Superseded** (replaced by a newer analysis).

## What Moda reads

Analysis works from a bounded snapshot of the repository: source, configuration, prompt, skill, eval, and deployment files, plus README and AGENTS files. Secret-like paths (`.env` files, private keys) and symlinks are skipped, dependency and build directories are excluded, and secret-shaped strings are redacted before analysis. If a repository exceeds the snapshot size limits, the analysis proceeds on the truncated snapshot and the Check Run notes the truncation. See [Limits](/administration/limits#harness) for the exact caps.

## Next steps

* [Harness analysis in CI](/harness/ci-rescan) — run the analysis in your own GitHub Actions or other CI instead of the hosted path.
* [Authentication](/administration/authentication) — create the API key used by the API-key CI variant.
* [CLI reference](/cli/reference) — the `moda harness` command family.
