14 agent frameworks
Libraries and SDKs for writing your own tool-using agents and multi-step workflows.
- Rank 5
Orchestrates long-running, stateful agents as graphs with durable execution and human-in-the-loop
- score 96
- 43.3k stars
- pushed
- cli==0.4.35 on
- MIT
Install with pip
pip install -U langgraphWhen to use it, when to skip it
Why you'd want it
LangGraph is a low-level orchestration layer for agents and workflows that need to persist through failures and resume exactly where they left off. It provides short-term working memory and long-term memory across sessions, and lets a human inspect and modify agent state at any point during execution. It is built by LangChain Inc. but can be used without LangChain, and an equivalent JS/TS library, LangGraph.js, is available.
Best for
- Long-running stateful agents
- Workflows with human review steps
- Teams already using LangChain or LangSmith
Use it when
You want explicit control over an agent's control flow and state, with checkpoints it can resume from after a failure or a human review.
Skip it if
You want a quick agent with planning, subagents and file system use out of the box; the README points to Deep Agents, a higher-level package built on LangGraph, for that.
- Rank 9
Provides one interface and a large integration library for models, embeddings, vector stores and tools
- score 86
- 148k stars
- pushed
- langchain-core==1.6.10 on
- MIT
Install with pip
pip install -U langchainWhen to use it, when to skip it
Why you'd want it
LangChain is a framework for building agents and LLM apps from interoperable components, with a large library of integrations for model providers, tools, vector stores and retrievers. Its standard model interface lets you swap models as you experiment without rebuilding the app. An equivalent JS/TS library, LangChain.js, is available, and it pairs with LangGraph for lower-level orchestration and LangSmith for evals and tracing.
Best for
- Apps that need many model or data integrations
- Switching between model providers
- Prototyping LLM apps in Python or JS
Use it when
You want ready-made integrations for models, vector stores and retrievers, and a single interface for switching providers.
Skip it if
You need fine-grained control over agent flow and state; the README points to LangGraph for advanced customization and agent orchestration.
- Rank 21
Builds TypeScript agents and graph-based workflows with memory, RAG, evals and model routing
- score 82
- 28.8k stars
- pushed
- @mastra/core@1.77.0 on
- Apache-2.0
Create a project with npm
npm create mastra@latestWhen to use it, when to skip it
Why you'd want it
Mastra is a TypeScript framework for agents and workflows that plugs into React, Next.js and Node apps or runs as a standalone server. It connects to 40+ model providers through one interface, has a graph-based workflow engine with .then(), .branch() and .parallel(), and can suspend an agent or workflow for human input and resume from stored state. It also covers conversation history, RAG, observational memory, MCP server authoring, evals and observability.
Best for
- TypeScript and Next.js teams
- Agents with human approval steps
- Apps that need memory and RAG in one stack
Use it when
You want agents, workflows, memory and evals in one TypeScript framework instead of assembling separate libraries.
Skip it if
You work in Python. Features in ee/ directories (for example auth) need a Mastra enterprise license for production use.
- Rank 22
Builds multi-agent workflows with handoffs, guardrails, sessions and built-in tracing
- score 82
- 30k stars
- pushed
- v0.23.1 on
- MIT
Install with pip
pip install openai-agentsWhen to use it, when to skip it
Why you'd want it
The OpenAI Agents SDK is a lightweight Python framework where agents are LLMs configured with instructions, tools, guardrails and handoffs to other agents. It is provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs plus 100+ other LLMs, and includes sessions for conversation history, human-in-the-loop, and built-in tracing of agent runs. It also covers sandbox agents that work in a container over long tasks, plus realtime and voice agents.
Best for
- Multi-agent apps with handoffs
- Voice and realtime agents
- Teams on the OpenAI API
Use it when
You want a small set of primitives (agents, tools, handoffs, guardrails) with tracing built in, and may want voice or sandboxed agents later.
Skip it if
You work in JavaScript or TypeScript; use the separate Agents SDK JS/TS (openai/openai-agents-js) instead. The Python package needs Python 3.10 or newer.
- Rank 23
Gives TypeScript apps one API for text, structured output, tool-calling agents and chat UI hooks
- score 82
- 27.3k stars
- pushed
- @ai-sdk/workflow-harness@1.0.151 on
- Apache-2.0
Install with npm
npm install aiWhen to use it, when to skip it
Why you'd want it
The AI SDK is a provider-agnostic TypeScript toolkit with a unified API across providers such as OpenAI, Anthropic and Google. generateText covers text and Zod-typed structured output, ToolLoopAgent runs tool-calling agents, and AI SDK UI provides framework-agnostic hooks for chat and generative UIs in Next.js, React, Svelte and Vue. By default it routes model strings through the Vercel AI Gateway, and you can install provider packages to connect to providers directly.
Best for
- Next.js and React apps
- Streaming chat UIs
- Switching model providers in TypeScript
Use it when
You are building an AI feature or agent into a web app and want the model calls and the chat UI from one library.
Skip it if
You are not on JavaScript or TypeScript; it needs Node.js 22+. If you do not want the default Vercel AI Gateway routing, plan to install provider packages such as @ai-sdk/openai.
- Rank 25
Runs a typed Python agent loop with validated tools and outputs, and models swapped by a string
- score 81
- 20.6k stars
- pushed
- v2.56.0 on
- MIT
Install with uv
uv add pydantic-aiWhen to use it, when to skip it
Why you'd want it
Pydantic AI gives you an agent whose tools and outputs are typed: tool arguments are validated before your code runs, and a run is guaranteed to return the output type you declared. The same agent can run behind a web frontend, in the terminal, on a voice call, or under durable execution with Temporal, DBOS or Prefect. Pydantic AI Harness adds capabilities such as memory, guardrails, sub-agents, planning and context management, and its instrumentation is plain OpenTelemetry.
Best for
- Typed data extraction
- Python teams already using Pydantic
- Durable background agents on Temporal or DBOS
Use it when
You want type checking and validation across tools and outputs, plus the option to switch model providers without rewriting the agent.
Skip it if
You are not working in Python.
- Rank 28
Embeds Claude Code's agent loop, built-in tools and context management in Python or TypeScript apps
- score 79
- 8.3k stars
- pushed
- v0.2.167 on
- MIT
Install with pip
pip install claude-agent-sdkWhen to use it, when to skip it
Why you'd want it
The Agent SDK is a library that runs the Claude Code binary, so your agent gets the same tools (read, write and edit files, run commands, search the web), agent loop and context management that power Claude Code. You can add custom tools as in-process MCP servers, run hooks at points in the agent lifecycle, spawn subagents, control which tools run automatically through permissions, and resume or fork sessions. It is available for Python (claude-agent-sdk) and TypeScript (@anthropic-ai/claude-agent-sdk).
Best for
- Agents that edit files and run commands
- Teams already using Claude Code
- Embedding a coding agent in your own app
Use it when
You want Claude Code's tool set and permission model inside a process you operate, instead of writing the tool loop yourself.
Skip it if
You want to use non-Claude models. It needs an Anthropic API key or Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry, and third-party products may not offer claude.ai login unless approved by Anthropic.
- Rank 36
Orchestrates teams of role-based agents (Crews) and event-driven workflows (Flows) in Python
- score 70
- 59.7k stars
- pushed
- 1.15.28 on
- MIT
Install the CLI with uv
uv tool install crewaiWhen to use it, when to skip it
Why you'd want it
CrewAI is a standalone Python framework with its own primitives for agents, tasks, crews, flows, tools and orchestration. Crews let role-based agents collaborate and delegate tasks autonomously, while Flows give event-driven control with state management and conditional branching, and the two can be combined. The crewai CLI scaffolds a project where agents and tasks are defined in JSONC files and run with crewai run.
Best for
- Multi-agent teams with defined roles
- Business process automation
- Mixing autonomous agents with deterministic steps
Use it when
You want several specialized agents with clear roles and tasks, wrapped in deterministic, event-driven workflows in regular Python.
Skip it if
You are not on Python (it requires Python 3.10 to 3.13). It collects anonymous telemetry by default (disable with OTEL_SDK_DISABLED=true), and the managed control plane, CrewAI AMP, is a separate commercial product.
- Rank 40
Connects LLM agents to your data with connectors, indexes, query engines and event-driven workflows
- score 70
- 52.5k stars
- pushed
- v0.14.25 on
- MIT
Install with pip
pip install llama-indexWhen to use it, when to skip it
Why you'd want it
The LlamaIndex framework is a Python toolkit for context augmentation: data connectors ingest APIs, PDFs, docs and SQL, indexes structure the data, and query and chat engines retrieve context for the model. Agents can call a RAG pipeline as one tool among many, and Workflows add event-driven, multi-step processes with branching, retries and human-in-the-loop review. You can start with the llama-index starter package or install llama-index-core plus only the integrations you need from over 300 packages.
Best for
- RAG over private documents
- Agents that query your own data
- Pairing with LlamaParse for hard documents
Use it when
Your agent's main job is answering questions or taking actions over your own documents and data sources.
Skip it if
You want a framework that is its maintainer's main focus: the README says the company's primary focus has shifted to LlamaParse, while the OSS framework stays available.
- Rank 41
Builds Python agents, teams and workflows and serves them as an API with the AgentOS runtime
- score 69
- 42.7k stars
- pushed
- v3.1.3 on
- Apache-2.0
Install with pip
pip install -U agno openaiWhen to use it, when to skip it
Why you'd want it
Agno is a Python SDK with three primitives (agents, teams and workflows) plus a runtime, AgentOS, that serves them through a production API with 50+ endpoints over SSE and websockets. Sessions, memory, knowledge and traces are stored in your own database, and the runtime adds human approval, OpenTelemetry tracing, JWT-based RBAC with multi-tenant isolation, cron scheduling, and interfaces for Slack, Telegram, WhatsApp, Discord, AG-UI and A2A. Starter templates deploy it with Docker to Railway, AWS, GCP, Azure, Fly, Render, Modal or Helm.
Best for
- Self-hosted agent platforms
- Serving agents to many users
- Agents exposed in Slack or messaging apps
Use it when
You want to build agents and also run them as a multi-user service on your own infrastructure, with data kept in your own database.
Skip it if
You are not on Python. Agno sends a telemetry event per agent run by default (prompts, messages and outputs are not sent); set AGNO_TELEMETRY=false to turn it off.
- Rank 46
Builds, evaluates and deploys Python agents and graph-based workflows, optimized for Gemini
- score 68
- 21.9k stars
- pushed
- v2.12.0 on
- Apache-2.0
Install with pip
pip install google-adkWhen to use it, when to skip it
Why you'd want it
ADK is a code-first framework where you define agents, tools and orchestration in Python, then compose them into multi-agent hierarchies or graph-based workflows with routing, fan-out/fan-in, loops, retries and human-in-the-loop. It ships a CLI with an interactive runner, a local web UI for testing and debugging, an adk eval command, and deploy commands for Docker and Cloud Run, with Vertex AI Agent Engine for scaling. It is optimized for Gemini but model-agnostic, and tools can come from custom functions, OpenAPI specs or MCP.
Best for
- Teams on Gemini and Google Cloud
- Multi-agent hierarchies
- Agents that need built-in evaluation
Use it when
You want agent definitions, a local testing UI, evaluation and deployment to Cloud Run in one toolkit.
Skip it if
You are on Python older than 3.11. If Python is not your stack, ADK has separate Java, Kotlin, Go and TypeScript versions in other repos.
- Rank 55
Runs a model-driven agent loop in your own process, in Python or TypeScript, with any model provider
- score 65
- 8.8k stars
- pushed
- python/v1.61.0 on
- Apache-2.0
Install with pip
pip install strands-agents strands-agents-toolsWhen to use it, when to skip it
Why you'd want it
Strands is an SDK for cases where you would otherwise write your own agent loop: it runs in your process with no hosted control plane and covers turn limits, token budgets, cancellation, tools, structured output, MCP, multi-agent patterns, memory, sessions, streaming, guardrails, tracing and evals. It has first-class support for Amazon Bedrock, Anthropic, OpenAI and Gemini plus other and custom providers, and hooks let you intercept any step of the loop. Strands harness (create_harness() in Python, createHarness() in TypeScript) gives a fully assembled agent with preset defaults.
Best for
- Replacing a hand-rolled agent loop
- Amazon Bedrock users
- Mixed Python and TypeScript stacks
Use it when
You want to own the agent loop in your own process, with lifecycle limits, hooks and tracing built in and the option to swap model providers.
Skip it if
You want a hosted agent platform rather than a library. The Python SDK needs Python 3.10+ and the TypeScript SDK needs Node.js 22+.
- Rank 60
Runs agents that write their actions as Python code, with core agent logic in about 1,000 lines
- score 63
- 29.8k stars
- pushed
- v1.26.0 on
- Apache-2.0
Install with pip
pip install "smolagents[toolkit]"When to use it, when to skip it
Why you'd want it
smolagents keeps abstractions minimal: the agent logic fits in roughly 1,000 lines, and its CodeAgent writes its actions in code. It is model-agnostic (local transformers or Ollama models, Hugging Face inference providers, or OpenAI, Anthropic and others via LiteLLM) and can use tools from MCP servers, LangChain or Hub Spaces. Agents and tools can be pushed to and pulled from the Hugging Face Hub, and a smolagent CLI runs agents from the terminal.
Best for
- Agents that act by writing code
- Hugging Face Hub users
- Reading and learning a compact agent loop
Use it when
You want a small, readable agent library and agents that act by writing code, with your choice of local or hosted models.
Skip it if
You cannot run agent code in a sandbox: the README says the built-in LocalPythonExecutor is not a security boundary and recommends E2B, Blaxel, Modal or Docker.
- Rank 71
Builds multi-agent AI apps that act autonomously or alongside humans; now in maintenance mode
- score 27
- 61.4k stars
- pushed
- python-v0.7.5 on
- CC-BY-4.0
Install with pip
pip install -U "autogen-agentchat" "autogen-ext[openai]"When to use it, when to skip it
Why you'd want it
AutoGen is Microsoft's multi-agent framework, layered into a Core API (message passing, event-driven agents, local and distributed runtimes), an AgentChat API for common patterns such as two-agent chat and group chat, and an Extensions API for model clients and code execution. AutoGen Studio adds a no-code GUI for prototyping multi-agent workflows, though the README says it is not meant to be a production-ready app. Existing users can keep using it, but it no longer receives new features.
Best for
- Maintaining existing AutoGen projects
- Studying multi-agent orchestration patterns
Use it when
You already run AutoGen and need it to keep working while you plan a migration.
Skip it if
You are starting a new project: AutoGen is in maintenance mode and community managed, and Microsoft recommends its successor, Microsoft Agent Framework, which has a migration guide from AutoGen.