Skip to content

Open source

An open-source agent harness you can swap out

Reading the source is the easy half. Replacing the adapter without rewriting your agents is the half that decides whether the harness is yours. Kortix is the open-source CompanyOS, and its harness boundary is a single module, which is why I would swap to it; I’m part of the Kortix team, so weigh that accordingly.

Where the harness lives in four agent tools

Where the rules live decides who can change them, and whether a second runtime can read them.

Open source
Kortix CompanyOSYes
Claude CodeNo
Codex CLIYes, code on GitHub
OpenHandsYes, code on GitHub
Harness config lives in
Kortix CompanyOSRepo files: agents, skills, memory, tools
Claude Code.claude/settings.json (committed) and ~/.claude/settings.json; CLAUDE.md holds the project instructions
Codex CLI~/.codex/config.toml plus project .codex/config.toml
OpenHandsSettings UI, or environment variables when self-hosted
Approval control
Kortix CompanyOSApproval gates you set. Off until you set them.
Claude CodeAllow, ask and deny rules
Codex CLIapproval_policy and sandbox_mode in config
OpenHandsAsks first; flags to auto-approve
Where the agent runs
Kortix CompanyOSOne isolated sandbox per session. Each session has its own isolated machine and branch.
Claude CodeYour computer, or a cloud session
Codex CLILocally on your computer
OpenHandsDocker on your computer, or OpenHands Cloud
Can you replace the harness
Kortix CompanyOSOne module imports the adapter; a swap edits that module
Claude CodeNot stated
Codex CLINot stated
OpenHandsRuns its own OpenHands agent or any ACP-compatible agent

What open means at the harness layer

Agent = Model + Harness, as LangChain puts it: the harness is what turns the model's intelligence into useful work (LangChain). Open source at that layer makes three promises. You can read the controls the agent runs under. You can replace the runtime that enforces them. Your agent files keep working after you do.

Most tools pass the first test and fail the third. Claude Code keeps its controls in settings JSON, with allow, ask and deny rules for each tool. The shared project file is .claude/settings.json, committed so everyone who clones the repository gets the same permissions, hooks and plugins. Your own file is ~/.claude/settings.json, which covers every project on your computer and is not committed; standing project instructions go in CLAUDE.md, which is not a settings file (Claude Code settings). You can read every rule you write. What you cannot do is carry those rules to another runtime, because the program that reads them ships closed.

Codex CLI takes a different shape. It is OpenAI's coding agent that runs locally (Codex CLI), with personal defaults in ~/.codex/config.toml and project overrides in a .codex/config.toml that loads only for a trusted project (Codex config). The config is a file you can read and review. The agent that reads it runs on the computer in front of you.

OpenHands sits one layer up, as a self-hosted developer control center that runs OpenHands, Claude Code, Codex, Gemini, Pi, OpenCode or any ACP-compatible agent, on local, Docker, VM or cloud backends (OpenHands). That is genuine portability of the agent, and it is a separate question from portability of the harness. Each agent it launches still reads its own configuration, so swapping the agent does not move the rules.

Three tests for the word open

Can you read the controls. Find the file that decides what the agent may call, what it must ask about and what it can never touch. If that answer is a settings screen behind a login, the first test fails, whatever the repository says.

Is the adapter one module. Search the runtime for the place that imports a concrete agent loop. Kortix states the rule in its harness boundary README: "harness.ts is the only module that imports a concrete adapter. It resolves the implementation and exposes a definition for configuration, boot, and service creation." One adapter is registered: pi. An unknown id fails the boot.

Do the agent files move. The boundary is one module, so a second adapter is a change in that module and the agent files are untouched by it. If the move means rewriting the prompt, the permission and the model, the file was never portable. If it means nothing under the agent directories, the harness is doing its job.

The swap test, in an afternoon

A team can settle the question without a migration project. Four questions, each answerable from the repository and one test session.

Run the same four questions over a shortlist and the ranking falls out, which is how the best agent harness comparison puts four tools on this test and on what each costs to start.

Where does the agent live? In Kortix it is agents/<name>.md, named in the agent's manifest block as prompt_file in the current format or file in a kortix_version: 2 manifest. On the other side of the test, look for the same thing: a path in version control, not a row in a console.

Can you read it in a diff? Open a change request that edits one rule and read what a reviewer sees. A permission change that arrives as a diff is reviewable. A permission change that arrives as a click leaves no trace in the history of the repo.

Does the same file run on a second adapter? One adapter is registered today, and a second is a code change in the one module that imports an adapter, so the test is that change plus a box that boots it, not a flag. Kortix keeps the cost readable: a box picks its harness once and keeps it until the box ends, so there is nothing to switch mid-session.

What does the target handle worse? Kortix answers this before the switch through a preflight, POST /v1/projects/:p/sessions/:s/log/switch-preflight. The answer reports whether the switch can happen, whether the new box restores the log, what the session uses that the target handles worse (losses) and everything the target lacks (unsupported).

