Open-Source AI Agent Frameworks: What Each One Is For
Eight open-source AI agent frameworks compared by purpose, licence, state model and MCP support, with a decision table.
Open-source AI agent frameworks are code libraries that give you the loop around a language model: calling tools, keeping state, handing work between agents. They differ mainly in how they model control flow. Some use an explicit graph, some use role-based teams, some use typed Python functions, some have the model write code. This post covers eight with an official repository and documentation, using each project's own description, the licence shown in its repository and the MCP support its documentation states. It does not rank them and quotes no popularity figures. Last verified 2026-10-07.
Which frameworks does this cover, and how were they chosen?
The eight are LangGraph, CrewAI, Microsoft Agent Framework, the OpenAI Agents SDK, Google's Agent Development Kit (ADK), LlamaIndex, Pydantic AI and Hugging Face smolagents. The selection rule was practical: each has an official repository, public documentation that could be opened on 2026-10-07, and a licence field. Many other good projects exist. Absence from this list is not a judgement.
Facts here come from each project's README or documentation page. Where a page did not state something, the entry says "not verified". Project details change quickly, so check the linked pages before you commit.
What is each framework for?
| Framework | In the project's words | Languages | Licence in repository | State and control flow | MCP as documented |
|---|---|---|---|---|---|
| LangGraph | "a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents" | Python (repository language) | MIT | Graph of nodes and edges over shared state; persistence and human-in-the-loop inspection of state | Through the LangChain MCP adapter, which the docs mark as beta |
| CrewAI | "an open-source Python framework with high-level abstractions and low-level APIs for building production-ready multi-agent workflows" | Python | MIT | Crews are role-based teams; Flows are event-driven with state management | README states MCP and agent-to-agent support |
| Microsoft Agent Framework | "an open, multi-language framework for building production-grade AI agents and multi-agent workflows" | Python and .NET; a Go SDK is in public preview in a separate repository | MIT | Agents plus graph-based workflows, with sessions for state, checkpointing and human-in-the-loop control | Docs list MCP servers and MCP clients |
| OpenAI Agents SDK | "a lightweight, easy-to-use package with very few abstractions" | Python (a separate TypeScript repository exists) | MIT | Agents, handoffs, guardrails, sessions and tracing | Hosted, Streamable HTTP, stdio and SSE servers, with per-tool approval settings |
| Google Agent Development Kit | "the open-source agent development framework that lets you build, debug, and deploy reliable AI agents at enterprise scale" | Python, TypeScript, Go, Java and Kotlin per the docs | Apache-2.0 (Python repository) | LLM agents and workflow agents (sequential, loop, parallel, and graph workflows in version 2.0); sessions, state and memory | Docs state MCP tools are supported |
| LlamaIndex | "an open-source framework to build agentic applications" | Python and TypeScript | MIT | Event-driven workflows combining agents, data connectors and tools, with branching, retries and human-in-the-loop review | Docs describe using MCP server tools in workflows and serving workflows as MCP servers |
| Pydantic AI | "a typed, extensible agent loop with every model a string swap away" | Python | MIT | Agents are generic over dependency and output types; a separate Pydantic Graph package provides typed graph control flow | Docs list MCP as a composable capability |
| smolagents | "a library that enables you to run powerful agents in a few lines of code" | Python | Apache-2.0 | Code agents write their actions as Python code instead of JSON | Docs state tools from MCP servers are supported |
Two notes. AutoGen, Microsoft's earlier framework, carries this notice in its README: "AutoGen is now in maintenance mode. It will not receive new features or enhancements and is community managed going forward." The README names Microsoft Agent Framework as its successor, and the Agent Framework documentation describes itself as the direct successor to both AutoGen and Semantic Kernel. The AutoGen repository reports a Creative Commons licence for documentation and the README says the code is MIT.
LlamaIndex's README says the company's focus has moved towards its commercial document-processing platform, while the open-source framework remains available. Check which of the two you are evaluating.
Which one fits which need?
The table maps a need to the design that suits it, and names the entries above that were built for it. It is a starting point for a trial, not a recommendation.
| Need | What to look for | Frameworks designed around it |
|---|---|---|
| Explicit control flow with durable state | A graph or workflow you can draw, with persistence and pause points | LangGraph, Microsoft Agent Framework, Google ADK workflows |
| A team of role-based agents | Agents with roles and goals that delegate to each other | CrewAI |
| Type-safe Python with validated output | Typed dependencies and output schemas checked at runtime | Pydantic AI |
| Retrieval over your documents | Data connectors, indexing and retrieval inside agent steps | LlamaIndex |
| Minimal code and few abstractions | A small API surface you can read in an afternoon | OpenAI Agents SDK, smolagents |
| Several languages in one organisation | Official SDKs beyond Python | Microsoft Agent Framework, Google ADK, LlamaIndex, OpenAI (separate repository) |
| The model writes code as its action | Code execution with isolation | smolagents |
If your process has fixed steps, a plain workflow in ordinary code often beats any framework. Both Anthropic's agent guidance and Microsoft's documentation say to start with the simplest design that works. See agentic workflow for the patterns.
What do you still have to build yourself?
A framework gives you building blocks inside one application. It generally does not give you an organisation-level control layer. Some projects include pieces of it, so read each one, but plan for these gaps:
- Identity. Who is this agent, who owns it, and which credentials does it hold? Frameworks pass keys you configure. They do not manage agent identities across a company.
- Approvals. Some frameworks offer per-tool approval, for example the OpenAI Agents SDK settings for MCP tools and Pydantic AI's tool approval. A shared, auditable approval process across projects is still yours to build.
- Audit. Tracing helps debugging. A tamper-evident record of who approved what, kept outside the application, is a separate system.
- Cost caps. A loop limit protects one run. Spend limits across models, teams and providers sit outside any single library.
- Sandboxing. Code execution needs real isolation. smolagents documents sandbox options (E2B, Blaxel, Modal and Docker) and states plainly that its local Python executor is not a security boundary. Other frameworks leave the choice to you.
- Evaluation. Google ADK documents built-in evaluation. For the rest, you supply your own. See LLM evaluation.
How do you try one without committing?
- Write down one real task and 20 real inputs for it, with the expected outcome.
- Build the smallest version in two frameworks that match your need from the table above.
- Compare on your cases: correctness, steps taken, cost and time per task, and how easy it was to see why a run went wrong.
- Check the licence, the release activity and whether the documentation matches the code. A framework in maintenance mode, as AutoGen's notice shows, is a cost.
- Keep your tools and prompts outside the framework's classes, so that switching is a rewrite of the glue, not of the logic.
Where does Swfte fit?
Swfte Studio is an agent and workflow builder. It is not an open-source framework, and Swfte does not claim to be open source. If you want to own and read the code of your agent loop, use one of the projects above.
What Swfte adds sits around whichever framework you choose, and this is a design pattern more than a shipped integration:
- Connect is one OpenAI-compatible API with bring-your-own-key access to model providers, routing and fallback chains, budgets and usage caps, content-policy detectors for secrets and personal data with a redact action, and an audit event stream. Status: Built. A framework that lets you set an OpenAI-compatible endpoint can call it. Check your framework's documentation for how. See Connect.
- Nexus applies a policy gate (allow, deny, ask), an audit trail and completion gates to coding agents, namely Claude Code and Codex. Status: Built. Using it around other frameworks is a design intent, not an integration Swfte ships today.
For comparisons with specific projects, see Swfte and LangChain, Swfte and LangGraph and Swfte and CrewAI. For a wider view of builders, read the best agent builder guide and platform agents.
Sources and last verified
Last verified 2026-10-07. Every dated or technical fact in this post was read from the pages below on that date. Anything that could not be confirmed is left out or marked as not verified.
- LangGraph documentation: overview. Project description, persistence and human-in-the-loop features.
- LangChain documentation: MCP. MCP adapter, transports and its beta status.
- LangGraph repository. Licence and repository language, read from the GitHub repository record on 2026-10-07.
- CrewAI repository. Project description, Crews and Flows, MCP and A2A statement, and MIT licence, from the README and repository record.
- CrewAI documentation: introduction. Agents, crews and flows with state management.
- Microsoft Learn: Agent Framework overview. Agents, workflows, sessions, MCP clients and the statement that it is the successor to AutoGen and Semantic Kernel.
- Microsoft Agent Framework repository. Description, languages, graph workflows and licence, from the README and repository record.
- AutoGen repository. Maintenance-mode notice, successor statement and licence terms in the README.
- OpenAI Agents SDK documentation. Description and primitives: agents, handoffs, guardrails, sessions, tracing.
- OpenAI Agents SDK: Model Context Protocol. Supported MCP server types and per-tool approval.
- Google Agent Development Kit documentation. Description, supported languages, agent types, sessions and state, MCP tools and evaluation.
- Google ADK (Python) repository. Apache-2.0 licence and README description.
- LlamaIndex documentation: framework overview. Agents, event-driven workflows and state.
- LlamaIndex documentation: MCP. Using MCP server tools in workflows and serving workflows as MCP servers.
- LlamaIndex repository. README description, framework versus platform note, and MIT licence.
- Pydantic AI documentation: overview. Typed agents, dependencies, output types, MCP capability, tool approval and Pydantic Graph.
- Pydantic AI repository. MIT licence and README feature list.
- smolagents repository. Description, code agents, sandbox options, MCP tools and Apache-2.0 licence, from the README and repository record.
- Anthropic: Building effective agents. Advice to start with direct API calls and simple designs.
Frequently asked questions
Which open-source AI agent framework is best?
None of the sources read for this post ranks them, and this page does not either. The right one depends on your control-flow need: graphs for explicit state, role-based crews for delegation, typed Python for validated output, retrieval for document-heavy work, or a minimal library. Build the same small task in two candidates and compare correctness, steps, cost and how easy failures are to trace.
Are AI agent frameworks free to use?
The eight covered here are open source, with licences shown in their repositories on 2026-10-07: MIT for LangGraph, CrewAI, Microsoft Agent Framework, the OpenAI Agents SDK, LlamaIndex and Pydantic AI, and Apache-2.0 for Google ADK and smolagents. The framework is free, but model calls, hosting and operations still cost money. Read each licence file before you rely on this summary.
Do these frameworks support MCP?
Their documentation mentions MCP in different ways. The OpenAI Agents SDK, Google ADK, Microsoft Agent Framework, CrewAI, Pydantic AI and smolagents state MCP tool support, LlamaIndex documents using and serving MCP, and LangGraph reaches MCP through a LangChain adapter that the docs mark as beta. Check the transport and approval options you need, because they differ between projects.
Is AutoGen still maintained?
AutoGen is in maintenance mode. Its README says it will not receive new features or enhancements and is community managed going forward, and it names Microsoft Agent Framework as the successor. Microsoft documents migration guides from AutoGen and from Semantic Kernel. New projects should evaluate Agent Framework instead, and existing AutoGen users should plan a migration.
Do you need an agent framework at all?
Not always. Anthropic notes that many agent patterns can be implemented in a few lines of code using model APIs directly, and Microsoft advises writing a function if one can handle the task. A framework helps when you need durable state, graph control flow, tracing or several providers. If your process has fixed steps, ordinary code can be easier to test and to explain.
What do agent frameworks not give you?
They give you building blocks inside one application, and usually not an organisation-level control layer. Plan for agent identity, shared and auditable approvals, an audit record kept outside the app, spend caps across providers and real sandboxing. Some projects include pieces, such as per-tool approval or sandbox options, so read each one, but treat the rest as work you must supply or buy.
Is Swfte an open-source agent framework?
No. Swfte Studio is a builder, and Swfte does not claim to be open source. If you want to own the agent loop code, use one of the open-source projects. Swfte Connect, which is Built, offers an OpenAI-compatible model API with bring-your-own-key access, budgets and an audit stream, so a framework that can call such an endpoint can sit on top of it.