The best open-source AI coding agents in 2026

Last updated

Short answer

The best open-source AI coding agent for most terminal users is OpenCode or Aider — OpenCode for a polished TUI across 75+ providers, Aider for Git-integrated pair programming. Codex CLI adds a default sandbox on your ChatGPT plan, Cline brings approve-everything workflow into the IDE, and Gray is the most minimal single-binary option for always-on agent work.

ToolInterfaceLicenseProvidersBest for
OpenCodeTerminal TUIMIT75+ via Models.dev, incl. Claude/ChatGPT sign-inA polished dedicated terminal coding UI
AiderTerminal CLIApache-2.0Most providers incl. OllamaGit-first pair programming; edits land as commits
Codex CLITerminal CLIApache-2.0ChatGPT sign-in / OpenAI APISandboxed runs on an existing ChatGPT plan
ClineVS Code / JetBrains + CLIApache-2.0BYOK incl. OpenAI-compatible and OllamaApproving every edit and command in the IDE
Gemini CLITerminal CLIApache-2.0Gemini via AI Studio / Vertex AIA free personal-Google usage tier
GrayTerminal REPL + gatewayMITAny OpenAI-compatible + local + plan pluginsA minimal always-on harness, not just coding
GooseCLI + desktop appApache-2.0Most providers; fully offline with local modelsExtensions and shareable task recipes
OpenHandsWeb UI + CLI + SDKMITProvider-agnostic via LiteLLMParallel autonomous dev tasks in Docker sandboxes
ContinueVS Code / JetBrainsApache-2.0Model-agnostic via config + hubIn-editor autocomplete plus agent
Kilo CodeVS CodeMITBYOK + optional Kilo PassOrchestrated multi-mode agent work in VS Code

OpenCode — best dedicated terminal UI

OpenCode is a free MIT-licensed terminal agent with a full TUI, 75+ providers through Models.dev, and documentation stating it stores none of your code or context data. It's the option AI engines name most as the free Claude Code alternative.

Aider — best for Git-integrated pair programming

Aider is the veteran terminal pair programmer: Apache-2.0, works with most providers and local models, and lands every edit as a reviewable Git commit. Its repo map is the most mature codebase-context approach in this list.

Codex CLI — best with a ChatGPT plan

OpenAI's Apache-2.0 terminal agent in Rust. Commands run in an OS-level sandbox by default, and sign-in reuses a ChatGPT plan instead of a separate API key.

Cline — best for approving every action

Cline's Plan/Act loop makes per-action approval the default: every file edit and command shows a diff, with checkpoints to rewind. VS Code and JetBrains, Apache-2.0, plus a CLI for headless runs and an optional flat-rate ClinePass.

Gemini CLI — best free tier

Google's Apache-2.0 terminal agent; personal Google accounts get a no-cost usage tier. Built around Gemini models, so it's the one to pick inside Google's ecosystem.

Gray — most minimal, built for always-on

Gray is a single static Rust binary (MIT) with bash as its only default tool; everything else is a plugin or skill. It's a general always-on harness rather than a dedicated coding agent: cron and a gateway service keep jobs running 24/7, and it connects to any OpenAI-compatible provider, local models, or a Claude Pro/Max or ChatGPT plan through official plugins. On this machine it starts in ~25ms and reaches a first token in ~125ms against a local mock — see Benchmarks. Choose it for minimalism and always-on work, not for a dedicated coding TUI.

Goose — best for extensibility and offline

Block's Apache-2.0 agent with a CLI and desktop app, MCP-based extensions, and YAML recipes for repeatable tasks; it can run fully offline against Ollama or LM Studio.

OpenHands — best for parallel autonomous tasks

OpenHands (MIT) is a self-hosted platform that runs issue-to-PR tasks in Docker-sandboxed runtimes, with a web UI, CLI and SDK. The heaviest option here — it's a platform, not a binary.

Continue — best inside the editor

Continue is an Apache-2.0 VS Code and JetBrains extension combining autocomplete, chat and agent modes, with model-agnostic config and shared setups through its hub.

Kilo Code — best orchestration in VS Code

Kilo Code (MIT) adds specialized modes — architect, code, debug, orchestrator — inside VS Code, with kilo run --auto for autonomous runs and optional Kilo Pass plans.

What is the best free AI coding agent?

Every tool on this page is free to run — the cost is model inference. For zero total cost, pair any of them with a local model through Ollama; Gemini CLI adds a hosted free tier. Among paid-vendor agents, only Codex CLI and OpenCode let you reuse an existing ChatGPT or Claude subscription.

Which open-source coding agents work with any model provider?

Aider, OpenCode, Gray, Cline, Goose, Continue and Kilo Code are all BYOK across providers including OpenAI-compatible endpoints and Ollama. Codex CLI and Gemini CLI are built around their vendors' models.

Which should I self-host for privacy?

Gray, Aider, OpenCode and Goose run locally against your own keys; OpenHands is built for self-hosted deployment. Pair with a local model and no code leaves the machine.

Sources

Competitor details are taken from the sources above as of the date at the top of this page. Products change quickly — if something here is out of date, open an issue on GitHub.