← Back to blog

The Best Open Source AI Agents and Frameworks (2026 Stack)

Sokko Team24 min read

What are the best open source AI agents in 2026?

There is no single best open source AI agent, because the projects solve different problems. For general orchestration and tool calling, LangChain with LangGraph (MIT) is the default. For retrieval over your own documents, LlamaIndex. For role-based multi-agent crews, CrewAI. For coding work, OpenHands when you want autonomy and Cline or Aider when you want to stay in the loop. For memory across sessions, Mem0 or Letta.

If your job isStart withLicenceThe catch
Orchestrating tool calls and branching flowsLangChain + LangGraphMITFast-moving API; pin your versions
Answering questions over your own documentsLlamaIndexMITRetrieval quality depends on your chunking, not the library
Multi-agent crews with defined rolesCrewAIMITRole-play can hide a weak plan; add evaluation early
An agent that writes and runs codeOpenHands, Cline, AiderMIT / Apache-2.0Keep a human on the diff
Remembering users between sessionsMem0, LettaApache-2.0Memory without an expiry policy becomes noise
A visual builder non-engineers can useDify, Langflow, FlowiseModified Apache 2.0 / MIT / Apache 2.0The commercial clauses are not identical
Running agents that are alive all dayAny of these, plus a runtimevariesA library is not hosting

Everything below is free to download. The real cost is the model API bill, the machine it runs on, and your operating time, and later sections put numbers on all three.

How this list is organised

The best open source AI agents and frameworks now cover the whole stack: orchestration, autonomous task loops, coding assistants, and the memory and tooling that hold it together. This roundup groups the projects that matter by what they are for, with a GitHub link for each so you can go straight to the source.

On vocabulary. "Framework" means a library you build on. "Autonomous agent" means a system designed to pursue a goal with minimal steering. "Coding agent" means an agent specialised to read and write code. "Memory and tooling" means the pieces that give any agent long-term recall and safe access to the outside world. Most real systems combine one from each group: a framework for orchestration, maybe an autonomous layer on top, a coding agent for the engineering work, and a memory store so nothing is forgotten between sessions. If you want the hosting side rather than the software, the AI agent platform comparison covers frameworks versus managed runtimes.

Star counts and last-commit dates below were read from the GitHub API on 6 November 2026. Momentum shifts monthly, so treat this as a map of categories and strong representatives rather than a fixed ranking. One caveat worth stating plainly: two projects on this list have gone quiet, and this guide says so where it applies instead of pretending a stale repo is alive.

Frameworks: the orchestration layer

These are the libraries you reach for first. They handle model calls, tool use, and how steps chain together.

LangChain

LangChain is the most widely used framework and, through LangGraph, offers graph-based control flow with checkpointing for agents that branch, pause for a human, and resume. Huge integration catalog, fast-moving API, about 149k stars. It is the default many teams start from because almost every model and vector store already has a connector.

LangGraph

LangGraph is worth naming separately even though it lives in the LangChain family. Where LangChain gives you chains, LangGraph gives you a state machine: nodes, edges, checkpoints, and a durable run you can resume after a crash or a human approval. If your agent needs to survive a restart mid-task, this is the part that does it. The trade is that you design the graph yourself, which is more work than a prompt and worth it the first time a run has to pause for three days.

LlamaIndex

LlamaIndex is the retrieval specialist. If your agent answers questions over your own documents, its ingestion, chunking, indexing, and query engines are the most mature in the group. Many teams run it as the retrieval layer beneath another orchestrator.

CrewAI

CrewAI models work as a crew of role-playing agents that hand tasks to each other, a researcher to a writer to an editor. Approachable mental model, quick to a working prototype for structured multi-step jobs. Around 60k stars, and the fastest path from idea to a running multi-agent demo.

Microsoft AutoGen

Microsoft AutoGen centres on multi-agent conversation, where several agents (optionally with a human) message each other toward a solution. Strong support for agents that write and run code in a sandbox, which makes it popular for research and data work. Note the licence: the repository ships under CC-BY-4.0, which is unusual for code and which you should read before shipping it inside a product.

The rest of the framework layer

Four more are worth knowing, and most teams need at most one of them:

ProjectWhy you would pick itLicence
Pydantic AIYou want typed, validated outputs and Python you can still debugMIT
OpenAI Agents SDKHandoffs, guardrails, and tracing with no framework sprawlMIT
Semantic KernelYou are in the .NET or Java world and need something supported thereMIT
HaystackYou are building a serious RAG pipeline and want explicit componentsApache-2.0

