AI agents

The best agentic frameworks, and what each one is good at

There is no best framework in general, only the best one for your model, your language and how much state your agent has to hold.

Open Dimension AI8 min read

What are the best agentic frameworks?

There is no single best agentic framework. For most production work, LangGraph, the OpenAI Agents SDK, the Claude Agent SDK, Pydantic AI and Google's ADK are the strongest starting points. Pick by the model you run, your team's language, and how much control you need over state. Simple agents often need no framework.

The short version

  • There is no single best agentic framework: the right one depends on your model, your team's language and how much state the agent must hold.
  • LangGraph suits long-running agents that need saved state, resumable runs and human approval steps.
  • Model provider SDKs, such as the OpenAI Agents SDK and the Claude Agent SDK, are the fastest route to a working agent once the model is chosen.
  • A single agent calling a few tools often needs no framework, because a plain tool-calling loop is easier to read and debug.
  • Developer surveys show which frameworks are popular, not which ones suit your agent or hold up in production.

Which agentic frameworks are worth shortlisting?

Five frameworks cover most production work: LangGraph, the OpenAI Agents SDK, the Claude Agent SDK, Pydantic AI and Google's Agent Development Kit (ADK). CrewAI, Microsoft Agent Framework, LlamaIndex, Mastra and the Vercel AI SDK are strong choices in narrower cases. None of them is the best agentic framework in general. Each is best for a particular model, language and amount of control.

They fall into three groups. Model-agnostic frameworks, such as LangGraph and Pydantic AI, give you explicit control over the agent's flow and work with any major model. Model provider SDKs, such as the OpenAI Agents SDK, the Claude Agent SDK and Google's ADK, are the shortest path to a working agent on one vendor's models. Role-based multi-agent frameworks, such as CrewAI, let you describe a team of agents and leave the framework to run the conversation between them.

The group matters more than the brand. Choosing a group decides who owns the control flow: your code, the model vendor's SDK, or the framework's abstraction. That is the expensive decision to reverse. Moving between two frameworks in the same group is usually far cheaper.

How do the leading agentic frameworks compare?

FrameworkLanguagesBest forMain trade-off
LangGraphPython, TypeScriptLong-running, stateful agents with saved state and human approval stepsMore concepts to learn; the smoothest tracing runs through LangSmith, a commercial product
OpenAI Agents SDKPython, TypeScriptTeams on OpenAI models wanting a small set of primitives: agents, handoffs, guardrailsBuilt around OpenAI's models and tracing
Claude Agent SDKPython, TypeScriptAgents that work on files, code or a shell, using the harness behind Claude CodeRuns Claude models only
Pydantic AIPythonPython teams wanting typed, validated outputs and free choice of modelPython only; fewer ready-made integrations than the LangChain ecosystem
Google ADKPython, Java and othersTeams on Gemini or Google Cloud, including agents arranged in hierarchiesSmoothest on Google's own models and cloud
CrewAIPythonQuick prototypes of role-based multi-agent workflowsThe role abstraction hides detail you need when debugging
Microsoft Agent FrameworkPython, .NET.NET and Azure teams; successor to AutoGen and Semantic KernelStrongest inside Microsoft's ecosystem
LlamaIndexPython, TypeScriptAgents whose main job is retrieving and reasoning over your documentsMore than you need when retrieval is not the core task
MastraTypeScriptTypeScript teams wanting agents, workflows and memory in one packageTypeScript only; younger ecosystem
Vercel AI SDKTypeScriptAgents embedded in a web app, streaming results to the interfaceLight on orchestration; you own state and persistence

When is LangGraph the right choice?

LangGraph is the right choice when an agent runs for a long time, holds state across many steps, or needs a person to approve something partway through. It models the agent as a graph of steps sharing one state object, and can save that state after each step, so a run can pause, resume, or recover from a failure without starting again.

That is the work most demos skip. Picture an agent that drafts a refund, waits two days for a manager to approve it, then continues where it stopped. It needs persistent state and a defined place to stop. LangGraph treats both as basic features. In a hand-written loop you build them yourself, usually the first time a run dies halfway.

The cost is concepts. Nodes, edges, state reducers and checkpointers are more to learn than a simple loop, and a small agent can end up with more framework than logic. LangGraph itself is open source. The smoothest tracing runs through LangSmith, LangChain's separate commercial product, which has a published list price for its Plus plan.

Should you use your model provider's agent SDK?

