The full guide
Open-source agents, step by step
The main open-source AI coding agents today are OpenCode (MIT), OpenAI's Codex CLI, Google's Gemini CLI and xAI's Grok Build (all Apache-2.0), Hermes Agent (MIT), Cline and Kilo Code in your editor, goose, Aider, OpenHands, and DeepSeek Harness, new and in developer preview. Claude Code is not open source. Open source covers the agent, not the model: you can read and change the program, and you still pay for every call it makes.
The open-source AI coding agents, by licence
| Agent | Licence | Runs as | Models |
|---|---|---|---|
| OpenCode | MIT | terminal, desktop beta | 75+ providers |
| Codex CLI | Apache-2.0 | terminal | OpenAI, local via --oss |
| Gemini CLI | Apache-2.0 | terminal | Gemini |
| Grok Build | Apache-2.0 | terminal | Grok, or any model on your endpoint |
| Hermes Agent | MIT | terminal, desktop, chat apps | any model |
| Aider | Apache-2.0 | terminal | almost any |
| Cline | Apache-2.0 | VS Code, terminal, desktop | any provider |
| Kilo Code | MIT | VS Code, JetBrains, terminal | 500+ via Kilo |
| goose | Apache-2.0 | desktop, terminal | 15+ providers |
| OpenHands | MIT | self-hosted web app | any |
| DeepSeek Harness | MIT | local web app | DeepSeek first |
Open-source terminal agents
- OpenCode. A terminal agent from Anomaly, with a desktop app in beta. It connects to more than 75 providers and to local models, so the model and its price are yours to pick. Release v1.19.3 came out on 16 October 2026. More: OpenCode vs Claude Code, how to install OpenCode.
- Codex CLI. OpenAI's terminal agent, signed in with ChatGPT or an API key;
--ossruns a local model through Ollama or LM Studio. The CLI is Apache-2.0; Codex's desktop app and editor extension are not in that repository. Release rust-v0.163.0 came out on 15 October 2026. - Gemini CLI. Google's terminal agent, Gemini models only. Since 18 June 2026 it no longer serves free users or Google AI Pro and Ultra; it still works on Gemini Code Assist Standard and Enterprise and on paid API keys, and Google moved free users to Antigravity CLI. The repository still ships releases: v0.64.0 on 13 October 2026. More: Gemini CLI vs Claude Code.
- Grok Build. xAI's terminal coding agent, under Apache-2.0, with a full-screen interface; it also runs headless and inside editors. Its binaries come from x.ai rather than GitHub releases.
- Hermes Agent. Nous Research's agent, under MIT: a terminal interface, a desktop app and a gateway to chat apps, with any model or your own endpoint. It is a personal agent rather than one built for coding alone. Release v0.22.2 came out on 15 October 2026.
- Aider. Pair programming in your terminal, with almost any model, local ones included. Its latest release is v0.86.0, from 9 August 2025; the last commit is from 22 May 2026.
Open-source agents in your editor and on the desktop
- Cline. A VS Code extension, a CLI (
npm i -g cline) and a desktop app, with any provider. Its JetBrains plugin is the exception: the README says Cline is not open-sourcing it. - Kilo Code. VS Code, JetBrains and a CLI, under MIT, with 500+ models through a Kilo account at the providers' rates. Kilo's CLI is a fork of OpenCode.
- goose. A desktop app for macOS, Linux and Windows, plus a CLI and an API, with 15+ providers. It now lives at
aaif-goose/goose, part of the Agentic AI Foundation at the Linux Foundation. - OpenHands. Now called Agent Canvas: a self-hosted web app, marked beta, that runs its own agent or others such as Claude Code, Codex and Gemini. The repository moved to
OpenHands/OpenHands. - DeepSeek Harness. DeepSeek's own agent, started with
npx @deepseek-ai/dsh web, which opens a web UI on127.0.0.1. It is a developer preview, and its README warns of compatibility-breaking changes.
Two that ranked in older lists have stopped. Roo Code shut down on 15 May 2026 and its repository is archived. Continue says its repository is no longer actively maintained and is read-only, after a final 2.0.0 release.
Claude Code is not open source
Claude Code's repository on GitHub has a licence file, and it reserves every right:
© Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service.
You can use Claude Code on a Claude plan or an API key, but its licence gives you no right to change it or redistribute it. If an open licence is the point, the agents above are the choice; how they compare with Claude Code on price and limits is in AI coding agents compared.
Open source is the agent, not the model
Every agent here calls a model, and the model is billed by whoever serves it: OpenAI for Codex CLI, Google for Gemini CLI, your provider for OpenCode, Cline, Kilo Code, goose and Aider. A local model is the exception: OpenCode, Aider, Cline, goose and Codex CLI (with --oss) can run one on your own machine, and then the cost is your hardware. The licence decides what you may do with the program. What a day of work costs is decided by the model, and by how much context each call carries.
What they cost to run, measured
Three of these agents, measured on my machine from Caprock's database on 8 October 2026:
| Agent | Sessions | Calls | Cost | Median call |
|---|---|---|---|---|
| OpenCode | 70 | 9,309 | $156.28 | $0.0023 |
| Codex CLI | 17 | 16,238 | $621.30 | $0.030 |
| DeepSeek Harness | 2 | 432 | $0.88 | $0.0018 |
- Mostly the model. Most OpenCode calls ran DeepSeek V4 Pro and nearly all the rest MiniMax M3; DeepSeek Harness ran DeepSeek V4 Pro. Codex CLI ran mostly OpenAI's GPT-5.6 and GPT-6 models, and gpt-5.6-sol alone was $503.46 of its $621.30.
- Almost all of it cached. The share of input read from the cache was 98.7% for OpenCode, 97.6% for Codex CLI and 99.7% for DeepSeek Harness.
- Different ways of pricing. OpenCode computes its own cost and Caprock passes it on unchanged. Codex and DeepSeek Harness report tokens and no cost, so Caprock prices them from its own table of list prices. All of it is modelled from list prices, not a bill.
This does not rank the agents. They ran on different projects, in different months, on models priced very differently, and DeepSeek Harness has two sessions. Gemini CLI is not measured: Caprock records only the Gemini CLI sessions it starts, and it started none on this machine.
Running several open-source agents: Caprock
Caprock is open source too, under Apache-2.0: a free desktop app for macOS, Windows and Linux that records every coding agent on the machine, whether or not it started it, and adds up what each session cost.
- It starts six. New agent offers Claude Code, Codex, OpenCode, Gemini CLI, Grok Build and Hermes Agent, each in a terminal tab of the project you pick, in their own programs with your own sign-ins.
- It reads them from disk. Claude Code's and Codex's transcripts, OpenCode's and Hermes Agent's databases, opened read-only, and DeepSeek Harness's transcripts, with nothing to configure. Sessions from before you installed it are included.
- DeepSeek Harness is read only. Caprock shows its sessions and cost but does not start it.
- Gemini CLI only when Caprock starts it. It reads the telemetry file Gemini CLI writes for the sessions Caprock launched.
- Grok Build without its cost. Caprock starts it and lists its sessions, but does not read their turns or cost.
- One table. Sessions and cost per call and per project, across all of them, and search over what Claude Code, Codex, OpenCode, Hermes Agent and DeepSeek Harness wrote. Gemini CLI sessions are found by what you asked them.
What Caprock does not read
- Aider, Cline, Kilo Code, goose, OpenHands and Continue. Caprock does not start or read any of them.
- Gemini CLI sessions you start yourself, outside Caprock, and Gemini CLI's replies: from its telemetry Caprock keeps your prompts, not its answers.
The OpenCode, Codex and DeepSeek Harness readers were verified on macOS. On Windows and Linux they build and their tests pass, but they have not been run there.
Which to pick
- OpenCode — a terminal agent with any model, your own keys or a local one.
- Codex CLI or Gemini CLI — you already pay OpenAI or Google and want their agent with its source open.
- Cline or Kilo Code — you want the agent inside VS Code.
- goose or OpenHands — you want a desktop or self-hosted app that is not tied to a terminal.
- Caprock — you run more than one of these, or one of them beside Claude Code, and want one record of them, with what each costs. Install it, or see how it puts five agents in one table.
Questions people ask
- What are the open-source AI coding agents?
- OpenCode (MIT), OpenAI's Codex CLI (Apache-2.0), Google's Gemini CLI (Apache-2.0), xAI's Grok Build (Apache-2.0), Hermes Agent (MIT), Aider (Apache-2.0), Cline (Apache-2.0), Kilo Code (MIT), goose (Apache-2.0), OpenHands (MIT) and DeepSeek Harness (MIT), each licensed as its GitHub repository states on 20 October 2026.
- Is Claude Code open source?
- No. Its licence file reads: "© Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service."
- Is Codex CLI open source?
- Yes, under Apache-2.0. The source in openai/codex is the CLI; the desktop app and the editor extension are not in that repository.
- Which open-source coding agent runs in VS Code?
- Cline and Kilo Code are VS Code extensions, and both have a terminal version too. Cline's JetBrains plugin is not open source; Kilo Code's is in the same MIT repository.
- Are open-source AI coding agents free?
- The agent is; the model is not. You pay whoever serves the model, unless you run a local one, which OpenCode, Aider, Cline, goose and Codex CLI (with --oss) support. On one machine the median OpenCode call cost $0.0023 and the median Codex CLI call $0.030.
- Can I run several open-source agents together?
- Yes. Caprock, itself open source under Apache-2.0, starts Claude Code, Codex, OpenCode, Gemini CLI, Grok Build and Hermes Agent in terminal tabs, reads DeepSeek Harness's sessions from disk, and adds each session's cost to one table; it reads no cost for Grok Build.
Sources
- OpenCode on GitHub — MIT licence, README, release v1.19.3 (16 October 2026), read 20 October 2026
- OpenCode docs — providers: 75+ LLM providers and local models, read 20 October 2026
- Codex CLI on GitHub — Apache-2.0, release rust-v0.163.0 (15 October 2026), read 20 October 2026
- Gemini CLI on GitHub — Apache-2.0, release v0.64.0 (13 October 2026), read 20 October 2026
- Google Developers Blog — Transitioning Gemini CLI to Antigravity CLI, 19 May 2026, read 20 October 2026
- Aider on GitHub — Apache-2.0, release v0.86.0 (9 August 2025), read 20 October 2026
- Cline on GitHub — Apache-2.0; VS Code, CLI, desktop, JetBrains plugin not open source, release v4.1.25 (16 October 2026), read 20 October 2026
- Kilo Code on GitHub — MIT; Kilo CLI is a fork of OpenCode, release v7.8.15 (19 October 2026), read 20 October 2026
- goose on GitHub — Apache-2.0, part of the Agentic AI Foundation at the Linux Foundation, release v1.55.0 (16 October 2026), read 20 October 2026
- OpenHands on GitHub — MIT, Agent Canvas, release v1.28.1 (19 October 2026), read 20 October 2026
- DeepSeek Harness on GitHub — MIT, developer preview, 0.2.1 release candidate (17 October 2026), read 20 October 2026
- Continue on GitHub — no longer actively maintained, final 2.0.0, read 20 October 2026
- Roo Code on GitHub — archived, shut down on 15 May 2026, read 20 October 2026
- Claude Code licence: all rights reserved, read 20 October 2026
- Grok Build on GitHub — Apache-2.0, xAI's terminal coding agent, read 20 October 2026
- Hermes Agent on GitHub — MIT, release v0.22.2 (15 October 2026), read 20 October 2026
- Caprock licence — Apache-2.0
- Caprock source — the agents New agent can start (internal/agents/binaries.go)
- Caprock source — reading Gemini CLI's telemetry file (internal/gemini/telemetry.go)
- Caprock spec — DeepSeek Harness, observation only (.ai/20-deepseek.md)
- Caprock docs — Hermes Agent: read from its database, started from New agent (docs/hermes.md)
- Caprock README — OpenCode, Codex and DeepSeek Harness: how each is read and priced
Try it
The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app