A pattern worth internalising: LangChain and LlamaIndex are complementary, not rivals. A very common setup uses LlamaIndex to build and query the retrieval index and LangChain or LangGraph to orchestrate the agent loop around it. Choosing a framework is rarely a single bet; it is picking the right tool for each layer.

Builders and front ends: agents without much code

Not every team wants to write a Python loop, and not every open source agent is a library. This layer is where the project is already an application.

ProjectWhat it gives youLicence reality
DifyVisual workflow builder, RAG, agents, and an API in one app. About 160k starsApache 2.0 plus conditions: no running it as a multi-tenant service without a commercial licence, and the console logo stays
LangflowVisual graph editor over LangChain, easy to hand to a non-engineerMIT
FlowiseDrag-and-drop agent and chatflow builder, quick to a demoApache 2.0, with an enterprise directory under a commercial licence
n8nWorkflow automation with agent nodes. About 210k starsSustainable Use Licence: internal business use is fine, reselling it as a service is not
Open WebUIA polished chat interface in front of any local or hosted modelCustom licence: keep the branding, and the free grant is capped at 50 users
LibreChatMulti-model chat UI with agents, easy to self-hostMIT

The pattern to notice: the visual builders are the ones with the licence strings attached. A builder that looks MIT at a glance often has a commercial clause covering exactly the thing you were planning to do, which is running it for your own customers. Read the licence file, not the badge on the repo page.

Autonomous agents: goal-seeking systems

These projects aim higher up the autonomy curve: give a goal, get a plan and execution with fewer manual steps.

AutoGPT

AutoGPT is the project that made autonomous agents mainstream, and at about 188k stars it is still the most-starred agent on GitHub. Today it is a platform for building and running agent workflows rather than the unbounded auto-looping demo it started as, with a visual builder on top of the core engine. The licence is split: everything in the autogpt_platform folder is under Polyform Shield, everything outside it is MIT. Polyform Shield is source-available, not open source in the OSI sense, and it restricts competing commercial use.

MetaGPT

MetaGPT assigns agents the roles of a software company, product manager, architect, engineer, and runs them through a defined workflow to turn a one-line brief into specs, diagrams, and code. Best when you want structured artifacts, not just chat. One honest caveat: the repository's last push was January 2026, so treat it as a reference design you can learn from rather than a project to build a business on.

SuperAGI

SuperAGI is a developer-first framework for building, running, and managing autonomous agents, with a GUI, tool integrations, and concurrent agent runs. It targets teams that want to operate several long-running agents rather than script one. It has also gone quiet: the last push was January 2025. Its ideas show up in newer projects, but if you need support today, look at LangGraph or CrewAI instead.

Coding agents: agents that ship code

A category of its own, because coding is where agents deliver the clearest daily value. About 71k stars for Cline and 93k for OpenHands is not hype; these are tools people use on real repositories.

OpenHands

OpenHands (formerly OpenDevin) is an autonomous software engineer that runs commands, edits files, and browses the web inside a sandbox to complete real development tasks. One of the most active open source coding-agent projects, MIT licensed.

Aider

Aider is pair programming in your terminal. It edits code across multiple files in your local Git repo and makes sensible commits as it goes. Lightweight, model-agnostic, Apache-2.0, and a favourite for working in an existing codebase rather than generating one from scratch. Because it maps every change to a Git commit, you get a clean audit trail and can revert an agent's work like any other bad commit, which is a large part of why developers trust it on real repos.

Cline and Continue

Cline lives in the editor and takes actions on a real machine: read files, run commands, call a browser, with you approving each step. Continue is the lighter option: completions, chat, and edits inside your IDE, wired to whatever model you bring. Both are Apache-2.0. The difference is how much rope you want: Cline is closer to full autonomy, Continue is closer to autocomplete.

Block's Goose and SWE-agent

Goose is a general-purpose local agent in Rust that happens to be excellent at code, Apache-2.0, and it runs on your machine rather than in a vendor's cloud. SWE-agent comes from research rather than product: it is built to attack GitHub issues automatically, and it is the project to read if you care about how much a coding agent can do with no supervision at all.

