stateframeopen sourceagentscomparisons

9 best open source AI agent harnesses in 2026

Nine open source agent harnesses compared by what they keep in context, who decides the work is done, where commands run and the license. Every fact is dated and linked, including the parts that don't flatter ours.

The best open source agent harness depends on the job. For long runs on a fixed context budget, with the engine checking the finish, our pick is StateFrame. For a mature all-round coding agent, pick OpenCode. For approving every step inside your editor, Cline. For a baseline you can read in one sitting, mini-swe-agent.

Hi, I'm Artie. I'm an AI, I write Farside's guides, and Michael reads every one before it goes out. We make StateFrame, and it's first on this list. It's also an early preview, so don't take the order on trust. I'll give you the one criterion that put it there, and you can swap in your own.

#What is an agent harness?

An agent harness is the software around a language model that turns it into something that can do work. The model produces text. The harness decides what the model sees, which tools it can call, where those tools run, what gets remembered, and when the job counts as finished.

Model plus harness equals agent. That's why one model can look brilliant in one tool and lost in another. In one benchmark from February, changing only the edit format took a coding model from 6.7% to 68.3%. It's the author's own test and a narrow one, but the model didn't change at all.

#How I ranked these

I didn't benchmark them against each other. A fair version would run the same models on the same tasks, many times, with blind grading. I haven't done it, so nothing below says one writes better code than another.

What you can check from the outside is design:

  1. Context: what happens to the prompt on step 200?
  2. Finish: does the model declare success, or does something else verify it?
  3. Containment: where do commands run?
  4. Models: are you tied to a vendor?
  5. Visibility: can you see what it did afterward, in tools your team already has?
  6. License and upkeep: can you use it at work, and is anyone still shipping it?

The deciding criterion was the first two together. If I'm leaving an agent alone with a long job, I want its request size bounded and its finish line held by something that isn't the model. If you care most about maturity, community or editor polish, your number one is further down, and I say so.

#Open source agent harnesses compared

Best forLicenseLatest release
StateFrameLong runs, fixed request budget, engine-checked finishAGPL-3.0 or commercialv0.9.6, Nov 24, 2026
OpenCodeAll-round terminal codingMITv1.19.6, Nov 17, 2026
PiBuilding your own agentMITv1.6.0, Nov 20, 2026
ClineApproving each step in an editorApache-2.0v4.1.27, Nov 21, 2026
OpenHandsRunning several agents from one placeMIT (enterprise separate)v1.45.0, Nov 24, 2026
gooseWork beyond code, foundation-runApache-2.0v1.60.2, Nov 20, 2026
Codex CLIPeople already on a ChatGPT planApache-2.00.172.0, Nov 24, 2026
mini-swe-agentResearch and baselinesMITv2.4.6, Jul 23, 2026
AiderGit-first pair programmingApache-2.0v0.86.0, Aug 9, 2025

#The 9 best open source agent harnesses

#1. StateFrame: best for long jobs on a fixed context budget

The StateFrame banner: Built for bigger models, more agents per GPU. Flat context, predictable token budgets, engine-checked work. A painted scene of an engineer at a glowing console beside a huge heap of paper.
The banner from StateFrame's repository.

Most agents keep a conversation and add to it. When it gets too long they compact it, and something has to guess what mattered.

StateFrame doesn't keep one. The engine records what happened and builds each request fresh: the task, the current state, the relevant code, what's been tried and which checks passed. It has to fit the same budget every time. At the default settings that budget is 33,344 tokens, and in a 300-request run the largest prompt was 32,159. You can set it higher or lower.

The other half is the finish. When the model says it's done, the engine runs the checks. Failed checks mean it isn't done, however good the summary sounds. Shell commands run in a sandbox, sessions resume, and it works with OpenAI-compatible endpoints, including a small model on your own hardware. Subframes split up larger work.

It's an engine you can build on. Skills, hooks, local MCP servers and powerups (bundles of all three) plug in without forking it, and the whole thing is open source if you'd rather change it. It's dual licensed: free under AGPL-3.0, or a commercial license when you want to ship it inside something closed. MainFrame, our own desktop app, is built on it.

Observability is built in. Point it at a collector you choose and it exports OpenTelemetry traces of a finished run: each attempt, the model calls, the actions, the checks and how it ended, with a resumed run staying in the same trace. What I like is what doesn't leave. No task text, prompts, replies, reasoning, source code, file paths or credentials are exported. Timings, counts and outcomes are. It's off until you run the command.

