Frameworks · Guide
AI Agent Frameworks: LangChain, LangGraph, CrewAI and More
Pick the right scaffolding — LangChain, LangGraph, CrewAI, AutoGen, LlamaIndex, OpenAI Agents SDK.
Agent frameworks give you the scaffolding — tool calling, state management, and orchestration — so you don't rebuild the agent loop by hand. This guide compares LangChain, LangGraph, CrewAI, AutoGen, LlamaIndex, the OpenAI Agents SDK, and Claude tool use, and helps you choose the right one for your project.
Generate your own lesson →What you'll learn
- AutoGen/AG2 and Multi-agent Patterns
- Claude Tool Use and Agent Patterns
- Google ADK and Gemini Tool Calling
- Semantic Kernel Overview
- LangChain for Agent Apps
- LlamaIndex Agents and Workflows
- OpenAI Agents SDK
- LangChain vs LangGraph: Which to Use When
- Choosing an Agent Framework
- LangGraph in Depth
- CrewAI and Role-based Agents
Lessons in this guide (11)
AutoGen/AG2 and Multi-agent Patterns
Understand conversation-based multi-agent orchestration and its risks.
Claude Tool Use and Agent Patterns
Design Claude tool loops with schemas, observations, and approvals.
Google ADK and Gemini Tool Calling
Use Gemini function calling and ADK-style orchestration patterns.
Semantic Kernel Overview
Understand planners, functions, and enterprise orchestration in Semantic Kernel.
LangChain for Agent Apps
Use LangChain components without hiding your product logic.
LlamaIndex Agents and Workflows
Use LlamaIndex when data, retrieval, and agent workflows meet.
OpenAI Agents SDK
Build provider-native agents with tools, handoffs, guardrails, and tracing.
LangChain vs LangGraph: Which to Use When
LangChain is the right default for most LLM applications — chains, RAG, and simple agents — while LangGraph is the right choice when your control flow itself is the product: branching, resuming, interrupts, and explicit state transitions.
Choosing an Agent Framework
Pick a framework by state, tools, durability, deployment, and team fit.
LangGraph in Depth
Model agent workflows as state graphs with checkpoints and explicit control flow.
CrewAI and Role-based Agents
Evaluate role-based multi-agent workflows and their tradeoffs.
Frequently asked questions
LangChain vs LangGraph — what's the difference?
LangChain is a broad toolkit of components (models, prompts, tools, chains). LangGraph is its framework for building agents as an explicit, inspectable state graph you fully control — better when you need branching, loops, and durable state.
Which agent framework should I use?
For a simple tool-using loop, start with plain tool calling or LangChain. For complex, stateful, multi-step agents, use LangGraph. For role-based multi-agent teams, CrewAI or AutoGen. Match the framework to how much control and structure you need.
What is CrewAI?
CrewAI is a framework for orchestrating multiple role-based agents (e.g. researcher, writer, reviewer) that collaborate on a task, run sequentially or hierarchically.