Search "open source AI agent" and the first page hands you four different things: a roundup of coding-agent orchestrators, one coding agent's homepage, GitHub's topic page with 104,884 repositories, and a framework vendor. They answer four different questions. And "open source" is doing loose work: the orchestrator roundup includes a tool under the Elastic License 2.0, and the topic page doesn't check licenses at all.

So I pulled license, stars, latest release and published security advisories for 34 agent repos with gh api on October 2, 2026, then read every LICENSE file. 26 are open source across all their code. Four are open core. Four aren't open source at all, including n8n at 206,483 stars and Claude Code at 148,912.

The short answer: pick by job, then check the license file and the last release date. For a coding agent you run, start with OpenCode (MIT) for provider freedom or Codex CLI (Apache-2.0) if you already pay for ChatGPT. For a personal assistant on your own hardware, OpenClaw or Hermes Agent (both MIT), with sandboxing switched on first. To build your own, LangGraph or Pydantic AI in Python, Mastra in TypeScript. For a visual builder that really is open source, Langflow (MIT) or Sim (Apache-2.0); n8n and Dify are source-available, and Flowise was archived in August.

Which open source AI agent fits your job?

Decide what the agent has to do before comparing stars. The four jobs below barely overlap: a coding CLI won't sit in your WhatsApp, and a visual builder won't edit your repo.

Your jobStart withWhyRunner-up
Coding agent in your terminalOpenCode (MIT)75+ providers including local models; largest coding-agent communityCodex CLI (Apache-2.0)
Coding agent in VS Code or JetBrainsCline (Apache-2.0)Edits shown as diffs; edits and commands wait for your approvalOpenCode IDE extension (MIT)
Coding agent that also runs in CI or as a daemonOctomind (Apache-2.0, ours)One binary for terminal, pipes, daemon, WebSocket and ACPOpenHands (MIT)
Personal assistant in your chat appsOpenClaw (MIT)20+ channels, state and credentials on your hardwareHermes Agent (MIT)
Desktop generalist: research, writing, filesGoose (Apache-2.0)Desktop app, CLI and API; Linux Foundation governanceDeerFlow (MIT)
Browser automation from your own codeBrowser Use (MIT)Python library, local browser plus any model—
Build your own agent in PythonLangGraph (MIT)Explicit graphs and durable state for long runsPydantic AI (MIT)
Build your own agent in TypeScriptMastra (Apache-2.0 core)TypeScript-native, 40+ model providers—
Build your own agent in .NETMicrosoft Agent Framework (MIT).NET and Python; Microsoft's successor to AutoGen—
Visual builder you self-hostLangflow (MIT)Each flow becomes an API and an MCP serverSim (Apache-2.0)

What counts as open source here (and the 30-second check)

An agent counts as open source in this article only if the code you would run carries an OSI-approved license. A public repo is not enough. The Open Source Definition rules out licenses that restrict a "field of endeavor", which is what n8n's and Dify's licenses do when they limit commercial or multi-tenant use.

BucketWhat it means for youIn this list (34 repos)
OSI license on all codeUse it commercially, fork it, host it for others26, e.g. OpenCode, OpenClaw, LangGraph, Langflow
Open coreThe core is OSI-licensed; named folders need a commercial license4: AutoGPT (platform folder), Mastra (ee/), Activepieces (ee/), Flowise (enterprise dir)
Source-available or "fair-code"Read and self-host it, with limits on how you use it3: n8n, Dify, Crush
Proprietary with a public repoIssues and releases are public; the code license is "all rights reserved"1: Claude Code

The trap is GitHub's license field. It said NOASSERTION for OpenClaw, whose LICENSE file is plain MIT with one extra line about third-party notices. It said CC-BY-4.0 for AutoGen, because that file covers the docs; the code sits under MIT in a second file, LICENSE-CODE. And it said NOASSERTION for n8n too, which genuinely isn't open source. The field is a hint. The file is the answer.

You need the GitHub CLI, signed in once with gh auth login:

bash
REPO=n8n-io/n8n
# license as GitHub detects it, stars, last push, archived flag
gh api "repos/$REPO" --jq '{license: .license.spdx_id, stars: .stargazers_count, pushed: .pushed_at, archived: .archived}'
# the license text itself: read it whenever the field isn't a plain SPDX id
gh api -H "Accept: application/vnd.github.raw" "repos/$REPO/license" | head -n 8
# latest stable release
gh api "repos/$REPO/releases/latest" --jq '.tag_name + " " + .published_at'
# published security advisories by severity
gh api "repos/$REPO/security-advisories?state=published&per_page=100" --paginate --jq '.[].severity' | sort | uniq -c

