AI Agent Frameworks Compared: A Developer's Guide
LangGraph, Microsoft Agent Framework, CrewAI, LlamaIndex, OpenAI Agents SDK, Google ADK and Pydantic AI compared on languages, orchestration, state and licence.
Most agent frameworks now share the same basic parts: a model, a set of tools, a loop that keeps calling the model until the job is done, and some way to coordinate several agents. Where they differ is in what they make the central abstraction, how much control you get over the flow, and how they save state so a run can pause for a person or survive a crash. This comparison covers seven open-source frameworks, using only their official documentation and GitHub repositories. Licences come from the GitHub API.
At a glance
| Framework | Languages | Core abstraction | Multi-agent model | Persistence and human review | Licence |
|---|---|---|---|---|---|
| LangGraph (with LangChain) | Python; separate JS/TS libraries | Graph of shared state, nodes and edges | You wire agents as graph nodes | Checkpointers, stores, interrupt() | MIT |
| Microsoft Agent Framework | .NET, Python, Go (preview) | Agent plus functional or graph workflows | Sequential, concurrent, handoff, group chat, Magentic | Workflow checkpoints, request/response HITL | MIT |
| CrewAI | Python | Crews (agent teams) inside Flows | Sequential or hierarchical crews, event-driven Flows | @persist on Flows, SQLite by default | MIT |
| LlamaIndex | Python | FunctionAgent and AgentWorkflow built on Workflows | Handoffs, orchestrator agent, or custom planner | Serializable Context, wait-for-event HITL | MIT |
| OpenAI Agents SDK | Python; separate JS/TS SDK | Agent with tools, guardrails, handoffs | Handoffs or agents as tools | Sessions, tool approval with resumable RunState | MIT |
| Google ADK | Python, TypeScript, Go, Java, Kotlin | Agent and graph-based Workflow | Graph, dynamic, collaborative and template workflows | Session and memory services, tool confirmation | Apache-2.0 |
| Pydantic AI | Python | Typed agent loop | Delegation via tools, code handoff, Pydantic Graph | Durable execution engines, tool approval | MIT |
LangGraph and LangChain
LangChain splits its stack into layers. LangChain is the agent framework: model and tool abstractions, integrations and a ready-made agent loop. LangGraph sits beneath it as the orchestration runtime. Its overview says you model a workflow as a graph of shared state, nodes and edges, and you can put deterministic steps and LLM calls in the same graph. LangGraph does not dictate prompts or agent design, and it does not require LangChain. A third package, Deep Agents, adds planning, subagents and filesystem tools on top.
State is where LangGraph is strongest. Checkpointers store a thread’s graph state, which gives you conversation continuity, fault tolerance, time travel and human review. Stores hold longer-lived data such as user preferences across threads. For review steps, you call interrupt() inside a node; LangGraph saves the state and waits, and you resume by invoking the graph again with a Command. Both repos are MIT-licensed, and JavaScript/TypeScript ports exist as separate projects. For running this stack in production, see our guide to LangChain production AI agents.
Microsoft Agent Framework
Microsoft Agent Framework merges two earlier projects, AutoGen and Semantic Kernel. Microsoft’s overview calls it the “direct successor” to both, built by the same teams, combining AutoGen’s simple agent abstractions with Semantic Kernel’s enterprise features such as session state, type safety, middleware and telemetry. It runs on .NET and Python, with Go in public preview.
The framework has four areas: individual agents, an opinionated “harness” agent for long multi-step tasks, workflows, and integrations. Workflows come in functional and graph-based forms and link agents and functions along explicit paths. Prebuilt orchestrations cover sequential, concurrent, handoff, group-chat and Magentic patterns. Checkpoints are written at the end of each superstep so a long workflow can be paused and resumed or recover from failure. Human review uses a request and response mechanism: an executor sends a request out of the workflow and waits for the answer. The docs give a useful rule: pick an agent for open-ended or conversational work, pick a workflow when the steps are known, and skip AI altogether if a plain function will do. The repo is MIT-licensed. We compare it with NVIDIA’s sandbox stack in NemoClaw vs Microsoft Agent Framework.
CrewAI
CrewAI is a standalone Python framework with two building blocks. Crews are teams of role-based agents, each with a role, goal, tools and tasks, that collaborate on a piece of work. Flows are event-driven workflows that hold state and decide what runs when, calling a crew from a step when that step needs autonomy. Crews can run tasks in sequence or use a hierarchical process in which a manager agent plans, delegates and checks results.
For persistence, the @persist decorator saves Flow state across restarts, at class or method level. The default backend is a local SQLite database, and you can plug in your own storage. A run can also be forked from an earlier saved state. For review gates, the @human_feedback decorator pauses a Flow until a person responds. CrewAI is MIT-licensed; the company also sells CrewAI AMP Suite, a commercial layer for managed deployment, governance and support.
LlamaIndex
LlamaIndex offers prebuilt agents such as FunctionAgent, ReActAgent and CodeActAgent, plus AgentWorkflow for several agents, all built on its event-driven Workflows. Tools can be plain Python functions or full query engines, which suits agents that answer from your own documents. The multi-agent guide describes three patterns: let AgentWorkflow manage handoffs, make an orchestrator agent that calls sub-agents as tools, or write your own planner and invoke agents from code.
AgentWorkflow keeps no memory between runs by default. You hold state in a Context object, which can be serialized to a file or database and loaded later. For human input, a tool emits an InputRequiredEvent and waits for a HumanResponseEvent. One thing to weigh: the README says the company’s main focus has moved to its LlamaParse document platform, while the open-source framework stays available. The licence is MIT.
OpenAI Agents SDK
OpenAI’s SDK is the production follow-up to its earlier Swarm experiment and deliberately keeps the primitive count small: agents with instructions and tools, handoffs or agents-as-tools for delegation, guardrails, and sessions. Orchestration is ordinary Python. A handoff appears to the model as a tool named after the target agent, for example transfer_to_refund_agent:
from agents import Agent, handoff
billing_agent = Agent(name="Billing agent")
refund_agent = Agent(name="Refund agent")
triage_agent = Agent(name="Triage agent", handoffs=[billing_agent, handoff(refund_agent)])
Sessions store conversation history automatically between runs. For human review, a tool marked needs_approval pauses the run; you turn the result into a RunState, approve or reject the call, and resume, and that state can be serialized in between. The SDK defaults to OpenAI’s Responses API but wraps it in its own runtime, and tracing is built in. It is MIT-licensed, with a separate JS/TS version.
Google ADK
The Agent Development Kit is Google’s code-first framework, available in Python, TypeScript, Go, Java and Kotlin. It is tuned for Gemini but supports other models through adapters, including local ones. The two main classes are Agent and Workflow. ADK 2.0 adds graph-based, dynamic and collaborative workflows next to the prebuilt template workflows for sequences, loops and parallel steps, and a Task API for structured delegation between agents.
Conversation state lives in Session and Memory services. The in-memory versions are meant for local testing only and lose everything on restart, so production needs the database or cloud-backed options. Human review is handled by a tool confirmation flow that guards tool calls. Deployment targets include Cloud Run, GKE and Google’s Agent Runtime, or your own containers. The Python repo is Apache-2.0-licensed.
Pydantic AI
Pydantic AI comes from the team behind Pydantic, and its focus is type safety: structured outputs, typed dependency injection and tools whose arguments are validated before your code runs. Swapping models is a one-string change. Multi-agent work is layered: an agent can call another inside a tool, application code can pass control from one agent to the next, and Pydantic Graph handles complex control flow. A separate Harness package adds subagents, planning, memory and persistence.
Its persistence story is the broadest here. Agents can run under nine durable execution engines, including Temporal, DBOS, Prefect and Restate, which record every model and tool call so a run survives crashes and long waits. Human approval of tool calls is built in. The licence is MIT.
How to choose
- You want fine control over state and branching: LangGraph. Pair it with LangChain or Deep Agents if you want a higher-level loop first.
- You work in .NET or Azure, or you are on AutoGen or Semantic Kernel today: Microsoft Agent Framework, which is the official migration target.
- Your problem maps to a team of roles (researcher, writer, reviewer): CrewAI, with Flows around the crew for the deterministic parts.
- Your agents mostly answer from your own documents: LlamaIndex, keeping its shift in company focus in mind.
- You want the fewest new concepts and use OpenAI models: the OpenAI Agents SDK.
- You build on Gemini or Google Cloud, or need Java or Kotlin: Google ADK.
- You value typed outputs and already run Temporal, DBOS or Prefect: Pydantic AI.
Whatever you pick, check how it saves state before you build. Every framework above can pause for a human, but the in-memory defaults most of them start with will not survive a restart.
Written by AI Agents Directory
Editorial team
Facts in this guide are checked against official documentation and repositories, which are linked in the article.