AI agent frameworks are libraries that handle the plumbing around a language model so it can call tools and pass work to other agents. Half a dozen of them matter in 2026, led by LangGraph and the OpenAI Agents SDK among others, and they differ mainly in how much control they give you over the agent loop. The right pick depends on whether your problem needs a fixed workflow or an agent that chooses its own next step.
This guide compares them on the two questions that decide a project: how each one models orchestration, and how much of the loop stays visible when something breaks.
What an AI agent framework actually does
An AI agent framework is the code that sits between your application and the model. The model decides what to do next. The framework carries out that decision and feeds the result back for the next turn.
Underneath every framework is the same loop. The model receives instructions and a list of tools, meaning functions it is allowed to call. It replies with either an answer or a request to call a tool. The framework runs the tool and appends the output to the conversation, then asks the model again. This repeats until the task is done, or until your token bill files a formal complaint.
You could write that loop yourself in about forty lines of Python. What a framework adds sits around it:
- State that survives a crash, so a two-hour task can resume where it stopped
- Handoffs between agents, so a triage agent can pass a ticket to a billing agent
- Guardrails that check inputs and outputs before they reach a user
- Tracing, so you can replay each model call and tool result after the fact
- Human approval steps that pause a run until someone signs off
Anthropic's engineering guide on building effective agents draws a useful line here. It calls systems that follow predefined code paths workflows, and reserves the word agent for systems where the model directs its own process and tool use. Most frameworks support both. Most production systems are more workflow than their architecture diagrams admit.
The main AI agent frameworks in 2026, compared
Every framework below is open source and maintained as of November 2026. The table summarises what each one's own documentation says it is for.
| Framework | Maker | Languages | Orchestration model | Best fit |
|---|---|---|---|---|
| LangGraph | LangChain | Python, JavaScript | Graph of nodes and edges over shared state | Long-running, stateful agents with checkpoints and human review |
| CrewAI | CrewAI | Python | Crews of role-based agents, plus event-driven Flows | Small teams of specialised agents on a business process |
| OpenAI Agents SDK | OpenAI | Python, TypeScript | Agents with handoffs and guardrails | Lightweight multi-agent apps, especially on OpenAI models |
| Claude Agent SDK | Anthropic | Python, TypeScript | The agent harness behind Claude Code | Agents that work with files and shell commands |
| Microsoft Agent Framework | Microsoft | .NET, Python, Go (preview) | Agents plus functional and graph-based workflows | Azure teams, or anyone migrating from AutoGen or Semantic Kernel |
| Agent Development Kit (ADK) | Python, TypeScript, Go, Java, Kotlin | Workflow agents plus model-driven routing | Google Cloud deployments and agent-to-agent setups |
LangGraph describes itself as a low-level orchestration framework and runtime for long-running, stateful agents. It saves state at checkpoints, which is what lets a run pause for a human and resume later. It also works without LangChain, which surprises anyone who still remembers the 2023 tutorials.
The OpenAI Agents SDK goes the other way. Its documentation promises very few abstractions, and the core of it is agents that hand work to each other under guardrails. Sessions and tracing come built in.
Microsoft Agent Framework is the newest heavyweight. Microsoft calls it the next generation of both Semantic Kernel and AutoGen, combining AutoGen's simple agent abstractions with Semantic Kernel's enterprise features. If your team built on AutoGen in 2024, this is where your migration guide lives.
The vendor SDKs accept other providers' models to varying degrees, but each runs smoothest on its maker's own. Choosing one usually means choosing a default model provider too, whatever the README says about flexibility.
AI agent orchestration styles, from graphs to handoffs
AI agent orchestration means deciding which agent handles which step and who checks the result. Frameworks answer that in three styles, and the style matters more than the brand name.
Graphs are the explicit option. In LangGraph or Microsoft's graph workflows, you draw the nodes and edges yourself, and the model only chooses among branches you allowed. You get predictable runs and a diagram that matches the code, at the cost of more design up front.
Crews are the role-play option. CrewAI has you define agents with roles and goals, then run them as sequential or hierarchical processes, where a manager agent delegates to the others. It demos well and maps neatly onto an org chart. Org charts, as anyone who has worked inside one can confirm, also have a talent for producing meetings about meetings.
Handoffs are the conversational option. In the OpenAI Agents SDK, an agent can transfer control to another agent, or call it as a tool and keep control itself. Routing a support chat from triage to billing is the textbook case.
Google's ADK sits between these, with ready-made workflow agents that run steps in sequence or in parallel, plus routing decided by the model. It also supports the A2A protocol, an open standard that lets agents built on different frameworks talk to each other.
AI agents in action: matching the framework to the job
The fastest way to choose is to start from the job. These AI agent examples come up constantly, each with the framework style that fits it:
- A support assistant that routes between departments: handoffs, so the OpenAI Agents SDK or ADK routing
- A research pipeline that runs for an hour and must survive a restart: a graph with checkpoints, so LangGraph
- A coding or file-processing agent in a sandbox: the Claude Agent SDK, built on the same harness as Claude Code
- An approval-heavy process inside a .NET shop: Microsoft Agent Framework workflows
- A content team of researcher and editor agents: a CrewAI crew, kept small
Notice what the list leaves out: the number of agents. In most of these cases, one agent with good tools beats three agents passing notes. Our post on building agentic AI applications problem-first makes the longer argument, and the case for agents that drive a screen is in how an AI agent controls mouse and keyboard input.
If someone else is building it for you, ask which framework they use and who owns the code afterwards. Our guide to AI agent development services covers that conversation.
Principles of building AI agents that outlive the framework
Frameworks change faster than the problems they solve. AutoGen was folded into a new Microsoft framework within about two years, and OpenAI's experimental Swarm became the Agents SDK. Build so that a framework swap costs a week of work.
Anthropic's guide is blunt about this. It suggests starting with the model's API directly, since many agent patterns take a few lines of code, and understanding the code underneath any framework you adopt. Frameworks can hide the prompts and responses you most need to see while debugging. Its closing principles are to keep the design simple and to make the agent's planning steps visible.
In practice, that turns into a short set of habits:
- Write tools as plain functions with clear names and typed inputs, so any framework can wrap them
- Keep prompts in versioned files, outside framework config objects
- Log every model call and tool result in your own format, even when the framework has tracing
- Put hard limits on loops: a maximum number of steps and a spending cap per run
- Require human approval before any irreversible action, such as sending money or deleting records
The last two carry real cost and safety weight. An agent without a step limit can repeat a failing tool call until a budget alarm stops it. An agent with write access and no approval step can do damage faster than anyone can read the logs.
Our book Agentic AI Engineering builds these pieces in Python from the reasoning loop up. Once you have written the loop by hand, every framework becomes much easier to judge.
A checklist for choosing an AI agent framework
Run these questions before you commit. Most teams can answer them in an afternoon.
- Does the task follow a known sequence of steps? Then you want a workflow, and a graph framework or plain code will do.
- Which language does the team ship in? .NET points to Microsoft Agent Framework, and Java or Kotlin points to ADK.
- Which model provider are you committed to? The vendor SDKs are smoothest on their own models.
- Must runs survive restarts or wait days for approval? Then checkpointing is mandatory, and LangGraph is built around it.
- Can you see every prompt and tool result in a trace? If the honest answer is "sort of", keep looking.
- Can you prototype the core loop without any framework in a day? Do that first, then compare.
Pick the framework that makes your agent's behaviour easiest to inspect. The speed of the first demo tells you almost nothing, since every framework demos well, the same way every gym looks great in January.