For n8n on October 2 it printed "license":"NOASSERTION", a LICENSE that opens with "Portions of this software are licensed as follows", release [email protected] from that morning, and 210 advisories, 22 of them critical. Two things to look for in the license text: the words "internal business", "competing" or "multi-tenant", and any folder named ee or enterprise. If the license call returns HTTP 404, GitHub found no license it recognizes; open the repo root yourself. That's what happens with Claude Code, whose terms sit in LICENSE.md.

Coding agents you run: the short list

Seven of the eight open-source coding agents below shipped a release in the eight days before I checked; Aider is the exception, at 14 months. For benchmark numbers on real pull requests, see our ranking of the best AI coding agents; this section adds license and health data and stops there.

All numbers checked October 2, 2026. "Advisories" counts security advisories the repo itself has published, total (critical).

ProjectLicenseOpen source?StarsLast releaseAdvisories (critical)
OpenCodeMITYes211.4k2026-09-303 (1)
Codex CLIApache-2.0Yes127.6k2026-10-011 (0)
Gemini CLIApache-2.0Yes107.2k2026-09-290 (0)
OpenHandsMITYes89.8k2026-09-251 (0)
ClineApache-2.0Yes69.7k2026-10-023 (1)
Open InterpreterApache-2.0Yes68.5k2026-09-300 (0)
AiderApache-2.0Yes49.3k2025-08-090 (0)
Octomind (ours)Apache-2.0Yes1472026-09-300 (0)
Claude CodeProprietaryNo148.9k2026-10-0132 (0)
CrushFSL-1.1-MITNo28.4k2026-09-290 (0)

OpenCode is the default pick for a terminal agent with provider freedom: 75+ providers through Models.dev, local models included, plus sign-in with an existing Copilot or ChatGPT Plus/Pro account. The documented drawback is the default: per the OpenCode README, the build agent you start in is "full-access", so press Tab for the read-only plan agent when exploring code you don't trust. Install with curl -fsSL https://opencode.ai/install | bash.

Codex CLI is OpenAI's local coding agent in Rust. The Codex README recommends signing in with a ChatGPT plan; an API key works but needs extra setup. Open source here means read and fork, not contribute: the contributing guide says "We do not accept external code contributions or pull requests." Install with npm install -g @openai/codex.

Gemini CLI is still Apache-2.0 and actively released, but its cheapest path closed. Google's deprecation notice says consumer "Login with Google" stopped serving Gemini CLI on June 18, 2026, while the Gemini CLI README still advertises the personal-account free tier of 60 requests a minute. The working routes are a Gemini API key (the README lists 1,000 requests a day free), Vertex AI, or a Code Assist Standard or Enterprise seat. Our Gemini CLI alternatives post covers the migration.

Cline is the editor-first choice: VS Code extension, JetBrains plugin, CLI (npm i -g cline), desktop app and SDK on one agent core. Each file edit and terminal command waits for your approval unless you switch on auto-approve. One gap in the "open" story, from the Cline README: "Currently we are not open-sourcing JetBrains plugins."

OpenHands turned into Agent Canvas, a self-hosted control center that runs OpenHands or any ACP agent (Claude Code, Codex, Gemini) on local, Docker or VM backends, with scheduled and webhook automations. The quickstart without a sandbox warns that "the agent will have full access to your filesystem", so use the Docker option from the OpenHands README unless the machine is disposable.

Open Interpreter has changed shape. Per its README, it's now a Rust fork of Codex whose /harness command emulates other agents' harnesses (Claude Code, Kimi Code, Qwen Code) to get more out of low-cost models. Version rust-v0.0.55 says how early that is.

Aider is the terminal pair programmer that auto-commits each change to git, per its README. Its last release, v0.86.0, shipped on August 9, 2025, and the last push to the repo was in May 2026. It still installs (python -m pip install aider-install && aider-install); just weigh a 14-month release gap before standardizing a team on it.

