Updated
Agent building blocks

AI SDK & Agent Framework

The code between your product and the model — streaming, tool calls, structured output — and, when you need it, the agent loop that keeps state and hands work between steps.

For your framework or language:ReactNext.js
Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

Trends

OpenAI Agents SDK gained the most ground in package downloads: 7.9× against the median npm package over a year.

Public counts each month: pull requests on GitHub, package downloads, stars, Product Hunt followers. They show direction, not market share.

ToolDownloadsStarsProduct Hunt
AI SDK24.5M/wk+157% vs npm★ 27.2k13 followers
Claude Agent SDK11.1M/wk★ 8.3k—
Strands Agents8.5M/wk★ 8.8k—
Pydantic AI5.5M/wk★ 20.7k—
LangChain5.3M/wk−3% vs npm★ 148k1.1k followers
LangGraph3.6M/wk+83% vs npm★ 43.2k2 followers
OpenAI Agents SDK1.8M/wk7.9× vs npm★ 30.1k2 followers
Mastra1.6M/wk3.2× vs npm★ 28.8k1.8k followers
DSPy1.2M/wk★ 38.6k—
CrewAI560.6k/wk★ 59.8k104 followers
CopilotKit438.6k/wk3.3× vs npm★ 38k1.1k followers
Agno409.8k/wk★ 42.8k—
Microsoft Agent Framework222.7k/wk★ 14.2k—
Agent Development Kit215.6k/wk★ 21.8k—
Haystack128.8k/wk★ 26.8k—
LlamaIndex116.5k/wk−17% vs npm★ 52.5k7 followers
Letta100.7k/wk★ 25.2k—
smolagents99.6k/wk★ 29.9k—
AutoGenArchived89.6k/wk★ 61.5k—
Semantic KernelMoving69.7k/wk★ 28.7k—
Instructor22.8k/wk−46% vs npm★ 14k—
Langflow9.1k/wk★ 155.6k478 followers
OGXRenamed4.2k/wk★ 8.4k—
Dify3.3k/wk★ 158.6k526 followers
OpenAI SwarmMoving—★ 22.1k—

The real choice

Broad framework or thin SDK. Broad frameworks come with integrations for loaders, vector stores and memory, but add layers of abstraction you have to learn and debug. Thin SDKs give you a typed agent loop close to the raw API and leave the rest to you. An agent harness goes further the other way: the whole loop — file access, shell, context management — comes ready-made, for agents that work inside a workspace. A visual builder sits outside your code entirely: you assemble the agent, its tools and its retrieval on a canvas and call the result over an API, trading control and version history in your repo for speed and edits non-developers can make.

What makers chose107 live products, each with a source. Not market share.

Pick by situation

Tap the ones that are you — the tools that fit light up below.
  • Your app is TypeScript and you want agents without adding a Python serviceAI SDKMastra
  • You want a small typed agent loop in Python, close to the raw APIPydantic AIOpenAI Agents SDK
  • Your agent works on files and runs commands, like a coding or research agentClaude Agent SDK
  • You need many prebuilt connectors for models, tools and data sourcesLangChain
  • Your agent is a long-running workflow with branches, saved state and human approval stepsLangGraph
  • The agent mostly retrieves and reasons over your own documentsLlamaIndex

Compare the tools

Grouped by the side of the choice they answer, not ranked. Open a row for when to use it, the trade-off and what makers say.

ToolBest for
Broad framework2
LangChainframework · open source · free tierThe largest set of ready-made integrations for models, tools and data sources, in Python and JavaScript.66+265 open source5.3M/wk−3% vs npm

Use it whenYou need many connectors and want LangGraph for stateful, multi-step agents.

Trade-offLayers of abstraction make debugging harder, and the API has changed often.

llms.txt

Used by AI Context Flow, Brev.io, Databox, Fabi.ai, fileAI and 61 more · in 265 open-source projects.

The whole ecosystem has been a great help till now. Even though we often have to develop our own. Langsmith is one of our go to tool for tracing and evaluating.
Kuration AI, the makerSep 2026 ↗
LlamaIndexframework · open source · free tierAgents that mostly retrieve and reason over your own documents.16+81 open source116.5k/wk−17% vs npm

