AI in the product

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.

Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

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.

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

The contenders

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.65+205 open source5.1M/wk−1% 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 8base, AI Context Flow, Brev.io, Chirpz Agent, ClueoChat and 60 more · in 205 open-source projects.

We chose to integrate with LangChain as it is the leading LLM framework. We are happy that it was so straightforward to integrate with LangChain and build some use cases already.
Tilores entity resolution, the makerSep 2026 ↗
LlamaIndexframework · open source · free tierAgents that mostly retrieve and reason over your own documents.17+66 open source120.7k/wk−19% 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, Droidrun, Tometo and 12 more · in 66 open-source projects.

LlamaIndex provides sufficient independent tooling for building custom AI agents. Their open-source approach and developer community made it a solid choice for our platform.
Tometo, 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+13 open source1.4M/wk3.6× 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, Revolte, siift, superset and 19 more · in 13 open-source projects.

Really like the depth of product here, very hard to make a product of this scale high quality, impressed!
siift, 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+87 open source3.4M/wk+98% 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 87 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.4+193 open source21.2M/wk+167% 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, Quartr, Sparks AI, Zyntax IDE · in 193 open-source projects.

Used for multi-agent orchestration, state management, debugging, and structured artifact streaming for our AI application.
Quartr, 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+39 open source1.6M/wk

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 39 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.35 open source27.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 35 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.58 open source10.2M/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 58 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.

Decided alongside

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