Octomind is ours, so read this one with that in mind. It's an open source AI coding agent: an Apache-2.0 Rust binary where the same session runs interactively, piped through stdin in CI, as a daemon, over WebSocket, or as an ACP agent for Zed and JetBrains. Models are named provider:model (local: points at an Ollama server on localhost), and policy lives in .agents/guardrails.toml, checked around tool calls instead of through approval pop-ups; --sandbox restricts writes to the working directory via Landlock on Linux and Seatbelt on macOS. In our 25-task benchmark, with the same GLM-5.2 model, endpoint and prices, it solved 24 tasks to OpenCode's 19 (the benchmark write-up has the full table and setup); that run used a staged tap and a binary override, so it measures our complete setup.

The drawbacks are real: 147 stars makes it the smallest community in this article, there's no TUI and no VS Code integration in its docs, and anonymous usage telemetry is on until you set DO_NOT_TRACK=1. Install with curl -fsSL https://octomind.run/install.sh | bash.

Two popular agents show up in "open source" lists and shouldn't. Claude Code's public repo carries a LICENSE.md that reads "© Anthropic PBC. All rights reserved." Crush uses the Functional Source License, which turns each version into MIT two years after release; until then it bars competing uses.

Personal and general-purpose agents

This group has the most stars and the most security work to do. These agents hold your accounts, read your messages and run shell commands, so the default sandbox setting matters more than any feature list.

ProjectLicenseOpen source?StarsLast releaseAdvisories (critical)
OpenClawMITYes391.2k2026-09-30722 (14)
Hermes AgentMITYes250.7k2026-09-240 (0)
DeepSeek HarnessMITYes242.0knone stable0 (0)
AutoGPTMIT + Polyform ShieldCore only187.7k2026-09-3040 (10)
Browser UseMITYes117.0k2026-09-041 (1)
DeerFlowMITYes83.3k2026-09-240 (0)
GooseApache-2.0Yes54.9k2026-09-231 (0)

OpenClaw is the most-starred repo in this article: a self-hosted assistant whose Gateway reaches you on Discord, iMessage, Slack, Teams, Telegram, WhatsApp and 20+ other channels, stewarded by a foundation with no paid tier. Its README is blunt about the risk: "Tools run on the host for the main session unless you configure sandboxing." The sandboxing docs confirm it ships off, and the repo had published 722 advisories between January 31 and September 11, 2026, 14 of them critical.

Turn sandboxing on before connecting a channel. The docs' minimal example sandboxes every non-main session, which per the modes reference includes all group and channel chats; Docker is the default backend:

json5
{
	agents: {
		defaults: {
			sandbox: { mode: 'non-main', scope: 'session', workspaceAccess: 'none' }
		}
	}
}

Set mode: 'all' to sandbox your main session too. If you are weighing it against the rest of this group, see OpenClaw alternatives.

Hermes Agent from Nous Research is the learning-loop alternative: it writes skills from completed tasks, keeps cross-session memory, schedules cron jobs, and talks to you from Telegram, Discord, Slack, WhatsApp or Signal through one gateway. Seven terminal backends let it run commands in Docker, over SSH, or on Modal and Daytona instead of your laptop. Older lists call it WSL2-only on Windows; its README now documents native Windows support, and hermes claw migrate imports an existing OpenClaw setup.

The drawback is in its own security docs: command approvals default to smart, and its deny rules are "a shell-command policy, not ... an OS capability sandbox." For containment, pick a container backend. Install with curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash.

Goose is the general-purpose desktop agent: desktop app, CLI and API, 15+ providers including Ollama, and 70+ MCP extensions, now governed by the Agentic AI Foundation at the Linux Foundation. Its known-issues page documents a failure you can hit in web projects: in the goose CLI, a command that never exits, like npm run dev, may hang the session. The fix is to customize the shell Goose uses via GOOSE_TERMINAL.

Browser Use is the MIT Python library for agents that drive a browser (uv add browser-use). The catch, per its README: the model it recommends, BU2, needs a paid BROWSER_USE_API_KEY, and stealth browsers and CAPTCHA handling are cloud features. A local Chrome driven by a local Ollama model costs nothing beyond your hardware.

DeerFlow from ByteDance is a "super agent harness" on LangGraph that plans, spawns sub-agents, and runs code in sandboxes for research-to-report jobs. It's heavy: the DeerFlow README asks for 4 vCPU and 8 GB RAM for local evaluation and warns that 2 vCPU / 4 GB is usually not enough. It's designed for the 127.0.0.1 loopback interface; exposing it on a LAN without extra auth is the documented risk.