Yes, if you have already chosen a model and expect to keep it. The OpenAI Agents SDK and the Claude Agent SDK are the shortest route from nothing to a working agent on their vendor's models, and new model features tend to reach them first.

They are different tools. The OpenAI Agents SDK is a small set of primitives: agents, tools, handoffs between agents, guardrails and tracing. The Claude Agent SDK exposes the agent harness behind Claude Code, so an agent gets file access, shell commands, context management and subagents without you writing them. The first suits conversational and routing agents. The second suits agents that do work on a computer or in a codebase.

Google's ADK sits slightly apart. It is optimised for Gemini and Google Cloud, but designed to call other models too, and it supports agents arranged in hierarchies.

The trade-off is lock-in at the control-flow level. The OpenAI SDK can call other providers' models, but it is built around OpenAI's. The Claude Agent SDK runs Claude models only. If the model choice is still open, or procurement might force a change next year, a model-agnostic framework keeps that door open.

Are multi-agent frameworks like CrewAI worth using?

Sometimes, but less often than they are used. CrewAI makes it quick to describe several agents with roles and goals and let them collaborate, which suits prototypes and research-style tasks. For production workflows, one agent with good tools, or a fixed workflow with a single agent step, is usually easier to test and cheaper to run.

The reason is mechanical. Every handoff between agents is another model call, another chance to lose context, and another place for a failure to hide. When a five-agent crew produces a bad answer, the first question is which agent made the bad decision. The abstraction that made the crew quick to build is the thing hiding the answer.

Use several agents when the work genuinely splits into parts that need different tools, permissions or context, and each part can be checked on its own. Do not use them to mirror an org chart. If you do choose CrewAI for production, look at its Flows feature, which gives you explicit control over the order things happen in.

Which agentic framework suits a TypeScript or .NET team?

TypeScript teams should look at Mastra, the Vercel AI SDK, or the TypeScript versions of LangGraph, the OpenAI Agents SDK and the Claude Agent SDK. For .NET teams, the starting point is Microsoft Agent Framework. A framework in the language your team already ships beats a slightly better one in a language it does not.

Mastra bundles agents, workflows, memory and evaluation into one TypeScript package. The Vercel AI SDK is lighter: it handles model calls, tool loops and streaming to a user interface, and leaves state and persistence to you. That suits an agent living inside an existing web app. Where a framework exists in both Python and TypeScript, the Python version often gets new features first.

Microsoft Agent Framework is Microsoft's successor to AutoGen and Semantic Kernel, with Python and .NET support and a natural fit with Azure. New projects in that ecosystem should start there rather than on AutoGen.

When do you not need an agentic framework at all?

When one agent calls a handful of tools in a loop. Every major model API supports tool calling directly. A loop that sends the conversation, runs whichever tool the model asks for and returns the result is a few dozen lines of code you can read end to end.

That code has advantages no framework can match. Every prompt is visible. Every retry is yours to see. A stack trace points at your code, not at three layers of abstraction. When the model vendor ships a new feature, you can use it the same day.

Adopt a framework when you catch yourself rebuilding what it provides: persistent state, resumable runs, approval steps, tracing across many calls. That is the honest test. A framework added to an agent that needs none of those things adds dependencies without adding capability.

Many tasks described as agents are fixed workflows with one model call in the middle. Those need workflow automation, not an agent framework, and they are cheaper and easier to test for it.

How do you choose between agentic frameworks?

Answer four questions in order: which model you will run, which language your team ships, how much state the agent must hold, and how you will see what it did. The answers usually leave one or two candidates.

Model first. If the model is fixed, the vendor's SDK is the default and you need a reason to reject it. If the model is open, choose a model-agnostic framework such as LangGraph or Pydantic AI.

Language second. A framework in the language you already deploy and monitor will reach production faster than a better one you have to learn to operate.

State third. If runs are short and stateless, a plain loop or a light SDK is enough. If runs pause, wait for people, or must survive a restart, you need persistence, and LangGraph is built around it.

Visibility fourth. You will need a trace of every model call and tool call to debug and evaluate the agent. Check what tracing the framework supports, whether it can export to OpenTelemetry, and whether the useful version is a paid add-on.

How do you avoid lock-in to an agentic framework?

Keep the parts that carry your knowledge outside the framework: tool code, prompts, business rules and evaluation cases. The framework then becomes the loop that connects them, and replacing it is contained work rather than a rewrite.

Tools are the easiest place to start. Most current frameworks can call tools exposed through the Model Context Protocol (MCP), an open standard for connecting models to tools and data. Tools written as MCP servers, or as plain functions with thin wrappers, survive a framework change.