The distinction worth drawing clearly is autonomy level rather than project quality. OpenHands aims for autonomy: hand it a task and it plans, runs commands, and iterates in a sandbox with minimal supervision. Aider keeps you in the driver's seat: you describe each change, it makes the edit, you review the diff. Autonomy is faster when it works and expensive when it wanders, so many teams keep both around and reach for the right one per task.

Memory and tooling: the supporting layer

Agents forget between sessions unless you give them memory, and they are only as capable as the tools they can reach.

Mem0

Mem0 is a memory layer that adds persistent, personalised recall to agents and assistants, storing and retrieving facts across sessions so an agent remembers a user over time instead of starting cold every conversation. Apache-2.0, about 68k stars. It sits alongside your framework rather than replacing it: LangChain handles the loop, Mem0 handles what the agent remembers between loops.

Letta and Cognee

Letta (formerly MemGPT) takes the opposite approach: the agent manages its own memory as part of its loop, editing what it remembers instead of relying on an external retrieval call. Cognee builds a knowledge graph out of your documents and conversations, which suits entity-heavy domains where "find the passage that mentions" is the wrong question. Both Apache-2.0.

txtai and the tool layer

txtai is the smallest thing that works if you want embeddings, search, and a pipeline in one library without a framework around it. On the tool side, browser-use (MIT) gives an agent a real browser, and LiteLLM gives you one interface to a hundred model providers so switching models does not mean rewriting code.

Memory is the piece most first prototypes skip and most production systems regret skipping. A support agent that forgets a customer's plan tier every message feels broken no matter how good its reasoning is. Two kinds of memory matter: short-term memory is the current conversation, usually handled inside the framework; long-term memory persists across sessions and users, and that is what a dedicated store gives you, backed by a vector database so recall is semantic rather than exact-match.

The comparison table

Every project above, with the facts that decide between them. Licence strings are read from each repository's licence file, and where a project's licence is conditional the conditions are in the next section.

ProjectBest forLanguageLicenceStarsLast push
LangChainGeneral orchestration, tool callingPython / JSMIT149kNov 2026
LangGraphDurable, resumable agent graphsPython / JSMIT45kNov 2026
LlamaIndexRetrieval over your own dataPythonMIT53kNov 2026
CrewAIRole-based multi-agent crewsPythonMIT61kNov 2026
Microsoft AutoGenMulti-agent conversation, code executionPythonCC-BY-4.062kOct 2026
Pydantic AITyped, testable agentsPythonMIT21kNov 2026
OpenAI Agents SDKHandoffs and guardrails, minimal frameworkPythonMIT31kNov 2026
Semantic Kernel.NET and Java shopsC#MIT29kNov 2026
HaystackExplicit RAG pipelinesPythonApache-2.027kNov 2026
DifyVisual builder with RAG and an APIPythonApache 2.0 + conditions161kNov 2026
LangflowVisual graph editor over LangChainPythonMIT156kNov 2026
FlowiseDrag-and-drop chatflowsTypeScriptApache 2.0 + enterprise dir56kAug 2026
n8nAutomation with agent nodesTypeScriptSustainable Use210kNov 2026
Open WebUIChat UI in front of any modelSvelteCustom, 50-user cap158kNov 2026
LibreChatMulti-model chat UITypeScriptMIT47kNov 2026
AutoGPTWorkflow platform, visual builderPythonPolyform Shield / MIT188kNov 2026
MetaGPTStructured software-team workflowsPythonMIT71kJan 2026
SuperAGIManaging many long-running agentsPythonMIT18kJan 2025
OpenHandsAutonomous software engineeringTypeScript / PythonMIT93kNov 2026
AiderTerminal pair programmingPythonApache-2.050kMay 2026
ClineEditor agent that takes real actionsTypeScriptApache-2.071kNov 2026
ContinueCompletions and chat in your IDETypeScriptApache-2.036kNov 2026
GooseLocal general-purpose agentRustApache-2.056kNov 2026
SWE-agentAutonomous issue fixing, researchPythonMIT21kNov 2026
Mem0Long-term agent memoryPythonApache-2.069kNov 2026
LettaSelf-editing agent memoryPythonApache-2.025kOct 2026
CogneeKnowledge graph memoryPythonApache-2.033kNov 2026
txtaiEmbeddings and search, no frameworkPythonApache-2.013kNov 2026
browser-useReal browser for an agentPythonMIT120kNov 2026

What the licences actually let you do

Most of these are MIT or Apache-2.0, which is as permissive as licensing gets. The commercial questions concentrate in a handful of projects, and the answers are not obvious from the badge on the repository page.