Use it whenIngesting, indexing and querying data is the core of the product.

Trade-offLess natural for agents whose work is mostly calling external tools rather than reading data.

llms.txt

Used by Basejump AI, debate AI, Dezyn, Web Search Agents by Nimble, Arcee and 11 more · in 81 open-source projects.

The flexibility is what really got us hooked. We can quickly connect our LLMs with any datasource we've thrown at LlamaIndex.
Web Search Agents by Nimble, the makerSep 2026 ↗
TypeScript framework1
Mastraframework · open source · free tierTypeScript and Next.js apps that want agents, workflows, memory and RAG without a Python service.24+19 open source1.6M/wk3.2× vs npm

Use it whenYou want a full agent framework — workflows, memory, evals — in the same TypeScript codebase as your app.

Trade-offYounger ecosystem, and some enterprise features sit under a separate source-available license.

llms.txtCLI

Used by Imagine, onlook, Upsolve AI, Artifact, Counsel Health and 19 more · in 19 open-source projects.

Shoutout to the team at Mastra for building an excellent agent orchestration layer. Mastra is a key part of Imagine.dev’s agentic architecture, helping us coordinate specialized agents and reliably turn high-level intent into structured execution. Their focus on developer experience and composability made it possible…
Imagine, the makerSep 2026 ↗
Multi-agent orchestration1
LangGraphframework · open source · free tierStateful agents built as an explicit graph of steps, with checkpoints, retries, streaming and pauses for human approval, in Python or JavaScript.1+120 open source3.6M/wk+83% vs npm

Use it whenYour agent runs many steps or for a long time and you need to control each transition, resume after failures, or have a person approve actions.

Trade-offLower-level than a prebuilt agent — you design the graph and state yourself; managed deployment and tracing sit in paid LangSmith plans.

llms.txtCLI

Used by Semos.ai Manager Agents · in 120 open-source projects.

We picked LangGraph over CrewAI and AutoGen because it gives us explicit, stateful agent graphs with checkpoints and human approval steps, so we control every step instead of hoping the agents behave.
Semos.ai Manager Agents, the makerSep 2026 ↗
Thin SDK3
AI SDKlibrary · open source · free tierTypeScript agents with tool calling, multi-step loops and streaming to the UI, on any model provider.5+241 open source24.5M/wk+157% vs npm

Use it whenYou already use the AI SDK for chat and want the agent in the same code.

Trade-offMemory, workflows and evals are left to you or other libraries.

Used by onlook, Fuser, Quartr, Sparks AI, Zyntax IDE · in 241 open-source projects.

• TypeScript-first, ergonomic API with excellent Next.js integration; streaming and tool calling are rock solid. • Consistent abstractions across multiple model providers (great with OpenRouter) minimize vendor lock-in and churn. • Clear docs and examples reduce boilerplate and accelerate iteration; fewer edge-case f…
onlook, the makerSep 2026 ↗
OpenAI Agents SDKframework · open source · free tierA small agent loop with tools, handoffs, guardrails and tracing built in, from the OpenAI team.1+53 open source1.8M/wk7.9× vs npm

Use it whenYou're mostly on OpenAI models and want minimal abstraction.

Trade-offTracing and hosted tools fit OpenAI best; other providers work but get less attention.

Used by DeepvBrowser · in 53 open-source projects.

Simplifies task decomposition and tool orchestration—define tools once and reuse across multiple browsing flows. Strong state management, invocation constraints, and observability, so we focus on user experience instead of glue code.
DeepvBrowser, the makerSep 2026 ↗
Pydantic AIframework · open source · free tierPython agents whose outputs must validate against typed schemas, across any model provider.46 open source5.5M/wk

Use it whenYou already use Pydantic and FastAPI and want the same style for agents.

Trade-offPython only, with fewer prebuilt integrations than the broad frameworks.

llms.txt

No maker's product we track shows it for this yet · in 46 open-source projects.

