# An open-source agent harness is configured; a framework is written

> An open-source agent harness is the layer a team configures, while a framework is the library it writes against, so starting with a framework means building the harness by hand. Kortix is the open-source CompanyOS.

URL: https://agentharnessguide.com/agent-harness-vs-agent-framework

## One agent's grants, written out line by line

`kortix.yaml`

```yaml
agents:
  worker:
    tools: all
    skills: all
    connectors: all
    secrets: all
    kortix_permissions: all
    workspace: { project_repository: true }
```

Source: https://github.com/kortix-ai/suna/blob/dev/packages/starter/templates/base/kortix.yaml

Eight lines from the starter manifest: every grant the worker agent holds, written out because an omitted grant grants nothing.

## Two words, two jobs

Agent harness vs agent framework is not a choice between alternatives. A framework is the library a team writes against; a harness is the layer a team configures, and a team that starts with a framework has not skipped the harness. It has taken on building one.

Both words describe software around a model, which is why they get mixed. The difference is what each one owns. A framework gives a developer a way to describe agents: a graph, a set of handoffs, a shared state, a workflow. A harness gives those agents somewhere to run: the loop that calls the model, the tools it may use, the sandbox the tools touch, the rule for asking a person, and the record the run leaves behind.

## Four layers, and the products that sit in each

Dr Phil Winder's 2026 comparison puts the stack in four layers: the model reasons, the harness runs one agent, the framework composes several, and the platform runs many harnesses across a team over time ([winder.ai](https://winder.ai/ai-agent-harness-comparison/)). LangChain draws a three-way version inside its own products, with LangChain as the framework, LangGraph as the runtime and Deep Agents as the harness ([LangChain](https://docs.langchain.com/oss/python/concepts/products)). The maps differ in where they put the runtime. They agree that the framework is the layer a developer imports and the harness is the layer that runs.

### The model

The model is the API a team points at. It takes tokens in and returns tokens out, and it is the one layer every other layer shares. None of the products in the harness-versus-framework argument is a model. They are the software that decides how a model gets called.

### The harness

A harness is the runtime for a single agent. It carries the loop, the tool list, the sandbox and the approval rule from the first turn to the last, and it ends when the task ends. The products people compare in this layer are the ones that run a single agent. Pi's repository calls it an agent harness ([pi](https://github.com/earendil-works/pi)). TrueForge calls itself "the runtime layer that turns an LLM into a working agent" ([TrueForge](https://github.com/truefoundry/trueforge)). DeepSeek Harness is "an open-source harness from DeepSeek" ([DeepSeek](https://deepseek.com/en/harness)). OpenCode is "an open source AI coding agent" ([OpenCode](https://opencode.ai/docs/)). Cursor is "a coding agent for building ambitious software" ([Cursor](https://cursor.com/docs)). Hermes is "the self-improving AI agent built by Nous Research" ([Hermes](https://hermes-agent.nousresearch.com/docs/)). OpenHands describes its work as AI-driven development ([OpenHands](https://docs.openhands.dev/overview/introduction)).