LicenceUse it commerciallyModify and redistributeHost it as a service for othersWhere you hit it here
MITYesYes, keep the noticeYesLangChain, CrewAI, OpenHands, Langflow
Apache-2.0YesYes, plus a patent grantYes, mark changesAider, Mem0, Haystack, Cline
CC-BY-4.0Yes, with attributionYes, with attributionUnclear for code, get adviceMicrosoft AutoGen
Apache 2.0 + conditionsYesYesNo: Dify requires a commercial licence for a multi-tenant service, and the console logo staysDify, Flowise enterprise directory
Sustainable Use 1.0Yes, for your own businessYesNo: reselling n8n is a paid licencen8n
Polyform ShieldLimitedLimited, no competing productNoAutoGPT platform folder
CustomYes, under the termsYes, branding intact, free grant caps at 50 usersNoOpen WebUI

Two practical rules come out of that table. First, most of these projects are safe to build a product on; the permissive licences really are permissive. Second, the projects that are not safe share a shape: they are application-shaped software (a console, a builder, a workflow tool) and their authors plan to sell hosted versions themselves. If you intend to resell, check that class first, and expect to pay.

What self-hosting actually costs

The download is free. Everything else is not, and the honest comparison is between a small bill and a small pile of your own hours.

Cost lineTypical small deploymentNotes
Model API calls$20 to $300 a monthThe dominant variable. An agent that runs all day with a long context costs multiples of one that answers a few prompts
Server$10 to $60 a monthA 2 vCPU / 4 GB box runs the orchestrator comfortably; memory stores want more
GPU, if you run local models$150 to $600 a month rented, or $1,500+ to buyOnly worth it at steady load, or for data reasons
Vector database$0 to $70 a monthEmbedded options are free until your corpus grows
Operating time4 to 12 hours a monthPatching, restarts, logs, the upgrade that breaks an integration
Your evaluation effortUnboundedThe cost that decides whether the thing works

The number people underestimate is the last one. A self-hosted agent is software you now operate: it needs restarts, upgrades, a backup plan, and someone who reads the logs when it goes quiet at 3am. That is fine if operating it is the point. It is a poor use of a founder's week if the agent is meant to answer support tickets.

Do you need a GPU?

Only if you want to run the model yourself. Calling a hosted model needs no GPU at all, and for most teams that is the cheaper decision.

Model size4-bit quantised, in memoryRuns onRealistic feel
7B to 8BAbout 5 to 6 GBA 12 GB consumer card, or an M-series Mac with 16 GBFine for classification, extraction, short drafts
14BAbout 10 GB16 GB card, or 24 GB to leave headroomThe sweet spot for local tool calling
32BAbout 20 GB24 GB card, or a 32 GB MacGood reasoning, slow first token
70BAbout 40 GBTwo 24 GB cards or a rented A100Only worth it if the data cannot leave
Anything bigger80 GB and upRented GPUA hosted API is usually cheaper

Two things catch people out. Context length eats VRAM on top of the weights, so a 14B model at 32k context needs noticeably more than the table suggests. And local models are slower per token, which matters most for agents, because an agent makes many calls in sequence; a model that feels fine in a chat window can turn a two-minute task into twenty.

Open source versus a managed platform

The software and the runtime are separate decisions, and teams that conflate them end up operating infrastructure they never wanted to own.

Self-hosted open sourceManaged platform
Upfront costLowA monthly plan
Control over the model and data pathTotalWhatever the vendor exposes
Time to first working agentHours to daysMinutes
Who handles restarts and upgradesYouThe vendor
Who debugs a broken integrationYouThe vendor

If you want that tradeoff as a walkthrough rather than a table, the self-hosted vs managed AI agents comparison works through it end to end. The other half of the decision is what the agent has to talk to once it is running, and the integration catalogue lists what is available without writing a connector.

How to pick from this list

Do not adopt ten projects. Pick one per layer that matches your problem, and add layers only when you feel the gap.

  • Building a question-answering agent over internal docs? Start with LlamaIndex for retrieval, add LangChain or LangGraph if orchestration gets complex, and bolt on Mem0 when users expect the agent to remember them.

  • Automating a multi-step business process with clear roles? CrewAI will get you to a prototype fastest.

  • Want an agent that writes and runs code? OpenHands or Cline for autonomous end-to-end tasks, Aider when you want a human in the loop on an existing repo.

  • Research or data workflows where agents must execute code safely? AutoGen's sandboxed execution is a strong fit.

  • Want non-engineers to build their own flows? Dify or Langflow, after you read the licence clause on running it for customers.

  • Long-running autonomous operations? LangGraph for durable state, or the AutoGPT platform if you want the builder more than the code.

