Skip to main content
Version: v2.0

Harnesses and models

Every agent in Agenta runs on two pieces underneath: a harness and a model. This page explains what each one does, and why Agenta asks you to choose them, and the credential behind them, separately.

What a model does

A large language model does exactly one thing. You send it a message, or a list of messages, and it returns a message. That is all it does.

A model cannot read a file, search the web, or send an email. When it needs one of those, all it can do is say so in its reply: call the tool send_email with these arguments. Something else has to act on that reply.

What a harness does

The harness is that something else. It runs the model in a loop:

  1. It sends the conversation to the model, together with your instructions, the list of tools the agent has, and the name and description of each skill.
  2. The model replies. If the reply asks for a tool call, the harness runs that tool.
  3. The harness adds the tool's result to the conversation and sends it back to the model.
  4. The loop repeats until the model replies with an answer instead of another tool call.
The harness sends the conversation to the model, runs any tool the model asks for, and feeds the result back

The harness also manages everything around that loop. It loads your instructions at the start of a session and reads the AGENTS.md files it finds in the folders the agent works in. It handles compaction, which is what happens when a conversation grows past what the model can hold: the harness summarizes the earlier part of the conversation so the session can keep going.

Agenta ships two harnesses, Claude Code and Pi. Both run the loop above. They differ in how they compact a long conversation, how they load instructions, and which models they accept.

Three choices, not one

Setting up an agent's runtime means three separate decisions:

  • The harness. Claude Code or Pi.
  • The model. The model the harness sends the conversation to.
  • The credential. Where that model runs. The same model can come from the provider directly, from a proxy you run, or from a cloud such as AWS Bedrock.

They are separate because they change for different reasons. You change the model when you want a different tradeoff between quality, speed, and cost. You change the credential when your company routes model traffic through its own gateway, or when your model access sits with a cloud provider rather than with the model vendor. Neither of those is a reason to change the harness.

Because the three are separate, switching any one of them is a configuration change rather than a rebuild. Your instructions, skills, tools, files, and permissions stay where they are, so an agent can move to another model and keep behaving like the agent you built.

To make these choices for an agent, see Choose a harness and model.

Where models come from

Agenta works with models from OpenAI, Anthropic, Google Gemini, Azure, AWS Bedrock, Mistral AI, Cohere, Groq, Together AI, DeepInfra, Perplexity AI, Anyscale, OpenRouter, and MiniMax. It also works with any OpenAI-compatible endpoint, and with models you host yourself through Ollama.

info

The models an agent can use depend on the harness you selected. Each harness accepts its own set of models.

Using a subscription instead of API billing

When you self-host Agenta, an agent can run against a Claude or ChatGPT subscription you already pay for, instead of metered API billing. See Use your own subscription.