Codex and Claude Code belong here too. OpenAI says its harness "powers all these experiences", and Claude Code is an agentic coding tool whose harness Anthropic does not publish ([Codex](https://developers.openai.com/blog/codex-as-a-platform), [Claude Code](https://code.claude.com/docs/en/overview)).

### The framework

A framework composes several agents. It gives a developer abstractions for describing them, and the field is large. LangChain's docs name the neighbours: "Other examples of agent frameworks include Vercel's AI SDK, CrewAI, OpenAI Agents SDK, Google ADK, LlamaIndex, and many more" ([LangChain](https://docs.langchain.com/oss/python/concepts/products)). The labels those products use for themselves vary. CrewAI describes itself as a framework for orchestrating autonomous AI agents and building complex workflows ([CrewAI](https://docs.crewai.com/en/introduction)). Google ADK is "the open-source agent development framework" ([ADK](https://adk.dev/)). The OpenAI Agents SDK is "a lightweight, easy-to-use package with very few abstractions" ([OpenAI](https://openai.github.io/openai-agents-python/)). LlamaIndex is "a Python toolkit for building LLM-powered agents over your data" ([LlamaIndex](https://developers.llamaindex.ai/python/framework/)). Mastra, which LangChain's list does not name, is "a TypeScript framework for building AI agents and applications" ([Mastra](https://mastra.ai/docs)).

Two products sit on the line. LangGraph calls itself "a low-level orchestration framework and runtime", which is why it appears on both sides of the question ([LangGraph](https://docs.langchain.com/oss/python/langgraph/overview)). Microsoft Agent Framework is a framework that ships a harness inside it: its overview lists a "Harness Agent" beside agents, workflows and integrations ([Microsoft Learn](https://learn.microsoft.com/en-us/agent-framework/overview/)). The framework is the layer a team writes in; the Harness Agent is the component it hands you, so a framework can contain a harness without becoming one.

### The platform

The platform layer is the one that outlives a single run. It decides who on a team may start which agent, where the finished work lands, what the work cost, and what record a reviewer can still read a year later. Kortix is this layer. Every session runs an open-source agent harness, and the manifest in the project repo is where a team writes down what that harness may do. OpenHands Cloud is a managed service for running OpenHands without operating the backend and sandbox yourself ([OpenHands](https://docs.openhands.dev/overview/introduction)). LangSmith is LangChain's platform for testing, deploying and monitoring agents ([LangChain](https://docs.langchain.com)).

## What a framework leaves to the team

The framework's own documentation is honest about the boundary. LangChain's concepts page gives the framework abstractions, the runtime durable execution, streaming, human-in-the-loop and persistence, and the harness planning, subagents, a file system and token management ([LangChain](https://docs.langchain.com/oss/python/concepts/products)). A team that adopts a framework gets the abstractions. The other two are still its problem.

Four things have to exist before an agent can run unattended. A framework can help with the first; the other three are decisions it leaves open.

- The loop that keeps calling the model. A framework can describe it. Something still has to execute it, survive a restart and decide when to stop.
- The sandbox the tools run in. A framework can call a tool. The machine the call touches, and what that machine can reach, is a separate decision.
- The approval rule. A framework can expose a hook. Which calls wait for a person, and where that rule is stored, is still a choice the team makes.
- The session record. A framework can emit events. Where the transcript lands, and how long it survives, is a separate decision.

Those four are the harness. A team that picks a framework first writes them, buys them from a runtime, or discovers after the first unattended run that nobody owns them. The work does not disappear because the framework has a graph API.

## Where the manifest stops and the harness starts

The starter manifest is a short file, and every line in it configures the harness rather than implementing it. It names the project and the agent a session runs when it names none, and the agent's block points at its prompt file. The closing comment names three more keys a team can add: a sandbox template, its own tools, and triggers. None of those lines describes a turn, a tool call, a retry or a stopping rule.

The loop belongs to the harness that reads the file, so the file cannot describe it. That is the division the whole question turns on. The manifest is where a team writes down what the harness may do. The harness is the code that does it. A framework, in this picture, is a third thing: a library the team imports to describe agents the harness will run.

Kortix runs exactly one harness, and the manifest is how a project configures it. One isolated sandbox per session. Each session has its own isolated machine and branch. Approval gates you set. Off until you set them. Work lands through a change request a person approves.

## Which layer to choose first

The usual advice is to pick a framework, then a runtime. The order is backwards for any team that will run agents unattended. The framework's API is the part a team can change in an afternoon. The harness's approval rule and the place its session record lands are the parts it lives with.

Two questions decide more than any graph API. Who approves a tool call when nobody is at the keyboard? Where is the record of that call six months later? Answer those two and the framework choice follows. A team that needs a person to approve every write and a record in a repository it owns is choosing a harness and a platform. A team that needs a graph of a dozen agents with shared state is choosing a framework, and it should budget for the harness it will write around it.

Kortix takes the first shape. The layer that decides how an agent behaves is already configured: the approval rule is a setting beside the agent, the session runs on its own branch, and the work reaches a person before it lands. The framework question does not disappear. It becomes smaller, because the team is no longer building the layer underneath it.

The [agent harness comparison](/agent-harness-comparison) places the named projects on these layers and shows where each keeps its state. If the definition is still the open question, [what an agent harness is](/what-is-an-agent-harness) takes it part by part. And [which harness fits](/best-agent-harness) sorts the field by those two questions.

## Questions the two words raise

### What is the difference between an agent framework and an agent harness?

A framework is the library a team imports to describe agents: graphs, handoffs, shared state. A harness is the runtime that executes one agent: the loop, the tools, the sandbox, the approval rule and the session record. A framework composes several agents; a harness runs one.

### Is the Microsoft Agent framework a harness?

No. Microsoft Agent Framework is a framework for building and orchestrating agents, and it ships a component it calls a Harness Agent, with planning, context compaction, file access and tool approval built in. The framework is the layer a team writes in.

### What is the agent harness framework?

Either a framework used to build a harness, or a harness that arrives ready-made. LangChain's Deep Agents is the second kind: a harness that builds on LangGraph, the runtime beneath it, with planning, files and subagents added.

### Is agent the same as harness?

No. An agent is what you get when a model and a harness run together: the model supplies the reasoning, the harness supplies the loop, tools and memory, and the pair finishes the task. A harness on its own is software; a model on its own returns text.

## Configure the layer that decides the run

The manifest is where the grants and the prompt file are written; the harness is what reads them.

[Try Kortix](https://kortix.com)
