// category · 18 tools · 18 open source
AI Agent Frameworks
Libraries for composing models, tools, memory and control flow into agents. Pick on language, abstraction level, observability and how much control you need over the loop.
An AI agent framework is the code library that runs the loop at the heart of every agent: send the conversation to a model, run any tool the model asks for, feed the result back and repeat until the task is done or a limit is hit. The frameworks listed here differ in how much of that loop they hide, how they keep state between steps, and which language you write in.
Python has the widest choice. LangGraph models an agent as a graph of nodes with checkpoints, which suits long tasks that need branches, retries and human approval. CrewAI organizes work as a crew of role based agents. Pydantic AI validates every output against a typed model, smolagents lets the model write Python to call tools, and the OpenAI Agents SDK keeps the primitives small: agents, tools, handoffs and guardrails. DSPy is a different kind of tool: it tunes the prompts inside a pipeline against a metric. Our best AI agent framework for Python guide compares the main options with code.
TypeScript teams usually choose between Mastra, a full framework with workflows, memory and a local studio, and the Vercel AI SDK, a lighter library whose version 7 adds tool approvals and durable agents. See the best TypeScript agent frameworks roundup and our Vercel AI SDK guide.
When you compare frameworks, check four things. First, state: can a run survive a crash or wait hours for an approval? Second, tools: does it speak the Model Context Protocol, so one tool server works everywhere? Third, observability: can you see every model call and tool call in a trace? Fourth, lock in: can you swap model providers without rewriting your agent? Most frameworks listed here are open source and free; you pay for the models they call and for any hosted platform the vendor sells on top, such as hosted deployment and enterprise plans. Most agents built with these frameworks also need a web search tool; Tavily vs Exa vs Firecrawl compares the three APIs we see most.
For the difference between a framework and the runtime around it, read what an agent harness is, and for a head to head on the three most popular Python options, see LangGraph vs CrewAI vs OpenAI Agents SDK. Official references: the LangGraph overview and the AI SDK agents docs.
// guides
Guides to AI agent frameworks
What Is the Most Popular AI Agent Framework?
What is the most popular AI agent framework in 2026? LangChain leads developer surveys, PyPI downloads and GitHub stars. Here are the numbers and what they hide.
Best AI Agent Framework for Python (2026)
Find the best AI agent framework for Python in 2026. LangGraph, CrewAI, Agno, smolagents, and Pydantic AI compared, with clear picks by use case and tradeoffs.
Vercel AI SDK vs Claude Agent SDK: Key Differences
Vercel AI SDK vs Claude Agent SDK compared on models, languages, built in tools, UI streaming, licenses and when HarnessAgent makes them work together.
LangGraph vs CrewAI vs OpenAI Agents SDK (2026)
LangGraph vs CrewAI vs OpenAI Agents SDK compared on control flow, state, human in the loop, model support and learning curve, plus what replaced AutoGen.
Best TypeScript AI Agent Frameworks (2026)
The best TypeScript agent framework for your project: Mastra, Vercel AI SDK, LangGraph.js, OpenAI Agents SDK and Google ADK compared, with code and tradeoffs.
Single Agent vs Multi Agent in AI: When to Split
Single agent vs multi agent in AI explained: what each design is, when a second agent pays off, what it costs in calls and tokens, and how to choose with a test.
Semantic Kernel vs Agent Framework Compared
Semantic Kernel vs Agent Framework as Microsoft's migration path: what changed in 1.0, when to stay on SK 1.x, and how to migrate tools, agents and sessions.
LangChain vs CrewAI: Which Should You Use?
LangChain vs CrewAI compared with tested code: one agent loop with middleware vs a crew of role based agents. Models, MCP, pricing and using both together.
Vercel AI SDK Guide: Build an Agent With AI SDK 7
The Vercel AI SDK is a free, open source TypeScript toolkit for LLM apps and agents. AI SDK 7 changes, a tested ToolLoopAgent, streaming UI, MCP and costs.
MCP Server vs API: What's the Difference?
An MCP server is an agent facing interface; a REST API is built for developer code. Learn the differences, when to use each, and how they work together.
VoltAgent vs LangGraph: Which Should You Use?
VoltAgent vs LangGraph compared on language, orchestration, durable state, MCP, observability and pricing, with the same refund task tested in both stacks.
Semantic Kernel vs LangChain: Which to Pick Now
Semantic Kernel vs LangChain in late 2026, compared on languages, agents, tools, support status and the move to Microsoft Agent Framework, with a tested example.
Is LangChain Free for Commercial Use?
Is LangChain free for commercial use? Yes. LangChain and LangGraph are MIT licensed. Here is what that allows, where costs start, and the one server that isn't MIT.
LangChain vs LangGraph: Which Should You Use?
LangChain vs LangGraph, compared with tested code. Start with LangChain's create_agent, then use LangGraph when you need explicit steps and durable state.
How to Build an AI Agent from Scratch in Python
How to build an AI agent from scratch in Python: a tool loop, safe file tools, approvals, a step cap and memory in about 125 lines, on OpenAI or Ollama.
What Is an Agent Harness? (2026 Guide)
An agent harness wraps an LLM with tools, memory, sandboxes, and guardrails. How it differs from a framework, plus Claude, LangChain, and Docker examples.
MCP vs A2A: Which Agent Protocol Do You Need?
MCP connects an agent to tools and data; A2A connects agents to other agents. Learn when to use each, how they fit together, and what changed in 2026.
How to Use DSPy: Signatures, Modules, Optimizers
How to use DSPy in 2026: install it, connect a model or Ollama, write a signature, add tools with ReAct, score it with a metric and let an optimizer tune it.
How to Use a Vector DB for Agent Memory
How to use a vector DB for agent memory: what to store, how to scope it per user, dedupe on write, rank by relevance and recency, and delete on request.
VoltAgent vs n8n: Code Agents or Visual Workflows?
VoltAgent vs n8n compared on how you build, integrations, human approval, paused runs, licenses and pricing, plus a tested way to use both together.
How to Use Tavily in LangChain: Step by Step
How to use Tavily in LangChain: install langchain-tavily, set your API key, add TavilySearch to create_agent, pin costly settings and handle errors the agent sees.
Get Started with Agent Development Kit (ADK)
Get started with Agent Development Kit (ADK) in Python: install google-adk, scaffold an agent with adk create, add a tool, test it locally and deploy to Cloud Run.
How to Build a RAG Pipeline with LangGraph
How to build a RAG pipeline with LangGraph: index your docs, wire retrieve and generate nodes, add a grading loop with a retry cap, then turn it into an agent.
AI Agents for Small Business: 8 Real Setups
AI agents for small business, made practical: 8 setups for shops, salons, restaurants, trades and freelancers, with the tools, steps and guardrails for each.