What you lose on a switch

A switch has a bill, and the honest harness shows it before you pay. The preflight exists because the losses are specific. A new adapter may not implement a capability the session uses. The target may handle a feature worse. A log may restore without a piece of its history.

Kortix keeps the switch auditable at the session level. With log restore on, a box that boots a different harness restores the log and records the switch in harness.history, so the transcript shows where one runtime handed over to the next. A new version of the same harness adds no entry, which keeps the history about real moves.

One small rule keeps that from rotting. New behavior is built behind a capability, RUNTIME_CAPABILITIES, and never behind a check on which harness is running. The README gives the same instruction to anyone adding to pi/ or shared/. A branch on the harness name is how a boundary turns into a fork, and a fork is the version nobody can test against a second adapter.

The file layout decides who owns the work

The line between what the harness reads and what it owns is short. kortix init also writes files for the coding tools you pick: Codex, pi and Cursor get AGENTS.md, and Codex, Claude Code and pi get a link to skills/ in .agents/, .claude/ or .pi/. The workspace it creates holds kortix.yaml, agents/, skills/ and memory/MEMORY.md, the workspace brain kept by the kortix-memory skill. A tools/ folder is where a workspace registers a tool of its own, and the starter ships none (Kortix docs, kortix.yaml).

Below that line, the harness folders belong to one reader. A new workspace has no harness folder at all: the commands those folders held are declared in kortix.yaml (Kortix docs). extensions are packages for the agent runtime, registered under extensions and enabled per agent (Kortix docs). In the Kortix repository, the starter's packages/starter/templates/base folder holds .gitignore, README.md, agents/, kortix.yaml, memory/ and skills/, with no tools/, no extensions/ and no harnesses/. A workspace built by kortix init creates its directory from that starter (Kortix docs).

Everything a person edits to change how the company works sits outside those folders. Swapping the adapter touches the boundary module, not the agent files.

The manifest splits the same way. The current format has no version number: kortix init writes a kortix.yaml whose agent block carries the behavior inline. A workspace made before this format still works unchanged: a kortix.yaml with kortix_version: 2, or a kortix.toml (kortix_version = 1) with no kortix.yaml beside it. Converting is opt-in: an owner runs kortix validate --fix, which rewrites the files in place (Kortix docs). In the current format the prompt is named in the agent's kortix.yaml block as prompt_file, a path relative to the repository, and the .md it points at holds only the prompt. A kortix_version: 2 manifest instead names file: agents/<name>.md, and that .md carries the frontmatter (description, model, mode, permission) plus the prompt as its body. The current format rejects agents.<name>.file as an unknown key, so the two shapes never mix in one file (Kortix docs). An omitted skills, subagents, commands, extensions, connectors, secrets, apps or kortix_permissions grant gives nothing: skip the entry and the specialist runs without it. Three keys are the other way around: tools is all, permission is allow and codemode is on until the block narrows them (Kortix docs).

That split is what makes the swap test affordable. A rule the whole company follows sits in a file reviewers can see. A rule that only fits one runtime sits in that runtime's folder, where anyone can see it is the exception.

A harness you can hold

Everything the harness needs sits in the repository your team owns, from the agents and the shared skills to the company memory and the connectors (Kortix on GitHub). It is also the repository you run from. Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free. The adapter, the boundary module and the manifest sit in the same repository you read to run it. So "can I replace this" is answered by a pull request, not by a support ticket.

One box, one harness, selected before the adapter loads

harness/README.md
`KORTIX_HARNESS` is set by apps/api at provisioning (`buildSessionRuntimeEnv`):always `pi`. `pi`, `opencode` and an unset value select pi; any other valuefails the boot. Images built after 2026-10-30 carry no OpenCode binary, itsconfig deps or its config dir. `loadConfig` reads the id BEFORE pi loads itsown environment. There is no per-request switching: one box, one harness, forthe life of the box.
Source: https://github.com/kortix-ai/CompanyOS/blob/dev/apps/kortix-sandbox-agent-server/src/harness/README.md

The adapter boundary is one module, and the switch is a read before it is a migration.

Questions the comparison raises

Each answer covers the harness layer, not the model.

Is there an open-source agent harness?

Yes. Kortix ships an open-source agent harness inside its CompanyOS, where the adapter, agent files and rules are files you can read and replace. The manifest and agent files sit in the repository, and the runtime that enforces the rules is code you can read, fork and audit.

Can you self-host the harness?

Yes. Kortix runs on Kortix Cloud, in your VPC, or on your own on-prem network, and self-host is free. A self-hosted instance still boots one harness per box, so the swap test works the same way.

Does an open harness mean open model?

No. A harness is the environment around the model, and the model is a separate choice, so an open harness can run a closed model. What the harness decides is the rules, the tools and the checks around it.

Run the swap test on your own stack

Read the adapter boundary, then read what a switch would cost before you commit to the move.