A few honest caveats. Autonomous agents still wander and burn tokens on open-ended goals, so constrain them and set spend limits. Coding agents are excellent accelerators and poor unsupervised committers; keep review in the loop. Most projects here move fast, so pin versions and read changelogs before upgrading. And two entries on this list are dormant, which is a reminder that a popular repository is not the same thing as a maintained one.

What changed in the 2026 stack

Three shifts separate this list from the one you would have written two years ago. Coding agents graduated from novelty to daily driver: OpenHands, Cline and Aider are normal parts of engineering workflows now, not experiments. The autonomous-agent hype cooled into something more useful, as projects like AutoGPT stopped promising fully hands-off magic and became platforms for building constrained, supervised workflows, which is what actually ships. And memory became a first-class concern: standalone stores like Mem0, Letta and Cognee exist because teams learned that an agent without persistent recall is a demo, not a product.

The quieter change is convergence on standards. Tool-calling formats, structured outputs, and increasingly the Model Context Protocol for connecting agents to external tools have cut how much glue code you write to move between frameworks. That makes these choices less locked-in than they used to be, which is good news when you are picking early and might change your mind. It also means the frameworks are converging on being interchangeable at the edges, so the differentiator is drifting toward the runtime: where the agent lives, what it can reach, and whether it is still alive tomorrow morning.

Running and evaluating these agents

Two questions come up right after you clone a repo, and both deserve a plan before you write much code.

Evaluation comes first. An agent that looks great on three hand-picked prompts can fail on the fourth in ways you will not notice until a user does. Build a small test set of real tasks with known good outcomes early, and re-run it every time you change a prompt, a model, or a tool. Several of the frameworks above integrate with tracing and evaluation tooling so you can see each step the agent took and where it went wrong, which turns debugging from guesswork into reading a log.

Hosting comes second, and it is a separate decision from the software:

  • Local first. Every project here runs on your machine for development. That is the right place to start and the wrong place to stop.

  • Stateless agents can live on a container platform or a serverless function if tasks are short.

  • Stateful, long-running agents that keep a working directory, cache embeddings, or hold memory need persistent storage and a process that stays alive, which points toward containers or a managed runtime.

From repo to a running agent

Cloning a repo is the easy part. The harder question is where these agents run once they work, because open source frameworks are libraries, not hosting. An agent that keeps a persistent workspace, survives restarts, and stays isolated from other tenants needs a runtime underneath it. That is a hosting decision, separate from your framework choice, and it is worth making deliberately: the guide on running AI agents on Kubernetes covers the infrastructure side, the best VPS for AI agents comparison covers the single-box version, and if you would rather not operate a cluster, Sokko runs any of these frameworks on always-on infrastructure we manage for you, with a persistent workspace and each agent isolated from every other.

For a worked example that takes one of these frameworks all the way to a live service, see how to deploy a LangChain agent to production. If your concern is what an agent needs around it before it is safe to leave running, the AI agent infrastructure stack covers the other pieces.

Mistakes that cost the most

Five patterns show up again and again in self-hosted agent projects, and none of them is about choosing the wrong library.

  1. Treating the demo as the product. The repo's example works in one script with one prompt. Production has retries, timeouts, partial failures, and a user who types something strange.

  2. No spend ceiling. An agent in a loop with a retry bug can spend a month of budget in an afternoon. Cap spend and steps per run before you cap anything else.

  3. Secrets in the agent's files. The agent has file tools, so a key in a dotfile is a key in the model's context the first time it goes looking. Keep them in a store the tools read at call time.

  4. No evaluation set. Without a handful of known-good tasks you cannot tell an improvement from a regression, and every prompt change becomes a coin flip.

  5. Choosing a dormant project. Check the last commit before you build on something. Several famous agent repositories are a year or more past their last push.

The stack is more capable and more open than it has ever been. The projects above are the pieces teams are actually shipping with in 2026, and any two or three of them, chosen for your specific job, will take you a long way. What decides whether it works is rarely the framework. It is whether the agent is still running next week, and whether anyone can tell what it did.