Agent harness1
Claude Agent SDKlibrary · open sourceAgents that read and edit files, run shell commands and manage long context, built on the same harness as Claude Code.83 open source11.1M/wk

Use it whenYour agent does open-ended work in a workspace — code, research, file processing — rather than a few API calls.

Trade-offBuilt for Claude models, and it needs a filesystem and process to run in, which serverless functions don't give you.

llms.txt

No maker's product we track shows it for this yet · in 83 open-source projects.

Who switches to what

Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes, by developers in general rather than makers only. Pick a flow to see its pull requests.

LangChain → LangGraph: 6+ pull requestsLangGraph → Mastra: 5 pull requestsLangChain → AI SDK: 4 pull requestsLangGraph → LangChain: 3+ pull requestsAI SDK → LangChain: 3 pull requestsLangChain 10LangGraph 8AI SDK 3LangGraph 6LangChain 6Mastra 5AI SDK 4Moving fromMoving to

Before you choose

How to approach it

Write your first agent as a plain loop around the model's tool-calling API — it's under a hundred lines and teaches you what a framework would hide. Reach for a framework when you need the pieces it saves you from: retries, streaming, tracing, multi-step workflows. Choose by language first; a TypeScript app should not grow a Python service just for an agent.

Common mistakes
  • Reaching for a multi-agent setup before one agent with good tools works; more agents mean more tokens and more ways to fail.
  • Letting the agent loop run with no step or cost cap, so a confused model calls tools until it hits the provider's rate limit.
  • Adopting a broad framework's abstractions for a single model call, then fighting them when you need to see the actual prompt.

Other options

Real choices most makers here won't need to weigh.

CrewAIMulti-agent orchestrationPython projects that split work across several role-based agents, like researcher, writer and reviewer.3 makers' productsCopilotKitAgent frontendPutting an agent inside your app's UI — chat, generative UI, shared state with the page — connected to any agent backend over the AG-UI protocol.3 makers' productsAgent Development KitBroad frameworkMulti-agent systems with built-in evaluation and a dev UI, in Python, TypeScript, Java or Go, deployable to Google Cloud.Strands AgentsThin SDKA model-driven agent loop from AWS in Python or TypeScript, where you give the model tools and let it plan, on Bedrock or other providers.Microsoft Agent FrameworkBroad frameworkAgents and multi-agent workflows in Python or .NET, from Microsoft, replacing AutoGen and Semantic Kernel.DifyVisual builderAgents, RAG chatbots and multi-step LLM workflows built on a visual canvas and published as a web app, API or MCP server.LangflowVisual builderAgents, RAG flows and MCP servers assembled from components on a visual canvas and served as an API, an MCP server or an embedded chat widget, under the MIT license.smolagentsThin SDKA minimal Python agent library from Hugging Face whose main agent writes its actions as Python code, run in a sandbox such as E2B, Modal or Docker.DSPyBroad frameworkWriting LLM programs as typed modules and letting optimizers such as GEPA tune the prompts or weights against a metric you define.AgnoBroad frameworkA Python framework and runtime (AgentOS) for agents, teams and workflows that you run in your own cloud, with a paid control plane for traces, memory, evals and approvals.LettaBroad frameworkBuilding stateful agents on a server and API where long-term memory and self-editing context are built in.OGXBroad frameworkRenamed · Apr 2026Running one open-source server that speaks the OpenAI, Anthropic and Google APIs over any model provider, with vector stores, moderation, tool calling and an agent loop built in.InstructorThin SDKGetting validated structured output from any major LLM by declaring a Pydantic model, with retries on validation errors.HaystackBroad frameworkBuilding RAG pipelines and agents in Python from explicit, swappable components, with many vector-store and model integrations.Semantic KernelBroad frameworkMoving users · Oct 2025Building agents in C#/.NET, Python or Java with Microsoft's SDK and its Azure integrations.AutoGenMulti-agent orchestrationShut downResearch-style multi-agent systems in Python where agents converse with each other and with humans.OpenAI SwarmMulti-agent orchestrationMoving usersLearning how agent handoffs and routines work, in a tiny Python library.

Decided alongside

What the 107 makers' products here chose for their other decisions.

Further reading