Agent frameworks
LangChain
The most widely used orchestration library, with LangGraph for explicit stateful agent graphs.
- Category
- Agent frameworks
- Pricing
- Open source
- Runs
- Hosted or self-hosted
- Languages
- Python, TypeScript
- Interface
- Library
- Source
- Open source
What LangChain is
LangChain is the most widely adopted library in this category, with integrations for effectively every provider, store, and tool you are likely to reach for. LangGraph, its graph-based companion, is the part most teams now build agents on: you define nodes and edges explicitly, which makes control flow and state visible rather than implied.
Best for
Projects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph.
Consider something else if
Its surface area is large and has changed substantially over time; older tutorials often describe patterns no longer recommended.
LangChain alternatives
The closest options in agent frameworks, on the axes that actually separate them.
| Tool | Best for | Pricing | Runs |
|---|---|---|---|
| LangChainopen source | Projects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph. | Open source | Hosted or self-hosted |
| LlamaIndexopen source | Retrieval-heavy applications where document ingestion and indexing are the hard part. | Open source | Hosted or self-hosted |
| Pydantic AIopen source | Python teams already using Pydantic who want type safety and a framework small enough to hold in your head. | Open source | Self-hosted |
| Mastraopen source | TypeScript and Node teams who want a framework designed for their stack instead of a translated one. | Open source | Hosted or self-hosted |
| Claude Agent SDKopen source | Filesystem- and shell-shaped agents where the built-in tool set is most of what you need. | Open source | Self-hosted |
| DSPyopen source | Tasks with a measurable metric and enough examples to optimise against, where hand-tuned prompts keep drifting. | Open source | Self-hosted |
Choosing within agent frameworks
Language, honestly
Most of this category is Python-first. If your service is TypeScript, the shortlist is genuinely shorter, and a thin layer over the provider SDK is often better than a half-maintained port.
How much it hides
Some frameworks give you primitives you compose; others give you an agent you configure. The second is faster to a demo and harder to debug at depth. Match this to how much novel behaviour you expect to need.
Questions
What is LangChain?
LangChain is the most widely adopted library in this category, with integrations for effectively every provider, store, and tool you are likely to reach for. LangGraph, its graph-based companion, is the part most teams now build agents on: you define nodes and edges explicitly, which makes control flow and state visible rather than implied. It is open source and hosted or self-hosted.
What are the alternatives to LangChain?
The closest alternatives are LlamaIndex, Pydantic AI, Mastra, Claude Agent SDK, DSPy. They sit in the same category — agent frameworks — and differ mainly on hosting model, pricing shape, and how much they abstract away.
Is LangChain the right choice?
Projects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph. The main caveat: Its surface area is large and has changed substantially over time; older tutorials often describe patterns no longer recommended.
Whatever you build on, the model is the line item that scales. See what each one costs per million tokens, or price your own workload.