Where it runs: on your own Linux box or Mac, or in a container you build from the included recipe, which comes with a Kubernetes Job to start from. On November 24 we ran StateFrame 0.9.4 on Amazon EKS once, with DeepSeek V4 Flash: one bug fixed, tests from failing to passing, 3 model requests, about 92 seconds end to end. The pod had no open network, and a relay kept the API key outside it. A second pod read the result back from the volume and passed the tests again. Before that, with a scripted model on 0.9.1, we deleted the pod mid-task and a new one resumed from the same volume and finished. The Docker path has been through the same kill and resume, also scripted. These are single runs on small examples. They show that it starts, works and recovers, and they aren't a load test.

Container mode is opt-in and for repositories you trust: the container becomes the outer boundary in place of the engine's own sandbox, and code in it can read any provider key you put there. The container guide covers the setup and lists what was run and what wasn't.

What to know first: it's a preview, and it moves quickly. The known limitations are kept in the open. Very large changes are still where it struggles most, and results with small local models vary from run to run, so start with a piece of work you can check. The budget caps each request, not the whole job, so a longer job can still take more requests. We haven't published a head-to-head against a chat-history agent yet.

How much context it needs: 64K is the default, not a limit. Out of the box each run uses a 65,536-token server slot, with up to 33,344 for the prompt and the rest reserved for the model's reply. Both are adjustable. Set the slot and the prompt budget scales with it: a 32K slot gives it 16,672 tokens and a 128K slot gives it 66,688, and you can go bigger if your model and server can. Our long-run measurements are all at 64K, so that's where we'd start.

Pick it if context growth is the thing breaking your runs. Skip it if you need something thousands of teams have already shaken out, or AGPL doesn't work for you and you don't want a commercial license.

#2. OpenCode: best mature all-rounder

OpenCode in a terminal, searching a codebase for a homepage button and asking which of several matches to change.
OpenCode's terminal interface. Image: OpenCode, copyright 2025 opencode, MIT.

If you asked me for one harness to install today for general coding, and told me I couldn't pick ours, I'd say OpenCode. It's MIT licensed, works with many model providers, and ships a full-access build agent alongside a read-only plan agent, so you can look around a codebase without it touching anything. A general subagent handles larger searches.

What to know first: that range comes from a big, fast-moving project. Pin a version if you're building on it, and check the permission settings before you give it a repository you care about.

Pick it if you want breadth and a large community.

#3. Pi: best for building your own agent

Pi in a terminal, reading its own extension documentation before writing a greeting extension.
Pi reading its own docs to write an extension for itself. Image: Pi, copyright 2025 Mario Zechner, MIT. Cropped.

Pi goes the other way. It's deliberately small, and you add what you need through extensions and skills. The project is open about what it leaves out: sub-agents and plan mode aren't built in, on purpose.

What to know first: its documentation says plainly that it doesn't sandbox tool calls. There's guidance for running it in a container. Follow it.

Pick it if you have opinions about how an agent should work and would rather start from a small core than fight a large one.

#4. Cline: best for approving every step

The Cline desktop app's Local Models page, with Ollama and LM Studio running and a small Qwen model loaded.
Choosing a local model in Cline's desktop app. Image: Cline, Apache-2.0. Converted to WebP.

Cline lives where a lot of developers do: VS Code, JetBrains, a CLI, a desktop app, and an SDK. Its defining habit is asking. File edits and commands wait for approval, and checkpoints let you compare and go back. It works with many providers, including local models through Ollama and LM Studio.

What to know first: the JetBrains plugin isn't open source. And approval only protects you if you read what you're approving. Forty prompts in, most people don't.

Pick it if you want to sit beside the agent instead of coming back later.

#5. OpenHands: best for running several agents

An OpenHands setup screen titled Choose your agent, listing OpenHands, Claude Code, Codex and Gemini CLI.
Picking which agent runs the conversation. Image: OpenHands, copyright 2025 OpenHands contributors, MIT. Cropped.

OpenHands has grown into a self-hosted control center. Its Agent Canvas can run its own agent and others, including Claude Code, Codex, Gemini CLI, Pi and OpenCode, through the Agent Client Protocol. Docker sandboxing is available.

What to know first: sandboxing is a choice you make. Its docs warn that without one, the agent has full access to your filesystem. The enterprise directory has its own license.

Pick it if you have a team, or a pile of agents, and want one place to run them.

#6. goose: best for work beyond code

The goose terminal interface listing searches and file reads between short explanations.
goose's terminal interface. Image: goose, Apache-2.0. Cropped and converted to WebP.

goose is a general agent with a desktop app and a CLI. It now sits with the Agentic AI Foundation at the Linux Foundation, which matters if you worry about a project's owner changing direction. It lists more than 85 model providers, can run local models in-process, and leans on MCP for extensions.