Keep evaluation independent too. A set of real inputs with expected behaviour, run outside the framework, is the only way to know whether a switch made the agent better or worse.

How much should developer surveys influence the choice?

A little. Surveys show which frameworks have communities, documentation and people you can hire, and that matters. They do not show which framework suits your agent, and the samples behind them shape the answers.

Stack Overflow's 2025 Developer Survey had about 49,000 respondents, and put its framework question only to those who build AI agents. Its AI agents question drew 31,877 answers. That is a large sample, but it measures use: what developers have tried, not what held up in production.

LangChain's State of Agent Engineering survey received 1,340 responses between 18 November and 2 December 2025. Its respondents come from LangChain's own audience, which leans towards people already building agents. That makes it useful for learning what agent builders worry about, and a weak guide to how LangChain's own frameworks compare with others. Read any vendor's survey of its own users the same way.

We are not aware of a neutral benchmark that ranks agent frameworks on production outcomes. Treat any ranking that implies one, including the shortlist above, as judgement rather than measurement.

Questions people ask

Is LangGraph the same as LangChain?

No. LangChain is a library of building blocks for language model applications, such as model wrappers, tools and retrievers. LangGraph, from the same company, is the lower-level framework for building stateful agents as graphs of steps. LangChain's own agent tooling now runs on LangGraph. For a production agent that needs saved state or approval steps, LangGraph is the part doing the work.

Which agentic framework is best for beginners?

Start with your model provider's SDK or a plain tool-calling loop. Both show you exactly what an agent is: a model choosing tools in a loop until a task is done. Frameworks that hide that loop feel faster on the first day and slower the first time something breaks. Learn the loop first, then adopt a framework for the specific problems it solves.

Are agentic frameworks free?

The frameworks themselves are mostly open source and free to use, including LangGraph, CrewAI and Pydantic AI. The costs sit around them. Model usage is usually the largest. Several vendors also sell hosted tracing, deployment or monitoring alongside a free framework, and LangChain, for example, publishes list prices for LangSmith. Budget for model calls and observability, not for the framework.

Can we switch agentic frameworks later?

Yes, if you plan for it. Keep tools, prompts, business rules and evaluation cases out of framework-specific code, and expose tools as plain functions or through the Model Context Protocol. The framework is then just the loop connecting them, and switching is contained work. Teams that write their logic directly into graph nodes or agent role definitions find that switching is close to a rewrite.

Do we need a multi-agent framework?

Probably not to start. Most business agents work better as one agent with well-described tools, or as a fixed workflow with a single model step. Add agents when parts of the task need different tools, permissions or context and can be tested separately. Each extra agent adds model calls, cost and another place for a failure to hide.

What is the difference between an agent framework and a workflow tool?

A workflow tool runs steps you define, in an order you define, with a model call wherever judgement is needed. An agent framework lets the model decide which step comes next. Workflows are cheaper, faster and easier to test. Use an agent only when the path genuinely cannot be known in advance, such as open-ended research or support questions with many possible routes.

Related on this site

Sources

  1. AI | 2025 Stack Overflow Developer Survey, Stack Overflow's annual online developer survey, 2025, with about 49,000 respondents in total. The framework question was put to respondents who build AI agents. · Stack Overflow, data from 2025
  2. AI | 2025 Stack Overflow Developer Survey, Stack Overflow's annual online developer survey, 2025. 31,877 respondents answered the AI agents question. · Stack Overflow, data from 2025
  3. State of Agent Engineering, LangChain ran its own public online survey from 18 November to 2 December 2025 and received 1,340 responses. Respondents come from LangChain's own audience, which leans towards people already building agents. · LangChain, data from 2025
  4. State of Agent Engineering, LangChain ran its own public online survey from 18 November to 2 December 2025 and received 1,340 responses. · LangChain, data from 2025
  5. Large Firms With at Least 20 Employees Biggest AI Users, Business Trends and Outlook Survey (BTOS), a survey of US employer businesses. Data were collected from 14 December 2025 to 3 May 2026. · U.S. Census Bureau, data from 2026
  6. LangChain Pricing, The vendor's published list price for the LangSmith Plus plan, read from its pricing page in November 2026. · LangChain, data from 2026

Want someone to look at your workflow?

Thirty minutes, and we will tell you whether there is anything here worth building. Roughly half of these end with us saying not yet.

Book a 30 minute call