LangGraph
Production agents that need explicit control flow, durable execution and human-in-the-loop interrupts.
Watch out: More concepts to learn (state, reducers, checkpointers) than a simple agent loop.
Free developer tool
An AI agent framework is a library that runs the agent loop for you: model calls, tool calls, memory, handoffs and tracing. Answer six questions about your language, agent shape, durability, model vendor, hosting and team, and this picker ranks nine leading frameworks, LangGraph, CrewAI, OpenAI Agents SDK, Claude Agent SDK, Microsoft Agent Framework, Google ADK, Mastra, Pydantic AI and LlamaIndex, explains why the top pick fits and gives you a hello-world starter. It runs in your browser; nothing is sent anywhere.
Top pick
by OpenAI · MIT
A lightweight agent or a few agents handing off to each other, with tracing and guardrails built in.
Watch out: Few primitives on purpose; complex branching workflows are left to your own code.
For one agent with a few tools, you may not need a framework yet: your model provider's SDK and a short tool-calling loop can be enough. Adopt a framework when you need memory, handoffs, tracing or durable runs.
Not shown for your language: Mastra.
pip install openai-agents
from agents import Agent, Runner, function_tool
@function_tool
def get_weather(city: str) -> str:
"""Get the weather for a city."""
return f"It is always sunny in {city}."
agent = Agent(name="Assistant", instructions="You are a helpful assistant.", tools=[get_weather])
result = Runner.run_sync(agent, "What is the weather in Paris?")
print(result.final_output)Swap in any current model ID and set your provider's API key. OpenAI Agents SDK docs
| Framework | Language | Orchestration | Memory and state | Tools | MCP / A2A | Observability | License |
|---|---|---|---|---|---|---|---|
| LangGraphLangChain | Python, TypeScript | Graph / state machine with cycles | Checkpointed thread state plus a long-term store | LangChain tools, any provider | MCP (adapters), A2A (Agent Server) | LangSmith tracing and evals | MIT |
| CrewAICrewAI | Python | Role-based crews of agents and tasks, plus event-driven Flows | Built-in short-term, long-term and entity memory | crewai-tools, any provider via LiteLLM | MCP, A2A | Built-in tracing, Langfuse and other integrations | MIT |
| OpenAI Agents SDKOpenAI | Python, TypeScript | Agent loop with handoffs and agents-as-tools | Sessions (SQLite, Redis and more) | Function tools, hosted tools, guardrails | MCP | Built-in tracing to the OpenAI dashboard | MIT |
| Claude Agent SDKAnthropic | Python, TypeScript | Claude Code agent loop as a library, with subagents and hooks | Resumable sessions, CLAUDE.md, automatic context compaction | Built-in file, shell, search and web tools | MCP | Hooks and a streamed message log | MIT (Python); TypeScript under Anthropic terms |
| Microsoft Agent FrameworkMicrosoft | Python, .NET | Agents plus graph workflows: sequential, concurrent, handoff, group chat | Threads and context providers; workflow checkpoints | Function tools, OpenAPI, hosted tools | MCP, A2A | OpenTelemetry built in | MIT |
| Google ADKGoogle | Python, TypeScript, Java, Go | Code-first agents, sub-agent delegation and workflow graphs | Session and memory services | Function tools, Google Search, OpenAPI, other frameworks' tools | MCP, A2A | Dev UI traces, OpenTelemetry, built-in evals | Apache 2.0 |
| MastraMastra | TypeScript | Agents plus typed workflows with branch, parallel and suspend/resume | Built-in working memory and semantic recall | Typed tools, built-in RAG, model router | MCP client and server | Tracing, evals and local Studio | Apache 2.0 (enterprise ee/ folders separate) |
| Pydantic AIPydantic | Python | Type-safe agents with dependency injection; graphs via pydantic-graph | Message history you control | Typed tools, validated structured output | MCP, A2A, AG-UI | Pydantic Logfire (OpenTelemetry) | MIT |
| LlamaIndexLlamaIndex | Python | Event-driven Workflows, FunctionAgent and AgentWorkflow | Memory blocks and serializable workflow context | Query engines as tools, 300+ data connectors | MCP | OpenTelemetry and tracing integrations | MIT |
Checked November 29, 2026 against each project's README, package registry and license. A2A is listed where it is built in or offered as an official package. Frameworks move fast: confirm details in the linked docs before you commit.
Production agents that need explicit control flow, durable execution and human-in-the-loop interrupts.
Watch out: More concepts to learn (state, reducers, checkpointers) than a simple agent loop.
Multi-agent teams you describe as roles, goals and tasks, with a fast start.
Watch out: Python only; role-play abstractions can hide what each LLM call does.
A lightweight agent or a few agents handing off to each other, with tracing and guardrails built in.
Watch out: Few primitives on purpose; complex branching workflows are left to your own code.
Agents that work on files and run commands: coding, ops, research and document agents.
Watch out: Runs Claude models only (Anthropic API, Amazon Bedrock, Google Vertex AI and more).
.NET or Python teams on Azure that want multi-agent orchestration with checkpoints. It succeeds AutoGen and Semantic Kernel.
Watch out: Newer than the others; some connectors are still preview packages. AutoGen itself is archived.
Multi-agent systems on Gemini and Google Cloud, in Python, TypeScript, Java or Go.
Watch out: Optimized for Gemini; other models go through LiteLLM or other connectors.
TypeScript teams that want agents, workflows, memory and RAG in one batteries-included framework.
Watch out: TypeScript only; a fast-moving API, so pin versions.
Python teams that want validated, typed outputs and durable execution (Temporal, DBOS) without heavy abstractions.
Watch out: Multi-agent patterns are code you write, not a built-in crew or team.
Agents over documents: retrieval, parsing and extraction across many file types.
Watch out: Python only now (LlamaIndex.TS is archived); less suited to non-document agents.
Frameworks that do not support your language are removed from the shortlist.
Choose single agent, multi-agent team, controlled workflow, document agent or file-and-shell agent.
Say whether runs must pause for approval, which model vendor you use and whether managed hosting helps.
Read why the top pick fits, compare it in the table and copy its hello-world starter.
An AI agent framework is a library that handles the agent loop for you: calling the model, running the tools it asks for, passing results back, and keeping state, memory and traces. You write the instructions and tools; the framework handles orchestration.
There is no single best one. LangGraph suits controlled, durable workflows; CrewAI suits role-based multi-agent teams; the OpenAI Agents SDK and Claude Agent SDK suit lightweight agents on those vendors' models; Google ADK and Microsoft Agent Framework suit Google Cloud and Azure; Mastra suits TypeScript teams; Pydantic AI suits typed Python; LlamaIndex suits document agents.
Pick LangGraph when you need explicit control flow, checkpoints and human approval steps in Python or TypeScript. Pick CrewAI when you want to describe a team of agents by role, goal and task and get started quickly in Python.
Not always. One agent with a few tools can run on your model provider's SDK and a short loop. A framework earns its place when you need memory, multi-agent handoffs, tracing, guardrails or runs that pause and resume.
Microsoft folded AutoGen and Semantic Kernel into Microsoft Agent Framework, which is now generally available for Python and .NET. The AutoGen repository is archived, so new projects should start on Agent Framework.
All nine frameworks compared here can use Model Context Protocol tools, natively or through an adapter package. Google ADK, Microsoft Agent Framework, CrewAI, LangGraph and Pydantic AI also support the Agent2Agent (A2A) protocol.
Picked a framework? Tornic runs agent work as repeatable workflows with steps, gates and schedules, on the Claude Code, Codex or Cursor CLI you already pay for.
Explore Tornic