> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/harness-llm-connector.md).

# Harness LLM Connector

Use the Harness LLM Connector to run Worker Agents on Claude and GPT models that Harness hosts and manages, with no provider credentials to configure.

The Harness LLM Connector gives your [Worker Agents](https://developer.harness.io/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent.md) access to models that Harness hosts and manages. You do not need an Anthropic or OpenAI account, API key, or cloud provider connector. Select the connector, choose a model, and run your agent.

The Harness LLM Connector replaces the separate **Harness Anthropic** and **Harness OpenAI** connectors with a single connector that serves models from multiple providers.

{% hint style="warning" %}
**Harness Anthropic and Harness OpenAI are deprecated**

Existing references to these connectors continue to work. You cannot select them for new references. Go to [Move from the deprecated connectors](#move-from-the-deprecated-connectors) to switch your agents to the Harness LLM Connector.
{% endhint %}

***

## What you will learn from this topic

By the end of this topic, you will be able to:

* [Understand what the Harness LLM Connector provides](#how-the-connector-works).
* [Select the connector and a model for a Worker Agent](#use-the-connector-in-a-worker-agent).
* [Reference the connector in YAML](#use-the-connector-in-yaml).
* [Move agents off the deprecated Harness Anthropic and Harness OpenAI connectors](#move-from-the-deprecated-connectors).

***

## Before you begin

* **Harness AI enabled**: Harness AI must be active for your account. Go to [Overview](https://developer.harness.io/harness-platform/use-harness-ai/harness-ai.md#enable-ai) for more information.
* **Managed connector enabled**: The **Enable Harness Managed LLM Connectors** setting under **Account Settings** > **General** > **Default Settings** > **Harness AI** must be on. Go to [Configure Model Connectors](https://developer.harness.io/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent/configuration.md#configure-model-connectors) for more information.
* **Worker Agent permissions**: If you define an explicit [agent permission block](https://developer.harness.io/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent/permissions.md), include `ai_llm_gateway: access` so the agent can reach the Harness LLM Gateway.

***

## How the connector works

| Property           | Value                                                           |
| ------------------ | --------------------------------------------------------------- |
| **Name in the UI** | Harness LLM                                                     |
| **Identifier**     | `harnessLlm` (referenced as `account.harnessLlm`)               |
| **Scope**          | Account                                                         |
| **Used by**        | Worker Agents                                                   |
| **Models**         | Models from Anthropic and OpenAI that Harness hosts and manages |
| **Credentials**    | None required from you                                          |
| **Editable**       | No. The connector is view-only.                                 |

Harness provisions the connector at the account level. Because it is shared across the account, every project in the account can select it. You choose the model for each Worker Agent, so one connector serves agents that use different models.

Harness adds models to the connector over time. The **Model name** list in the Worker Agent editor shows the models available to your account today.

{% hint style="info" %}
**Usage limit for free and trial accounts**

Free and trial accounts can use up to $5 per month of Harness-managed LLM usage. The limit applies to the whole account, resets each month, and cannot be increased. To keep running agents after you reach it, use your own model connector or wait for the monthly reset. Go to [Configure Model Connectors](https://developer.harness.io/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent/configuration.md#configure-model-connectors) for more information.
{% endhint %}

***

## Use the connector in a Worker Agent

{% stepper %}
{% step %}
Go to **AI Agents** > **Worker agents**, then open or create a Worker Agent.
{% endstep %}

{% step %}
For **Model provider**, select **Select model provider**. On the **Existing** tab, select **Harness LLM**.
{% endstep %}

{% step %}
For **Model name**, select a model from the list. The list includes Claude models, such as `claude-opus-4-5`, and GPT models, such as `gpt-5.5`.
{% endstep %}

{% step %}
Save the agent.
{% endstep %}
{% endstepper %}

If you leave **Model name** empty, Harness uses a default model that can change over time. Set the model explicitly when you need consistent results between runs.

***

## Use the connector in YAML

Set `connector` to `account.harnessLlm`, and set the model with `env.MODEL`:

```yaml
agent:
  uses: harnessAI@1.0.0
  with:
    prompt: Review the codebase and summarize improvements.
    connector: account.harnessLlm
    env:
      MODEL: claude-opus-4-5
```

To use a GPT model instead, change only the model:

```yaml
agent:
  uses: harnessAI@1.0.0
  with:
    prompt: Review the codebase and summarize improvements.
    connector: account.harnessLlm
    env:
      MODEL: gpt-5.5
```

***

## Move from the deprecated connectors

Agents that reference **Harness Anthropic** (`harnessAnthropic`) or **Harness OpenAI** (`harnessOpenAI`) keep running. To move an agent to the Harness LLM Connector:

{% stepper %}
{% step %}
Open the Worker Agent and set **Model provider** to **Harness LLM**.
{% endstep %}

{% step %}
Set **Model name** to the model the agent used before.
{% endstep %}

{% step %}
Save the agent, then run it again to confirm the result.
{% endstep %}
{% endstepper %}

Your own Anthropic Model Connector and OpenAI Model Connector are not deprecated. Keep using them when you want agents to run with your own provider credentials, cloud provider connectors, or LiteLLM endpoints.

***

## Troubleshooting

<details>

<summary>Harness LLM does not appear in the list of connectors</summary>

Confirm that **Enable Harness Managed LLM Connectors** is on under **Account Settings** > **General** > **Default Settings** > **Harness AI**. Turning the setting on can trigger provisioning of the connector.

</details>

<details>

<summary>The agent cannot reach the model</summary>

If the agent has an explicit permission block, add `ai_llm_gateway: access` to it.

</details>

<details>

<summary>The agent fails with HTTP 429: Budget quota exceeded</summary>

Free and trial accounts are limited to $5 per month of Harness-managed LLM usage across the whole account. When the account reaches the limit, model calls fail with `HTTP 429: Budget quota exceeded` until the monthly reset. To keep running the agent, switch **Model provider** to your own [Anthropic](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/anthropic-model-connector.md) or [OpenAI](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md) connector, or move the account to a paid license.

</details>

<details>

<summary>I cannot select Harness Anthropic or Harness OpenAI for a new agent</summary>

These connectors are deprecated and are available only to existing references. Select **Harness LLM** instead.

</details>

***

## Next steps

* [Worker Agents](https://developer.harness.io/harness-platform/use-harness-ai/core-capabilities/in-your-pipelines/worker-agent.md): Create and configure agents that use this connector.
* [Anthropic Model Connector](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/anthropic-model-connector.md): Use your own Anthropic or Bedrock credentials.
* [OpenAI Model Connector](https://developer.harness.io/harness-platform/use-harness-ai/connect-with-ai/openai-model-connector.md): Use your own OpenAI or LiteLLM credentials.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-ai/connect-with-ai/harness-llm-connector" %}