DeepSeek Harness went from a repo created on August 13, 2026 to 241,989 stars in seven weeks. It's a plugin-architecture harness with a web UI (npx @deepseek-ai/dsh web), and its README says plainly it's a developer preview with compatibility-breaking changes ahead. There's no stable release yet, only a release candidate. Experiment with it; don't build on it.

AutoGPT is two licenses in one repo. The original agent under classic/ is MIT; the newer autogpt_platform/ is under Polyform Shield, which the README sums up as free for personal and internal business use but not for a competing hosted service. Self-hosting needs a running Docker daemon, and Windows users are pointed to a manual guide.

Open source AI agent frameworks for building your own

Pick a framework by language first, then by how much control flow you want to write yourself. All eleven below have OSI-licensed cores; the differences are runtime model, typing, and what sits behind the paywall.

ProjectLicenseOpen source?StarsLast releaseAdvisories (critical)
LangChainMITYes147.4k2026-09-299 (1)
AutoGenMIT (code)Yes61.3k2025-09-300 (0)
CrewAIMITYes59.3k2026-09-280 (0)
LangGraphMITYes42.6k2026-09-2310 (0)
AgnoApache-2.0Yes42.5k2026-10-013 (1)
OpenAI Agents SDKMITYes29.8k2026-10-020 (0)
smolagentsApache-2.0Yes29.6k2026-05-290 (0)
MastraApache-2.0 + ee/Core only28.5k2026-09-301 (0)
Google ADKApache-2.0Yes21.7k2026-10-020 (0)
Pydantic AIMITYes20.3k2026-10-0216 (0)
Microsoft Agent FrameworkMITYes13.9k2026-10-010 (0)
  • Pick LangGraph (pip install -U langgraph) if you want explicit graphs and durable state for long-running agents. LangChain's create_agent gives you a prebuilt ReAct agent on the same runtime, and a JS/TS port exists.
  • Pick Pydantic AI (uv add pydantic-ai) if typed inputs and outputs matter and you want to swap models by changing one string.
  • Pick the OpenAI Agents SDK (pip install openai-agents) for handoffs and guardrails with thin abstractions. Despite the name, its README says it's provider-agnostic across 100+ LLMs.
  • Pick CrewAI (uv tool install crewai) for role-based "crews" plus event-driven "flows". Know two defaults from the CrewAI README: agents call the OpenAI API unless configured otherwise, and anonymous telemetry is on until you set OTEL_SDK_DISABLED=true.
  • Pick Google ADK (pip install google-adk) if you're on Gemini or Google Cloud. It's tuned for Gemini but model-agnostic, with Java, Kotlin, Go and TypeScript versions.
  • Pick smolagents (pip install "smolagents[toolkit]") for a minimal agent whose core loop is about 1,000 lines and whose CodeAgent writes its actions as Python. Run that code in E2B, Modal, Blaxel or Docker, not on your host. Its last release was May 29, 2026.
  • Pick Mastra (npm create mastra@latest) for TypeScript. It routes to 40+ providers; anything under an ee/ directory is separately licensed.
  • Pick Microsoft Agent Framework (pip install agent-framework, or the Microsoft.Agents.AI NuGet package) for .NET or Python shops.
  • Pick Agno if you want the framework and a runtime that serves your agents as an API in one package.
  • Don't start on AutoGen. Its README says it's in maintenance mode, with no new features, and sends new users to Microsoft Agent Framework. Its last release was September 30, 2025.

One budgeting note: the framework is open, the control plane often isn't. LangChain sells LangSmith for observability and deployment, and CrewAI sells its AMP suite. Plan to run your own tracing or pay for theirs.

Open source AI agent platforms: check the license twice

Visual builders are where "open source" gets stretched furthest. Of the six self-hostable platforms checked, only Langflow and Sim are OSI-licensed on every line, and the most-starred one, n8n, says itself that it isn't open source.

ProjectLicenseOpen source?StarsLast releaseAdvisories (critical)
n8nSustainable UseNo206.5k2026-10-02210 (22)
DifyModified Apache-2.0No157.7k2026-09-1021 (0)
LangflowMITYes155.5k2026-09-2937 (17)
FlowiseApache-2.0 + enterprise dirCore only55.5k2026-07-29 (archived)130 (41)
SimApache-2.0Yes29.8k2026-10-020 (0)
ActivepiecesMIT + ee/Core only24.8k2026-09-309 (1)

