Best open-source AI agent frameworks for Python (2026)
Our pick
Start with LangGraph if you want a Python framework for long-running agents that you control step by step. You install it with pip (pip install -U langgraph), and it is MIT licensed. It covers durable execution, human-in-the-loop and memory, and it works on its own or with LangChain. The table shows its last commit and latest release, and how the other frameworks compare.
Best for
- Stateful agents that run for a long time
langchain-ai/langgraphA low-level orchestration framework with durable execution, human-in-the-loop checks and memory across sessions.
- A small SDK for multi-agent workflows
openai/openai-agents-pythonInstalls with pip install openai-agents. Agents hand work to each other, and it supports the OpenAI APIs and many other model providers.
- Teams of role-based agents
crewAIInc/crewAIA Python framework for multi-agent workflows, with Crews for autonomous collaboration and Flows for event-driven control.
- Agents and retrieval in one pipeline
deepset-ai/haystackInstalls with pip install haystack-ai. Modular pipelines and agent workflows with control over retrieval, routing and memory.
- Typed Python agents
pydantic/pydantic-aiA typed agent loop where any supported model is a string swap away, with evals and a graph library alongside.
- Google Cloud and Gemini projects
google/adk-pythonInstalls with pip install google-adk. Tuned for Gemini, but model-agnostic, with MCP tools and graph-based workflows.
The repos compared
Checked on Dec 1, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| langchain-ai / langgraph A low-level framework for building long-running, stateful agents. | 45,675 GitHub (opens in new tab) | Active Dec 1, 2026 | 1.2.24, Nov 20, 2026 | MIT | |
| langchain-ai / langchain A Python framework of components and integrations for building agents and LLM apps. | 150,260 GitHub (opens in new tab) | Active Dec 1, 2026 | langchain-core==1.8.4, Nov 19, 2026 | MIT | |
| crewAIInc / crewAI A Python framework for multi-agent workflows built from Crews and Flows. | 61,418 GitHub (opens in new tab) | Active Dec 1, 2026 | 1.15.45, Nov 24, 2026 | MIT | |
| openai / openai-agents-python A Python SDK for multi-agent workflows with handoffs, guardrails and tracing. | 30,976 GitHub (opens in new tab) | Active Dec 2, 2026 | v0.26.0, Nov 24, 2026 | MIT | |
| google / adk-python A code-first Python toolkit for building, evaluating and deploying agents. | 22,473 GitHub (opens in new tab) | Active Dec 2, 2026 | v2.15.1, Nov 25, 2026 | Apache-2.0 | |
| pydantic / pydantic-ai A typed Python agent framework that works with many model providers. | 21,492 GitHub (opens in new tab) | Active Dec 2, 2026 | v2.76.0, Nov 26, 2026 | MIT | |
| agno-agi / agno A platform for building agents and running them as services. | 43,356 GitHub (opens in new tab) | Active Dec 1, 2026 | v3.2.1, Nov 17, 2026 | Apache-2.0 | |
| agentscope-ai / agentscope A Python framework for building and running agents with tools, MCP servers and skills. | 37,013 GitHub (opens in new tab) | Active Dec 2, 2026 | v2.0.12, Nov 16, 2026 | Apache-2.0 | |
| deepset-ai / haystack A Python framework for building LLM apps from modular pipelines and agent workflows. | 27,149 GitHub (opens in new tab) | Active Dec 1, 2026 | v3.5.0, Nov 10, 2026 | Apache-2.0 | |
| strands-agents / harness-sdk An SDK for building and running AI agents in Python and TypeScript. | 9,355 GitHub (opens in new tab) | Active Dec 2, 2026 | harness-rust/v0.1.0, Dec 1, 2026 | Apache-2.0 |
Install commands
Copied from each repo. Read its setup steps before you run anything.
langchain-ai/langchain
uv add langchaincrewAIInc/crewAI
python3 --versionQuestions
What is the best AI agent framework in Python?
It depends on the job. LangGraph suits long-running stateful agents, the OpenAI Agents SDK is a small toolkit for multi-agent workflows, and Pydantic AI suits typed code. All three are installed with pip or uv and are MIT licensed.
What is the difference between LangChain and LangGraph?
LangChain provides composable components and integrations for building agents and LLM apps. LangGraph is the lower-level layer for agent orchestration, with durable execution and human-in-the-loop control. They are made by the same team and work together.
Are these agent frameworks free to use?
Yes, the code of every project on this page is open source, and the Licence column shows which licence applies. Some makers also sell hosted products: CrewAI has a commercial AMP Suite and LangChain has LangSmith for evals and observability.
Do I need an OpenAI key to use an agent framework?
Not for most of them. The OpenAI Agents SDK is provider-agnostic, ADK is model-agnostic, Strands supports Amazon Bedrock, Anthropic, OpenAI, Gemini and more, and AgentScope works with providers including Anthropic, Gemini and Ollama.
What is the best AI orchestration tool?
It depends on the job. LangGraph, the pick on this page, is a low-level orchestration framework for long-running, stateful agents. Haystack is an AI orchestration framework that builds LLM apps from modular pipelines, and CrewAI covers multi-agent workflows with Crews and Flows.
How much does LangGraph cost?
LangGraph is free to use: it is an open-source Python framework under the MIT licence, and you install it with pip. LangSmith, which LangChain offers for evals, observability and deployment, is a separate product from the framework.
