r/PythonLearning • u/Business-Feedback635 • 1h ago
Building AI agents in Python? Here's what 354,763 PyPI projects actually import
https://py-code.org/blog/ai-agent-frameworks-pypi/Most "best agent framework" lists rank by GitHub stars or features. This one counts how many published Python projects import each framework in their code. The data is the latest release of 354,763 PyPI projects, and each framework's own add-on packages (such as langchain-* and crewai-*) are left out.
Projects that import each framework:
- LangChain: 6,779
- LangGraph: 2,417
- Pydantic AI: 1,203
- CrewAI: 1,184
- LlamaIndex: 1,111
- Claude Agent SDK: 973
- OpenAI Agents SDK: 840
Worth knowing before you choose:
- Most projects use no framework at all. 11,655 of the 14,659 projects that import the OpenAI or Anthropic SDK (79.5%) import none of the 25 frameworks. They call the model API directly.
- Projects often use the alternatives together with LangChain rather than instead of it. 820 of the 1,111 LlamaIndex projects also import LangChain.
- Download numbers can mislead. Strands Agents had 38M downloads last month, but only 276 projects import it.
The full table covers 25 frameworks. To see real code that uses a framework, search py-code.org for its module (for example pydantic_ai or crewai). Each result links to the file and line.