Langflow is the open pick: MIT, a visual builder where every flow also deploys as an API and an MCP server. Start it with uv pip install langflow -U and uv run langflow run; it listens on 127.0.0.1:7860. Keep it there or behind authentication. Langflow has published 37 advisories, 17 critical, including CVE-2025-3248, an unauthenticated remote code execution, so internet-facing instances must track releases.

Sim is the Apache-2.0 alternative with 1,000+ integrations and Ollama or vLLM for local models. Self-host with npx sim-setup (Node.js 20+ and Docker). One dependency to know from the Sim README: "Chat is a Sim-managed service," so a self-hosted install still connects a key from sim.ai for that feature.

n8n has 1,500+ integrations and the biggest community here, under its Sustainable Use License: use limited to internal business, non-commercial or personal purposes, and files with .ee. in the name need an enterprise license. n8n's own license docs say "we do not call ourselves open source." In practice: automating your company's work is fine; letting customers connect their accounts and build workflows on your instance needs a commercial agreement.

Dify uses a modified Apache 2.0 with two extra conditions: no multi-tenant service without written permission (one workspace counts as one tenant), and the logo and copyright in the console stay. Contributors also agree the producer can make the license stricter later. It needs at least 2 CPU cores and 4 GiB RAM under Docker Compose.

Activepieces is MIT outside packages/ee/ and packages/server/api/src/app/ee, per its LICENSE. Build on the MIT part and check which features you use live in those folders.

Flowise is done. The team announced a code freeze on July 29, archived the repo on August 13, and ended support on August 31, 2026. With 130 published advisories, 41 critical, and nobody shipping patches, migrate to Langflow or Sim, or fork and own the security work yourself.

What stars and advisory counts can't tell you

The tables measure attention, activity and disclosure. They don't measure whether an agent will finish your task.

  • Stars track hype as much as use. The top repo on GitHub's ai-agents topic, at 271k stars, isn't an agent at all but a skills and memory add-on for Claude Code, Codex and others. DeepSeek Harness collected 242k stars while still a developer preview with no stable release.
  • Advisory counts reward honest maintainers. The column counts advisories a repo published through GitHub; a CVE filed elsewhere doesn't show up, and zero can mean a small attack surface or no disclosure process. OpenClaw's 722 reflect both a big surface and a team that publishes fixes.
  • Licenses change. n8n was Apache 2.0 with Commons Clause until March 17, 2022, and Dify's contributor terms reserve the right to tighten. Re-run the check above before a major upgrade.
  • Our own entry has limits. Octomind has 147 stars, so you will read docs more than forum threads. It has no TUI and no VS Code integration (Zed and JetBrains connect over ACP, Neovim through a plugin), and telemetry is opt-out, not opt-in.

Get Octomind — an Apache-2.0 agent whose same session runs in your terminal, in CI and as a daemon, on any model.

FAQ

What is the best open source AI agent?

There is no single best open-source AI agent, because the jobs differ. For coding in a terminal, OpenCode (MIT, 211k stars) has the largest community; for a self-hosted personal assistant, OpenClaw or Hermes Agent (both MIT); for building your own, LangGraph or Pydantic AI; for a visual builder, Langflow (MIT) or Sim (Apache-2.0). Check the license file and the last release date before committing: Flowise was archived in August 2026, and AutoGen is in maintenance mode.

Is n8n open source?

No, not by the Open Source Initiative's definition. The n8n license is its own Sustainable Use License, which limits use to internal business, non-commercial or personal purposes, and n8n's own docs say the company does not call itself open source. You can self-host it to automate your own company's work; offering it to customers to build their own workflows needs a commercial license.

Is Claude Code open source?

No. The anthropics/claude-code repository is public, with issues and releases, but its LICENSE.md reads "All rights reserved" and points to Anthropic's commercial terms. OpenCode (MIT), Codex CLI (Apache-2.0) and Octomind (Apache-2.0) are open-source terminal coding agents you can inspect and fork.

Can open source AI agents run on local models?

Many can. OpenCode counts local models among its 75+ providers, Goose supports Ollama, Browser Use and Sim document Ollama setups, and Octomind's local: provider points at an Ollama server on localhost. Tool calling depends on the model, so test before committing; our guide to running a coding agent locally with Ollama walks through the setup.

Is OpenClaw safe to self-host?

It can be, with configuration. OpenClaw ships with sandboxing off and runs tools on the host for the main session, so enable a sandbox mode (Docker is the default backend) before connecting chat channels. Keep up with releases: the repo published 722 security advisories, 14 critical, between January 31 and September 11, 2026.