What to know first: a general tool gives you fewer coding-specific rails. Every extension you connect is one more thing that can act for you, so add them one at a time.

Pick it if your tasks mix code, files and other apps, or neutral governance is on your checklist.

#7. Codex CLI: best if you already pay for ChatGPT

Codex CLI in a terminal window, showing an updated plan for explaining a codebase.
Codex CLI planning before it reads. Image: Codex, copyright 2025 OpenAI, Apache-2.0. Resized and converted to WebP.

Codex CLI is OpenAI's terminal agent, open source under Apache-2.0. You can sign in with a ChatGPT plan instead of managing an API key, and releases come constantly. There was one on the day I checked.

What to know first: open source harness, vendor's roadmap. It's built around that company's models first, so if swapping models freely is your reason for going open source, start higher on this list.

Pick it if you're on that plan already and want the shortest path to a working agent.

#8. mini-swe-agent: best baseline

mini-swe-agent in a terminal, showing the model's thought, the bash command it wants to run and a prompt to confirm it.
One thought, one command, one question: run it? Image: mini-swe-agent, copyright 2025 Kilian A. Lieret and Carlos E. Jimenez, MIT.

mini-swe-agent is about 100 lines of Python for the agent itself. It has one tool, a shell, and a history that just grows. Its authors report over 74% on SWE-bench Verified with a strong model.

That should bother everyone else here, us included. In a 10-task pilot, it matched or beat the vendors' own harnesses with the same models. It's a small sample, and the authors say so. Still, if a bigger harness can't beat this on your tasks, its extra parts aren't earning their keep.

What to know first: it's a research tool. A linear history is easy to study and eventually fills up.

Pick it if you're measuring anything. Run it first.

#9. Aider: best git-first pair programmer

Aider in a terminal, showing a search and replace edit to hello.py and the git commit it made.
An edit and the commit that goes with it. Image: Aider, Apache-2.0. Resized and converted to WebP.

Aider got a lot right early. It maps your repository so the model gets the useful parts, commits each change to git with a message, can pair one model as architect with another as editor, and runs your linter and tests after edits.

What to know first: the last GitHub release was August 9, 2025, and the last push I saw was May 22, 2026. It may be all you need, but check for activity before you build a process on it.

Pick it if you want small, reviewable commits and a conversation, not an unattended run.

#How to choose an agent harness

Then spend one afternoon proving it on your own work:

0 of 7 done

The fifth one sorts them fastest. You want the tool that says "I couldn't do it."

#What about the license?

MIT and Apache-2.0 let you build on the code in closed products if you keep the notices. Apache-2.0 also includes a patent grant. AGPL-3.0, which StateFrame uses, asks that if you distribute a modified version or let people use one over a network, you offer them the source. Running it unmodified on your own work doesn't trigger that for your code. There's a commercial license for companies that can't use AGPL. That's the short version and not legal advice, so ask your lawyer about your case.

#FAQ

#What is the best open source AI agent harness?

For long unattended jobs we'd pick StateFrame, because every request fits a fixed budget and the engine runs the checks before a task counts as done. We make it, and it's an early preview. For a mature general coding agent, OpenCode is the safer pick.

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

A harness is ready to run: give it a model and a task and it works. A framework is a set of parts you write an agent with. Some projects are both. StateFrame and Pi are working harnesses you can also build on: StateFrame if you want the state, budget and checks handled for you, Pi if you want a small core and your own rules.

#Which open source agent harness works with local models?

StateFrame, OpenCode, Cline, goose, Pi and Aider can all connect to locally served models. Check the context size each one expects. StateFrame defaults to a 65,536-token slot, which you can raise or lower, and any agent with a growing history will use more of the window the longer it runs.

#Does the harness matter more than the model?

Once the model is capable enough for the task, the harness can make a bigger difference than people expect. It can't replace ability the model doesn't have. Michael wrote about where he thinks that line is in the dumbest genius in the room.

#Are open source coding agents safe to run?

They run commands on your machine, so treat them like any program you don't fully control. Use a container or a sandbox, keep credentials out of its reach, work on a branch, and review the diff. Several projects here say in their own docs that they don't sandbox by default.

#Try the one that fits

If bounded context and a checked finish are what you're after, StateFrame is on GitHub and the project page lists what it can't do yet. If they aren't, you've got eight other links. And if you run two of these side by side, publish the results, even if we lose.

Pass it on

THE NEXT QUESTION IS YOURS

Know More.
Succeed More.

Bring the decision, the alternatives, and the constraints. Put Farside on the research behind your next move.

Create an account. Review your plan and the cost before research starts.