Best AI Agent Framework for Indie Developers (2026)
Most indie developers shipping one agent feature in a SaaS do not need a heavy framework. If your app is TypeScript, start with the Vercel AI SDK (Apache-2.0). If your backend is Python, start with Pydantic AI (MIT). Reach for LangGraph or Mastra when the agent must pause, wait for a human and resume, and for the Claude Agent SDK when the agent's job is to work on files and run commands.

Key takeaways
- For a TypeScript or Next.js app, the Vercel AI SDK's ToolLoopAgent is the lightest path, and its separate WorkflowAgent adds durable steps when you need them.
- For a Python backend, Pydantic AI is MIT-licensed, model-agnostic and documents nine durable execution engines, including Temporal, DBOS and Prefect.
- LangGraph (MIT) and Mastra (Apache-2.0 outside its ee/ folders) are the picks for long-running, multi-step agents that pause for a human; both sell optional hosting, from $39 per seat for LangSmith Plus and $25 per month for Mastra Starter.
- The Claude Agent SDK runs a bundled Claude Code binary and is governed by Anthropic's Commercial Terms, so it fits agents that edit files and run commands, not generic multi-model chat features.
- If your agent calls three tools and finishes in one request, a plain tool loop of about 30 lines is often enough, and it is the lowest lock-in option.
On this page 23
- TL;DR
- Pick by situation
- Comparison table
- The frameworks, briefly
- Vercel AI SDK
- Mastra
- OpenAI Agents SDK
- Pydantic AI
- LangGraph
- Claude Agent SDK
- The rest of the field
- A minimal sketch
- When you do not need a framework
- Migration and lock-in risks
- What this guide does not cover
- Frequently asked questions
- What is the best AI agent framework for a solo developer?
- Are AI agent frameworks free?
- Do I need LangGraph to build an agent?
- Can I switch models without changing frameworks?
- Which agent framework supports MCP?
- Ship the agent, then launch it
- Sources
Verdict: If you are shipping one agent feature inside a TypeScript or Next.js SaaS, use the Vercel AI SDK. If your backend is Python, use Pydantic AI. Move up to LangGraph or Mastra only when the agent has to pause for a human, run for minutes or hours, and survive a restart, and pick the Claude Agent SDK when the agent's real job is to read files, edit them and run commands.
Every licence, version and price below was checked on the vendor's own page, GitHub LICENSE file or package registry on 13 Nov 2026. The opinions in between are ours and are marked as such.
TL;DR#
- TypeScript app: Vercel AI SDK (
ai7.0.172, Apache-2.0).ToolLoopAgentfor in-request agents,WorkflowAgentfrom@ai-sdk/workflowwhen you need durable steps (AI SDK WorkflowAgent). - Python backend: Pydantic AI (2.68.0, MIT), with nine documented durable execution engines when you need them.
- Multi-step, human-in-the-loop, long-running: LangGraph (Python 1.2.21, JS 1.7.4, MIT) or Mastra (
@mastra/core1.83.0, Apache-2.0 outsideee/). - Agents that work on files and shells: Claude Agent SDK, which bundles a Claude Code binary (Anthropic quickstart).
- One request, three tools: a plain tool loop. No framework, no lock-in.
Disclosure: ZeroRaised is a launch site for bootstrapped products. We have no commercial relationship with any vendor in this post and earn nothing if you use one. Facts come from the linked sources as checked on 13 Nov 2026.
Pick by situation#
This is our editorial advice for an indie developer adding one agent feature (a support agent, a "do this for me" button, a research assistant) to an existing product.
| Your situation | Our pick | Why |
|---|---|---|
| Next.js or Node app, agent finishes inside one request | Vercel AI SDK ToolLoopAgent | Same library you may already use for chat and streaming; model-agnostic |
| TypeScript, agent must survive restarts or wait for approval | AI SDK WorkflowAgent, or Mastra | Durable steps and persisted approvals without leaving TypeScript |
| Python backend (FastAPI, Django) | Pydantic AI | Typed, MIT, many providers, durability is an add-on not a rewrite |
| Several agents passing work between them | OpenAI Agents SDK, LangGraph or Mastra | Handoffs (OpenAI) or explicit graphs and workflows (LangGraph, Mastra) |
| Long-running, branching workflows with checkpoints | LangGraph | Checkpointers persist state per thread so runs resume |
| Agent edits files, runs commands, works in a repo | Claude Agent SDK | Built-in file, shell and search tools plus permissions and hooks |
| .NET shop | Microsoft Agent Framework | First-class C#/.NET and Python |
| Already deep in Google Cloud | Google ADK | Python, TypeScript, Go, Java and Kotlin; one-command deploy to Google Cloud |
| Simple feature, under five tools, one request | No framework | Fewest moving parts, easiest to debug |
Comparison table#
Versions are from PyPI and npm on 13 Nov 2026. Licences are from each project's GitHub LICENSE file or package metadata.
| Framework | Language | Latest version | Licence | Model lock-in | Durable execution / human-in-the-loop | MCP | Hosted option and entry price |
|---|---|---|---|---|---|---|---|
| Vercel AI SDK | TypeScript | ai 7.0.172 | Apache-2.0 | Low (many providers) | WorkflowAgent with durable steps; tool approvals | Yes (@ai-sdk/mcp) | None required |
| Mastra | TypeScript | @mastra/core 1.83.0 | Apache-2.0, except ee/ folders | Low (provider/model strings) | Workflow suspend/resume, human-in-the-loop, durable agents | Yes, client and server | Mastra Platform: Free, Starter $25/mo, Team $250/mo |
| OpenAI Agents SDK | Python, TypeScript | Python 0.24.0, JS 0.22.0 | MIT | Medium (OpenAI-first, other providers supported) | Human-in-the-loop documented; sessions | Yes | None required |
| Pydantic AI | Python | 2.68.0 | MIT | Low | Nine durable engines (Temporal, DBOS, Prefect, Restate and more); deferred tools for approval | Yes | None required |
| LangGraph | Python, TypeScript | 1.2.21 / JS 1.7.4 | MIT | Low | Checkpointers; human-in-the-loop | Not verified for this post | LangSmith: Developer $0, Plus $39/seat |
| Claude Agent SDK | Python, TypeScript | Python 0.2.181, TS 0.3.323 | Python repo MIT; use governed by Anthropic Commercial Terms | High (Claude only, via Anthropic, Bedrock, Google Cloud or Foundry) | Sessions (resume, fork); permissions and hooks for approval | Yes | Separate product: Managed Agents |
| CrewAI | Python | 1.15.41 | MIT | Low | Not verified for this post | Not verified for this post | AMP: Basic free (50 workflow executions/mo), Enterprise custom |
| Google ADK | Python, TS, Go, Java, Kotlin | Python 2.14.1 | Apache-2.0 | Low (Gemini built in, adapters for others) | Not verified for this post | Yes (docs section) | Deploy to Google Cloud (pricing not covered) |
| Microsoft Agent Framework | Python, .NET | Python 1.26.0 | MIT | Low | Checkpointing, human-in-the-loop, time-travel | Not verified for this post | None required |
| smolagents | Python | 1.26.0 (May 2026) | Apache-2.0 | Low | Not its focus | Yes (tools from MCP servers) | None required |
Sources: PyPI and npm package pages, GitHub LICENSE files linked in Sources, Mastra pricing, LangChain pricing, CrewAI pricing.
A note on the Claude Agent SDK licence: the Python repository's LICENSE file is MIT, but Anthropic's docs say use of the SDK "is governed by Anthropic's Commercial Terms of Service", including when it powers products for your own customers (Agent SDK overview). The TypeScript package on npm lists its licence as "SEE LICENSE IN README.md". Our read: fine for most SaaS use, but it is not the same as a plain open source dependency.
The frameworks, briefly#
Vercel AI SDK#
The AI SDK defines agents as "large language models (LLMs) that use tools in a loop to accomplish tasks", and its ToolLoopAgent class handles the loop, context and stopping (AI SDK agents). The default agent runs in memory; the docs are blunt that "if the process crashes, all progress is lost." For that case, WorkflowAgent from @ai-sdk/workflow runs the loop inside a workflow so tool executions become durable steps, retries default to 3 attempts, and an approval request can be answered hours later and the agent resumes (WorkflowAgent). It needs the Workflow DevKit (workflow@5) runtime.
Our read: the best default for a Next.js SaaS. You probably already depend on ai for streaming chat, so the agent feature costs you no new framework.
Mastra#
Mastra is a TypeScript framework whose docs list agents with tools, memory and "human-in-the-loop approvals", workflows with "branching, snapshots, suspend and resume, and scheduled runs", and MCP in both directions: connecting agents to MCP servers and exposing Mastra tools to MCP clients (Mastra docs index). Its LICENSE is Apache-2.0 except for content under ee/ directories, which has its own licence (Mastra LICENSE).
The optional Mastra Platform has a Free plan at $0, Starter at $25 per month (360 GB-hours of memory, 100 vCPU-hours, 1 Small project) and Team at $250 per month, with usage overage such as $0.25 per vCPU-hour (Mastra pricing).
Our read: pick Mastra over the bare AI SDK when you want workflows, memory and the Studio UI in one box and are happy to adopt its structure.
OpenAI Agents SDK#
The Python SDK's core primitives are agents, agents-as-tools and handoffs, and guardrails, with sessions, built-in tracing, MCP server tool calling and "built-in mechanisms for involving humans during agent runs" (OpenAI Agents SDK). The docs say you can "Use OpenAI models, websocket transport, or non-OpenAI providers", and there is a TypeScript version with MCP, human-in-the-loop and voice agent guides (Agents SDK JS).
Our read: very little code to get a multi-agent handoff working. If you are already on OpenAI models it is the shortest path, but its defaults (tracing, hosted tools) pull you toward OpenAI's platform.
Pydantic AI#
Pydantic AI is MIT-licensed and comes from the team behind Pydantic. Its durable execution docs say it "supports nine durable execution engines, plus a builder for any other engine", including Temporal, DBOS, Prefect and Restate (Pydantic AI durable execution). Its deferred tools feature adds human-in-the-loop tool approval and resumes the run with the results, and an MCP capability connects agents to local or remote MCP servers (Pydantic AI docs index).
Our read: the best Python default. You can start with a plain agent and add durability later by wrapping it, rather than rewriting into a graph.
LangGraph#
LangGraph models agents as graphs with explicit state. Durability comes from checkpointers, which "persist a thread's graph state as checkpoints"; the docs warn that the in-memory saver loses everything on restart and point to PostgresSaver for production (LangGraph durable execution).
Hosting is optional. LangSmith Developer is $0 for 1 seat with 5k base traces a month; Plus is $39 per seat with 10k base traces and access to Agent Server. Agent Server usage is metered, for example $0.0675 per vCPU-hour of runtime compute (LangChain pricing).
Our read: the most control and the most concepts to learn. Worth it when your agent is really a workflow with branches, retries and approval gates.
Claude Agent SDK#
Anthropic describes it as giving you "the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript", with built-in tools to read, write and edit files, run commands and search the web, plus hooks, subagents, MCP, permissions and sessions (Agent SDK overview). Both SDKs bundle a native Claude Code binary, authenticate with an API key, and can also run through Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform or Microsoft Foundry (quickstart). Anthropic says third-party developers may not offer claude.ai login or rate limits in their products unless previously approved.
Our read: excellent when the agent operates on a workspace (code, documents, a sandbox). Overkill for "answer the customer's billing question using three API calls", and it locks you to Claude.
The rest of the field#
- CrewAI (MIT): a Python framework for multi-agent "crews". Its hosted AMP has a free Basic plan with 50 workflow executions per month and a custom-priced Enterprise plan (CrewAI pricing).
- Google ADK (Apache-2.0): supports Python, TypeScript, Go, Java and Kotlin, "can work with almost any generative AI model", and deploys to Google Cloud or anywhere you can run a container (ADK).
- Microsoft Agent Framework (MIT): "an open, multi-language framework for building production-grade AI agents and multi-agent workflows in .NET and Python", with checkpointing, human-in-the-loop and time-travel. Its README links migration guides from Semantic Kernel and AutoGen (GitHub).
- smolagents (Apache-2.0): Hugging Face's small library whose agent logic "fits in ~thousand lines of code". Its
CodeAgentwrites actions as Python code, with sandboxed execution via Modal, Blaxel, E2B or Docker (smolagents). Its latest PyPI release was 1.26.0 in May 2026, so it moves slower than the others.
A minimal sketch#
Illustrative only. This is trimmed from the AI SDK's own agents example (one tool instead of two); the model string is the one the docs use, and you would swap in your own tool and model (AI SDK agents).
import { ToolLoopAgent, tool } from 'ai';
import { z } from 'zod';
const weatherAgent = new ToolLoopAgent({
model: "anthropic/claude-sonnet-5.5",
tools: {
weather: tool({
description: 'Get the weather in a location (in Fahrenheit)',
inputSchema: z.object({
location: z.string().describe('The location to get the weather for'),
}),
execute: async ({ location }) => ({ location, temperature: 72 }),
}),
},
});
const result = await weatherAgent.generate({
prompt: 'What is the weather in San Francisco?',
});
console.log(result.text);
The Python equivalent in the OpenAI Agents SDK's hello world is three lines: create an Agent(name=..., instructions=...) and call Runner.run_sync(agent, "...") (OpenAI Agents SDK).
When you do not need a framework#
An "agent" is a loop: send messages and tool definitions to the model, run any tools it asks for, append the results, and repeat until it stops asking or you hit a step limit. Every major model API supports tool calling directly, and Anthropic's own docs point out that with the plain client SDK "You write the tool loop yourself, or let the client SDK's beta tool runner drive it" (Agent SDK overview).
Our read: skip the framework when all of these are true:
- The feature finishes inside one HTTP request or one background job.
- It uses fewer than about five tools you wrote yourself.
- You use one model provider and do not plan to switch soon.
- Nothing needs to pause for a person and resume later.
In that case a loop of roughly 30 lines, a hard step cap, and a timeout is easier to debug than any abstraction. Add a framework the day you need durable state, multi-agent handoffs, or provider switching. If you are still deciding which model to call, start with our guide on how to choose an LLM API.
Migration and lock-in risks#
- Release pace. On the day we checked, Pydantic AI, LangGraph, CrewAI, Google ADK, Microsoft Agent Framework and the Claude Agent SDK had all published to PyPI within the previous two days. Fast-moving APIs mean breaking changes; pin versions and read changelogs before upgrading.
- Model lock-in. The Claude Agent SDK runs Claude only. The OpenAI Agents SDK supports other providers, but its hosted tools and tracing assume OpenAI. The AI SDK, Mastra, Pydantic AI and LangGraph make switching models mostly a config change.
- State lock-in. Durable state lives in the framework's format (LangGraph checkpoints, Workflow DevKit steps, Temporal histories). Moving frameworks later means migrating or abandoning in-flight runs.
- Platform lock-in. LangSmith, Mastra Platform and CrewAI AMP are optional. Our read: run on your own infrastructure first and pay for hosting only when operating it costs you more than the bill.
- Licence fine print. Mastra's
ee/directories and the Claude Agent SDK's Commercial Terms are the two places where "open source" needs a second read. - Keep tools framework-free. Write tool logic as plain functions with typed inputs, and wrap them in each framework's tool helper. That is most of your code, and it ports cleanly.
What this guide does not cover#
Three jobs sit next to the framework and are worth deciding separately. For tracing and cost tracking, see our LLM observability tools roundup. For approval gates on risky actions such as refunds or emails, see how to add human approval to AI agents. For running agent-written code or shell commands safely, see how to sandbox an AI agent.
Frequently asked questions#
What is the best AI agent framework for a solo developer?#
It depends on your stack. For a TypeScript or Next.js app, the Vercel AI SDK is the lightest choice. For a Python backend, Pydantic AI. For long-running agents that must pause for human approval and survive restarts, LangGraph or Mastra. For agents that edit files and run shell commands, the Claude Agent SDK. For a simple one-request feature, you may not need a framework at all.
Are AI agent frameworks free?#
The libraries themselves are open source and free: Vercel AI SDK and Google ADK are Apache-2.0, Pydantic AI, LangGraph, OpenAI Agents SDK, CrewAI and Microsoft Agent Framework are MIT, and Mastra is Apache-2.0 outside its ee/ folders. The Claude Agent SDK is governed by Anthropic's Commercial Terms. You pay for model API usage and for any optional hosted platform, such as LangSmith Plus at $39 per seat or Mastra Starter at $25 per month.
Do I need LangGraph to build an agent?#
No. LangGraph earns its complexity when you need a graph of steps with checkpoints, so a run can stop, wait for a person and resume, or recover after a crash. For a single agent that calls a few tools inside one request, the Vercel AI SDK, Pydantic AI, the OpenAI Agents SDK or a plain tool loop is simpler.
Can I switch models without changing frameworks?#
With most of them, yes. The Vercel AI SDK, Mastra, Pydantic AI, LangGraph, Google ADK and smolagents are built to work across providers, and the OpenAI Agents SDK docs list support for non-OpenAI providers. The Claude Agent SDK is the exception: it runs Claude, although it can reach Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry.
Which agent framework supports MCP?#
MCP support is now common. The official docs for the OpenAI Agents SDK, Claude Agent SDK, Mastra, Pydantic AI, smolagents and Google ADK all document connecting agents to MCP servers, and the AI SDK documents MCP helpers. Check the specific transport you need (stdio or remote HTTP) in the docs before you commit.
Ship the agent, then launch it#
Once your agent feature works, run through our product launch checklist for bootstrapped makers, then launch it on ZeroRaised for free. For more guides on building without investors, join the ZeroRaised newsletter.
Sources#
All last checked 13 Nov 2026.
- AI SDK: Agents overview
- AI SDK: WorkflowAgent
- Vercel AI SDK LICENSE and npm: ai
- Mastra docs index, Mastra pricing, Mastra LICENSE, npm: @mastra/core
- OpenAI Agents SDK (Python), OpenAI Agents SDK (TypeScript), PyPI: openai-agents, npm: @openai/agents
- Pydantic AI durable execution, Pydantic AI docs index, Pydantic AI LICENSE, PyPI: pydantic-ai
- LangGraph durable execution, LangChain pricing, PyPI: langgraph, npm: @langchain/langgraph
- Claude Agent SDK overview, Claude Agent SDK quickstart, claude-agent-sdk-python LICENSE, PyPI: claude-agent-sdk, npm: @anthropic-ai/claude-agent-sdk
- CrewAI pricing, CrewAI LICENSE, PyPI: crewai
- Google ADK, ADK Python LICENSE, PyPI: google-adk
- Microsoft Agent Framework on GitHub, PyPI: agent-framework
- smolagents docs, smolagents on GitHub, PyPI: smolagents
Frequently asked questions
What is the best AI agent framework for a solo developer?
It depends on your stack. For a TypeScript or Next.js app, the Vercel AI SDK is the lightest choice. For a Python backend, Pydantic AI. For long-running agents that must pause for human approval and survive restarts, LangGraph or Mastra. For agents that edit files and run shell commands, the Claude Agent SDK. For a simple one-request feature, you may not need a framework at all.
Are AI agent frameworks free?
The libraries themselves are open source and free: Vercel AI SDK and Google ADK are Apache-2.0, Pydantic AI, LangGraph, OpenAI Agents SDK, CrewAI and Microsoft Agent Framework are MIT, and Mastra is Apache-2.0 outside its ee/ folders. The Claude Agent SDK is governed by Anthropic's Commercial Terms. You pay for model API usage and for any optional hosted platform, such as LangSmith Plus at $39 per seat or Mastra Starter at $25 per month.
Do I need LangGraph to build an agent?
No. LangGraph earns its complexity when you need a graph of steps with checkpoints, so a run can stop, wait for a person and resume, or recover after a crash. For a single agent that calls a few tools inside one request, the Vercel AI SDK, Pydantic AI, the OpenAI Agents SDK or a plain tool loop is simpler.
Can I switch models without changing frameworks?
With most of them, yes. The Vercel AI SDK, Mastra, Pydantic AI, LangGraph, Google ADK and smolagents are built to work across providers, and the OpenAI Agents SDK docs list support for non-OpenAI providers. The Claude Agent SDK is the exception: it runs Claude, although it can reach Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry.
Which agent framework supports MCP?
MCP support is now common. The official docs for the OpenAI Agents SDK, Claude Agent SDK, Mastra, Pydantic AI, smolagents and Google ADK all document connecting agents to MCP servers, and the AI SDK documents MCP helpers. Check the specific transport you need (stdio or remote HTTP) in the docs before you commit.