Frameworks
AI Agent Frameworks: Twelve Compared for Developers
Checked 2026-10-31
Loading poll...
An AI agent framework is a code library that provides the agent loop, tool calling, state and handoffs, so you write behaviour and not plumbing. As of 31 October 2026, the active choices are LangGraph, CrewAI, OpenAI Agents SDK, Claude Agent SDK, Microsoft Agent Framework, Google ADK, Pydantic AI and Mastra. AutoGen is archived.
The frameworks side by side
All figures are from each project's GitHub repository on 31 October 2026. Stars measure attention, not fit.
Framework | Maker | License | Languages | Stars | Latest release |
|---|---|---|---|---|---|
LangChain Inc | MIT | Python (JS separate) | about 44,000 | 1.2.19 (30 Oct 2026) | |
LangChain | LangChain Inc | MIT | Python, JS | about 149,000 | langchain-core 1.7.3 (29 Oct) |
CrewAI Inc | MIT | Python | about 60,000 | 1.15.33 (29 Oct) | |
OpenAI | MIT | Python, JavaScript | about 30,000 | v0.24.0 (15 Oct) | |
Anthropic | MIT (Python repo) | Python, TypeScript | about 8,400 | v0.2.175 (30 Oct) | |
Microsoft Agent Framework | Microsoft | MIT | Python, .NET, Go | about 14,000 | python-1.24.0 (30 Oct) |
Google ADK | Apache-2.0 | Python, others | about 22,000 | v2.13.0 (23 Oct) | |
Pydantic AI | Pydantic | MIT | Python | about 21,000 | v2.64.0 (30 Oct) |
smolagents | Hugging Face | Apache-2.0 | Python | about 30,000 | v1.26.0 (29 May 2026) |
LlamaIndex | LlamaIndex | MIT | Python | about 53,000 | v0.14.25 (21 Sep) |
Mastra | Kepler Software | Apache-2.0 with | TypeScript | about 29,000 | @mastra/core 1.80.0 (28 Oct) |
AutoGen | Microsoft | CC-BY-4.0 (docs), archived | Python | about 62,000 | python-v0.7.5 (30 Sep 2025) |
A few cells need explaining. The Claude Agent SDK row shows the Python repository's license; the TypeScript repository's LICENSE.md says "All rights reserved" and that use is subject to Anthropic's Commercial Terms of Service. Mastra's LICENSE says content outside ee/ directories is under Apache-2.0, while content in directories named ee/ falls under a separate license; GitHub reports it as "Other". AutoGen's GitHub license field reads CC-BY-4.0, which reflects its documentation licensing; its separate LICENSE-CODE file is MIT. It is archived, so new projects should not start on it.
What a framework actually does
Strip away the branding and every framework supplies the same few things.
- The loop. Call the model, check whether it wants a tool, run the tool, feed back the result, repeat until done.
- Tool definitions. A way to describe functions so the model can call them, usually from type hints or a schema.
- State. Somewhere to keep messages and working data between steps.
- Control flow. Branches, handoffs between agents, loops, parallel work.
- Guardrails and approvals. Checks on inputs and outputs, and human sign-off points.
- Tracing. A record of each step for debugging.
- Integrations. Model providers, vector stores, MCP servers.
Frameworks differ in which of these they treat as the centre. LangGraph is about control flow and state. CrewAI is about roles. The vendor SDKs are about a tight loop with the vendor's models. Pydantic AI is about typed inputs and outputs. LlamaIndex started with your documents and retrieval.
Grouped by approach
Vendor SDKs
These are small, quick to learn and well matched to one company's models and hosted tools.
- OpenAI Agents SDK. MIT, Python and JavaScript. Primitives are agents, tools, handoffs and guardrails, with tracing. Install:
pip install openai-agentsornpm install @openai/agents zod. It is the natural landing spot for people leaving OpenAI Agent Builder, which shuts down on 30 November 2026. See OpenAI Agents SDK for details and open items. - Claude Agent SDK. Puts Claude Code's tools, loop, hooks and subagents in a library for Python (
pip install claude-agent-sdk) and TypeScript (npm install @anthropic-ai/claude-agent-sdk). It suits agents that work with files and commands. See Claude Agent SDK. - Google ADK. Apache-2.0 and "optimized for Gemini" but described as model-agnostic. Its README lists a graph-based workflow runtime with routing, fan-out and fan-in, loops, retry, human-in-the-loop and nested workflows.
- Microsoft Agent Framework. MIT, for .NET and Python, with a Go SDK in a separate repo. Its README says it supports graph-based patterns "such as sequential, concurrent, handoff, and group collaboration". Microsoft calls it the enterprise-ready successor to AutoGen.
Orchestration frameworks
- LangGraph. Explicit graph, durable execution, interrupts. The pick when reliability matters most. See LangGraph.
- CrewAI. Crews of role-based agents plus event-driven Flows. See CrewAI.
- LangChain. The wider toolkit of integrations; its higher-level agents run on LangGraph.
Typed and code-first
- Pydantic AI. Describes itself as "a typed, extensible agent loop with every model a string swap away". Built by the team behind Pydantic, with companion evals and a Logfire observability product. Good for Python teams that already lean on type checking.
- smolagents. Hugging Face's small library where agents "think in code": instead of calling tools by JSON, the model writes short code snippets. Small surface, fewer abstractions. Its last tagged release is from May 2026, so check activity.
Data and retrieval first
- LlamaIndex. Calls itself "the document processing platform for AI". Pick it when the hard part is your documents. See MCP vs RAG for the retrieval question.
TypeScript first
- Mastra. A TypeScript framework for AI applications and agents, from Kepler Software. Choose it if your team lives in Node and wants an alternative to Python-first tools.
The archived one
AutoGen was one of the best-known multi-agent frameworks. Its README now carries a caution: "Project archived and no longer maintained", with no bug fixes, security fixes or new features from Microsoft. New users are pointed to Microsoft Agent Framework, and a migration guide exists on Microsoft Learn. If you have AutoGen code in production, plan a migration; the README warns that unfixed vulnerabilities may remain in the project and its dependencies.
The lesson also applies to builder tools. See the Flowise and OpenAI Agent Builder stories in AI agent platforms. Whatever you pick, check the last release date and who maintains it.
How to choose
Work through these questions in order.
- Do you already use one model vendor? Then start with that vendor's SDK. Fewer concepts, tracing included.
- Which language is your team in? Python covers most. TypeScript teams look at Mastra, the OpenAI and Claude SDKs and LangGraph.js. .NET teams look at Microsoft Agent Framework.
- Does the agent need to survive restarts or wait for humans? Choose LangGraph or Microsoft Agent Framework, which both list durability and human-in-the-loop.
- Is it a team of specialists? CrewAI reads most like that.
- Do you care about typed outputs? Pydantic AI.
- Is it mostly documents? LlamaIndex.
- Will you ship it inside a product? Prefer MIT or Apache-2.0 code, pin versions and check telemetry.
If you need | Pick |
|---|---|
Fastest start with GPT models | OpenAI Agents SDK |
Agent that edits files and runs shell commands | Claude Agent SDK |
Exact control, resumable runs | LangGraph |
Readable agent teams | CrewAI |
.NET or Go | Microsoft Agent Framework |
Typed Python | Pydantic AI |
Gemini on Google Cloud | Google ADK |
TypeScript | Mastra |
Cost: what the framework does not cover
All of these are free libraries. You pay for four other things.
- Models. The main bill. Multi-agent designs multiply calls. See LLM API prices.
- Hosting. A server, a queue, a database for state.
- Observability. LangSmith has a free tier and a $39 per seat Plus plan; Pydantic has Logfire; CrewAI has AMP with a free Basic plan. Logfire's pricing page lists a free Personal plan with 10M records and a $49 a month Team plan.
- Your time. Frameworks change fast. Budget for upgrades.
The thin version, so you know what you are buying
Here is the loop every framework wraps, in pseudocode, not tied to any library:
messages = [system_prompt, user_request]
while steps < max_steps:
reply = model(messages, tools=tool_schemas)
if reply has no tool calls:
return reply.text
for call in reply.tool_calls:
result = run_tool(call.name, call.arguments)
messages += [call, result]That is the core. A framework adds what this sketch lacks: saved state if the process dies, approvals before run_tool, parallel branches, typed outputs, retries with backoff, tracing of every pass through the loop and a way to hand messages to a second agent. Write down which of those you need this month. If the answer is none, skip the framework for now.
Testing and evaluating agents
Agents fail in ways unit tests miss, because the same input can take different paths. Three habits help whichever framework you choose.
- Keep a fixed set of tasks. Ten to thirty real inputs with the result you expect. Run it after every prompt or version change.
- Check the path, not only the answer. Did the agent call the right tool with the right arguments? Pydantic AI's README, for instance, mentions grading "tool-call trajectories", and LangSmith offers evals for the same purpose.
- Record cost and steps. A change that makes the answer slightly better and the run ten times longer is rarely a win.
Whatever you use, run risky agents with narrow permissions and in a sandbox. See AI testing agents and enterprise AI agents for governance questions.
Protocols that cross frameworks
Two open protocols matter more than any one framework. MCP connects an agent to tools and data. Several of the frameworks above mention it in their READMEs. A2A lets agents talk to each other. If you pick based on protocol support, you can swap frameworks later with less pain. See what are MCP servers, the A2A protocol and MCP vs A2A. We did not confirm MCP support framework by framework, so check each project's docs.
Frameworks and coding agents
Frameworks are for building your own agents. Coding agents such as Claude Code or Codex CLI are finished products for writing software. They overlap in one place: both Anthropic and OpenAI now publish SDKs built on the same loop their coding agents use. If your goal is only to ship code faster, you want AI coding agents, not a framework. For a tutorial path see how to create an AI agent.
Language and hiring notes
Python has the widest choice, which also means the most churn. TypeScript has fewer options but fits teams that already ship web products in Node. .NET shops now have a first-party route through Microsoft Agent Framework. If you hire for the stack, remember that the vendor SDKs and LangGraph have the largest bodies of tutorials, so new team members find answers faster.
Questions to ask a framework's maintainers
Before adopting any framework in the table, put these to its docs and issue tracker.
- How often do breaking changes land, and is there a migration guide for the last one?
- Does it save state if the process dies, and where does it store it?
- Can I trace every model call and tool call without a paid service?
- How do I stop a run that loops, by step count or by spend?
- What data does it send to the maintainers by default? CrewAI's README, for example, documents anonymous telemetry, so check the same for the others.
- Who funds the project, and what happens to it if that funding stops? AutoGen's archive is the reminder that this question matters.
One more rule of thumb: prefer the framework whose documentation you can read in an afternoon. If the concepts section is longer than the quickstart, expect to spend your first week learning vocabulary rather than building. Pick the smallest tool that covers your next three months of needs, and revisit the choice when those needs change.
Our take
This is an editorial reading of repositories and READMEs, not a hands-on test.
The crowded framework field looks more confusing than it is. Three questions sort most of it: which model vendor, which language, and how much control. The rest is taste.
Two habits keep teams out of trouble. First, keep prompts, tool descriptions and tests in plain files you own, so a framework change touches wiring and not thinking. Second, write the thinnest agent that works. A model call in a loop with two tools is a few dozen lines, and you learn what you need before you pick a framework to hold it.
AutoGen shows what happens to a big project without a long-term owner. Look for a maintainer with a business reason to keep going: a cloud vendor, a model lab or a funded company. All the active ones in the table qualify today.
Checklist
- Write the agent as a plain loop first to learn what you need
- Pick by model vendor, language and required control
- Check license, last release and maintainer on GitHub
- Pin the framework version
- Add tracing before launch
- Add a human approval step for risky tools
- Budget model cost per run
Questions
What is an AI agent framework?
A code library that supplies the loop, tool calling, state and handoffs an agent needs, so you write the agent's behaviour instead of the plumbing.
Which AI agent framework should I start with?
If you use one model vendor, start with that vendor's SDK. For control and durable state use LangGraph. For readable multi-agent teams use CrewAI. For typed Python use Pydantic AI. For TypeScript use Mastra.
Is AutoGen still maintained?
No. Microsoft's README says the project is archived and no longer maintained, and directs new users to Microsoft Agent Framework.
Do I need a framework at all?
Not for a simple agent. A model call in a loop with a few tool functions is under a hundred lines. Frameworks pay off when you need state, retries, approvals or tracing.
Loading poll...
Sources
- github.com/langchain-ai/langgraph
- github.com/crewAIInc/crewAI
- github.com/openai/openai-agents-python
- github.com/anthropics/claude-agent-sdk-python
- github.com/microsoft/agent-framework
- github.com/microsoft/autogen
- github.com/google/adk-python
- github.com/pydantic/pydantic-ai
- github.com/huggingface/smolagents
- github.com/run-llama/llama_index
- github.com/mastra-ai/mastra
- github.com/langchain-ai/langchain
- github.com/anthropics/claude-agent-sdk-typescript
- pydantic.dev/pricing