AI Agent Frameworks
The best AI agent framework for most production builds is LangGraph: an MIT-licensed graph runtime built for stateful, long-running agents, with durable execution and a hosted deployment platform behind it. The OpenAI Agents SDK is the simplest free option for OpenAI-first teams, and CrewAI is the pick for role-based multi-agent crews with a business-facing platform attached. All six frameworks below are free libraries — the real comparison is license, mental model, and what the hosted layer costs when you stop self-hosting. Licenses were verified on each project's official GitHub repository.
Last checked: November 27, 2026 · Researched from official documentation — hands-on API tests rolling out (methodology)
- Best overall LangGraph
- Best for OpenAI builds OpenAI Agents SDK
- Best multi-agent crews CrewAI
- Best for TypeScript Mastra
| # | Tool | What it is | Starting price (as published) | Free tier | Notable strength / limit |
|---|---|---|---|---|---|
| 1 | LangGraph | MIT-licensed framework (Python and JavaScript) that models agents as graphs with durable state: long-running execution, persistence, retries, and human-in-the-loop approvals as first-class concepts. From the LangChain team. | Library is free. Hosted deployment (LangSmith Deployment) comes with LangSmith Plus at $39/seat/month — including 1 free small serverless deployment — with runtime metered in LangSmith Standard Units (1 LSU = $1; e.g. runtime compute 0.0675 LSU per vCPU-hour). Enterprise custom (self-hosted and hybrid options) | Yes — the library is free and open source; LangSmith's Developer plan ($0, 1 seat, 5,000 base traces/month) covers observability for solo builders | The production-grade choice: state and durability are the architecture, not add-ons, and deployment, tracing, and evals live in one platform. The cost is a steeper learning curve — simple agents are more code here than in the SDKs below it. |
| 2 | OpenAI Agents SDK | MIT-licensed lightweight SDK from OpenAI (Python, with a TypeScript counterpart): agents, handoffs between agents, guardrails, sessions, and built-in tracing, with minimal abstraction over the model loop. | No hosted platform and no SDK fee — you pay only your model API usage (OpenAI models natively; other providers via compatible endpoints) | Yes — the SDK is entirely free and open source | The fastest path from zero to a working multi-agent system if your models are OpenAI's: handoffs and guardrails are built in, and tracing is on by default. The flip side is gravity — the further your stack drifts from OpenAI models and conventions, the more of the framework you are working around. |
| 3 | CrewAI | MIT-licensed framework built around role-based agent "crews" and deterministic "flows," with a commercial platform (Studio visual editor, deployment, tracing, guardrails) aimed at both engineers and business teams. | Framework is free. CrewAI platform: Basic is free (visual editor and AI copilot, GitHub integration, 50 workflow executions/month); Enterprise is custom-priced (SSO/RBAC, PII redaction, deploy on CrewAI cloud, your VPC, or your infrastructure). No self-serve mid-tier price is published | Yes — free library, plus the platform's free Basic plan with 50 workflow executions/month | The crew metaphor genuinely speeds up research, writing, and analysis workflows, and the Studio gives non-engineers a way in. Platform pricing jumps straight from free to custom Enterprise — budget-stage teams get no published middle rung. |
| 4 | Pydantic AI | MIT-licensed Python framework from the Pydantic team: agent definitions with typed dependencies and structured, schema-validated outputs as the core design, model-agnostic across providers. | No hosted platform and no fee — free library; you pay your model usage and infrastructure | Yes — entirely free and open source | The type-safety pick: if your team already trusts Pydantic validation everywhere else, agent outputs that validate against schemas feel like home, and integration with the Pydantic ecosystem (including its Logfire observability product) is native. A smaller ecosystem and fewer off-the-shelf integrations than the three above it. |
| 5 | Mastra | TypeScript-native agent framework: agents, graph-based workflows, RAG, memory, and evals in one TypeScript codebase, from the team behind Gatsby. | Framework is free to use. Mastra Platform (hosted, restructured — read November 27, 2026 on mastra.ai/pricing): Free $0/month (unlimited agents, users and deployments; 100K observability events; 10 GB shared egress; 5 connections); Starter $25/month (1 project with 1 small dedicated project; 250K observability events; 25 GB shared egress; 10 connections); Team $250/month (3 projects with 2 medium dedicated projects; 10M observability events; 50 GB shared egress; 50 connections; SOC 2 report); Enterprise custom (RBAC, SSO, audit logs). Project sizes are also published separately: Serverless free + usage, Small $25/month, Medium $100/month, Large $200/month, storage then $10/GB per project | Yes — free framework, plus the platform's Free plan with unlimited agents, users and deployments | The strongest TypeScript-first option here, and the natural home for JS teams who find the Python frameworks foreign. Its hosted pricing was restructured in November 2026 — the old $0 Starter / $250 Teams pay-as-you-go model is gone, replaced by Free / $25 Starter / $250 Team tiers with fixed allowances (see left). The remaining diligence note is licensing structure: Mastra's own site states the core framework is Apache-2.0 open source, with enterprise features under the separate Mastra Enterprise License — check which parts your build uses. |
| 6 | AutoGen | Microsoft's framework for multi-agent conversation: agents that converse, use tools, and involve humans to solve tasks, with AutoGen Studio for low-code prototyping. Research-driven origins (Microsoft Research). Archived — no longer maintained (checked November 27, 2026). | No hosted platform and no fee — free to use; you pay your model usage and infrastructure | Yes — free | Historically important — AutoGen popularized conversational multi-agent patterns — but it is now archived: Microsoft's official documentation (November 27, 2026) says the project is no longer actively maintained, with no bug fixes, security fixes, new features, or support, advises against production use, and directs new users to the Microsoft Agent Framework. It ranks last for production builders on that basis, plus the earlier diligence friction: the LICENSE file served from its official GitHub repository is a CC-BY-4.0 content license (verified October 2026), which is unusual for a code framework and worth confirming against the packages you install. |
Verdicts
1. LangGraph Best overall
The framework that treats agents as long-running software rather than prompt tricks: explicit graph state, durable execution that survives failures, and human approval points you can actually audit. It is also the only entry here whose hosted path is fully priced in public — LangSmith Plus at $39/seat/month with a free small serverless deployment included and runtime metered at published LSU rates (1 LSU = $1). Steeper to learn than an SDK; worth it when the agent has to run unattended.
2. OpenAI Agents SDK Best for OpenAI builds
The least framework-y framework: a small set of primitives (agents, handoffs, guardrails, sessions, tracing) that stay out of the model's way, MIT-licensed, and free beyond your API bill. For OpenAI-centric teams it is the shortest path to production. The ranking question to ask yourself is model gravity — the SDK is happiest when OpenAI models sit at the center of the design.
3. CrewAI Best multi-agent crews
Role-based crews remain the most intuitive way to express "researcher writes, editor checks" workflows, and CrewAI's platform is the only one here courting business users directly — a visual Studio, an AI copilot, and a free Basic plan with 50 workflow executions a month. The gap is commercial, not technical: after free, the next published step is custom-priced Enterprise, with SSO, RBAC, and VPC deployment behind it.
4. Pydantic AI Best type safety
For Python teams, the appeal is discipline: typed dependencies in, schema-validated outputs out, and a model-agnostic core from the maintainers of the validation library half the ecosystem already imports. No hosted platform, no pricing page, no surprises — just a library. Ranked fourth on ecosystem size and integrations, first on output hygiene.
5. Mastra Best for TypeScript
The TypeScript-native answer: agents, workflows, RAG, and evals in one JS/TS codebase, actively developed and increasingly the default for frontend-adjacent teams. Its platform pricing was restructured in November 2026 (checked November 27, 2026 on mastra.ai/pricing): the old free Starter with pay-as-you-go overages is replaced by Free $0/month (100K observability events, 10 GB shared egress), Starter $25/month (250K events, 25 GB shared egress, 1 small dedicated project), and Team $250/month (10M events, 50 GB shared egress, 2 medium dedicated projects, SOC 2 report), with Enterprise custom. Its site clarifies licensing — core framework Apache-2.0, enterprise features under the Mastra Enterprise License. It stays fifth this check on ecosystem maturity, not on pricing.
6. AutoGen
The pioneer: multi-agent conversation patterns that much of this category descends from, with a low-code Studio for prototyping and Microsoft Research behind it. That chapter is now closed: AutoGen's official documentation (checked November 27, 2026) states the project has been archived and is no longer actively maintained by Microsoft — no bug fixes, security fixes, new features, or support — advises against production use, and directs new users to the Microsoft Agent Framework and existing users to its migration guide. For new production builds it should not be chosen; it remains only as a historical and research reference, and the CC-BY-4.0 license file on its official repository is a further diligence speed bump.
Going further
Choosing tools one category at a time is how stacks overpay. The Playbook assembles four complete, working agent stacks — a specific pick for every layer, with the actual monthly cost at starter scale: The Agent Stack Playbook — $29
Frequently asked questions
What is the best AI agent framework?
LangGraph for production-grade, stateful agents (MIT, hosted deployment from $39/seat/month via LangSmith). OpenAI Agents SDK for the simplest OpenAI-first builds. CrewAI for role-based crews and business-user tooling.
Are agent frameworks free?
Mostly, yes: LangGraph, OpenAI Agents SDK, CrewAI, and Pydantic AI are MIT-licensed libraries — verified on their official GitHub repositories in October 2026. You pay for models and infrastructure; hosted platforms (LangSmith Deployment, CrewAI Enterprise) are where fees appear.
LangGraph or CrewAI?
LangGraph when state, branching, durability, and approvals matter. CrewAI when the work decomposes into role-based crews and you want a visual platform for mixed teams. Both are free MIT Python libraries — prototype in the one whose mental model matches your workflow.
What is the best agent framework for TypeScript?
Mastra, the TypeScript-native framework. Its platform is priced publicly (Free $0/month, Starter $25/month, Team $250/month — restructured November 2026). Diligence note: its site states the core framework is Apache-2.0 open source, with enterprise features under the separate Mastra Enterprise License. LangGraph (JS) and the OpenAI Agents SDK (TS) are the alternatives.
Which framework license needs a second look?
AutoGen's — and its maintenance status matters more: AutoGen is archived and no longer maintained by Microsoft (official docs, November 27, 2026), which advises against production use and directs new users to the Microsoft Agent Framework; its LICENSE file is also CC-BY-4.0, a content license — unusual for code. Mastra's needs a feature-level check: its site states the core framework is Apache-2.0, with enterprise features under the Mastra Enterprise License. Everywhere else on this page, the license is MIT (LangGraph, OpenAI Agents SDK, CrewAI, Pydantic AI).
Sources (official pages, checked October 14, 2026; re-checked November 27, 2026): langchain.com/pricing (LangSmith plans and Deployment metering — Developer $0/5k traces, Plus $39/seat/month/10k traces, 1 free small serverless Agent Server, 1 LSU = $1, runtime compute 0.0675 LSU/vCPU-hr, unchanged) · crewai.com/pricing (Basic free 50 workflow executions/month, Enterprise custom, unchanged) · mastra.ai/pricing and mastra.ai (Mastra Platform — Free $0/month, Starter $25/month, Team $250/month, Enterprise custom; shared egress allowances changed since the November 18 check: Free 10 GB, Starter 25 GB, Team 50 GB; Team now specifies 2 medium dedicated projects; project sizes Serverless free + usage / Small $25 / Medium $100 / Large $200, storage then $10/GB per project — and its license statement, core Apache-2.0 / enterprise features under the Mastra Enterprise License, read November 27, 2026) · microsoft.github.io/autogen (AutoGen archived / no longer maintained notice, re-verified November 27, 2026) · official GitHub repositories for license verification — langchain-ai/langgraph (MIT), openai/openai-agents-python (MIT), crewAIInc/crewAI (MIT), pydantic/pydantic-ai (MIT), microsoft/autogen (LICENSE file: CC-BY-4.0). No third-party sources were used for any figure on this page.