langchain vs llama_index: agent orchestration versus document retrieval
LangChain and LlamaIndex are overlapping Python frameworks with different centers of gravity: LangChain standardizes how agents talk to models, tools and retrievers, while LlamaIndex concentrates on getting private documents into a model through data connectors, indices and query engines. They compete on agent and RAG code, yet they can also be combined, since LlamaIndex's README names LangChain as one of the outer frameworks it integrates with.
At a glance
| Project | langchain-ai/langchain | run-llama/llama_index |
|---|---|---|
| Licence | MITPermissive: commercial use allowed | MITPermissive: commercial use allowed |
| Maintenance | Commits in the last six monthsLast push September 25, 2026 | Commits in the last six monthsLast push September 27, 2026 |
| Language | Python | Python |
| GitHub stars | 147,049 | 52,330 |
| Read more | Our analysisGitHub | Our analysisGitHub |
Which one to choose
Choose langchain if you build multi-step agents that must call several model providers, tools or vector stores behind one interface, or if you want the LangGraph, Deep Agents and LangSmith ecosystem around the framework.
Choose llama_index if your application is centered on private data: ingesting documents and APIs, indexing them, and querying them with retrieval, including the LlamaParse platform for parsing and extraction.
Overlapping frameworks, different centers of gravity
LangChain and LlamaIndex both sit in the same neighborhood: open-source Python frameworks for building LLM applications, both MIT licensed, both with their last push on September 11, 2026. The difference is where each project puts its weight. LangChain calls itself the agent engineering platform and its README describes a common interface for models, embeddings, vector stores and tools, with higher-level pieces such as LangGraph for agent workflows and Deep Agents for agents with planning and subagent capabilities. LlamaIndex describes itself as a data framework, built around data connectors for APIs, PDFs, docs and SQL, ways to structure data into indices and graphs, and an advanced retrieval and query interface. An agent-heavy application and a document-heavy application will each find one of them more natural, which is why the frameworks coexist rather than one absorbing the other.
What each framework is built around
LangChain's unit is the interface. The README quickstart shows a chat model initialized by provider string and name, for example init_chat_model with an OpenAI model, and the value proposition is that components are interchangeable, so a caller can swap models and providers as the team experiments. The framework composes models, tools, retrievers and vector stores into chains, and lower-level orchestration lives in LangGraph when the control flow needs to be explicit. LlamaIndex's unit is the document pipeline. Its README walks through data connectors, indices and graphs, query engines and retrieval interfaces, and the library is split into a core package plus integration packages, with over 300 integrations available on LlamaHub. The two import conventions make the split visible: imports with core, such as from llama_index.core.llms import LLM, use the core package, while imports such as from llama_index.llms.openai import OpenAI load a specific integration.
Getting each one running
Setup differs in packaging philosophy. LangChain installs as one framework, uv add langchain, and the quickstart needs only a model initializer to start invoking. LlamaIndex offers two install modes: the llama-index starter package, which bundles core plus a selection of integrations, or llama-index-core plus the specific LlamaHub integration packages your application needs. The starter path is faster to first code; the core-only path keeps the dependency tree smaller and explicit. This packaging difference matters at maintenance time. With LangChain you mostly watch the framework release, the 1.x line being in motion with alpha releases as of August 2026. With LlamaIndex you also track which integration packages you pulled in, because each one is a separate package with its own release cycle, and the adoption analysis for the project flags that each integration may carry its own license and dependencies, so the license of the core package does not cover everything you install.
The ecosystem around each framework
Both projects lean on a wider product family. LangChain's README points to LangGraph as the low-level agent orchestration framework, Deep Agents as a higher-level package for planning, subagents and file system use, LangSmith for evaluation, observability and debugging, LangSmith Deployment for running long-lived stateful workflows, and LangChain.js for a TypeScript equivalent. LlamaIndex's README centers on LlamaParse, a document agent platform whose parts include Parse for agentic OCR and parsing in 130-plus formats, Extract for structured data extraction, Index for ingest and RAG pipelines, Split for subdividing large documents, and Agents for building document agents with workflows. Note the asymmetry: LangChain's README advertises its products as the path for production features like monitoring and evaluation, while LlamaIndex's products focus on the parsing and extraction side of documents. The mainline open-source framework remains usable without these products in both cases.
Where documentation and maintenance need care
Maintenance signals differ in one telling way. LlamaIndex's README carries an explicit warning that it is not updated as frequently as the documentation, and tells readers to check the documentation for the latest updates, so the README should not be treated as the source of truth for current features. LangChain's README does not carry such a warning, but its release history does its own talking: the 1.x line was publishing alpha releases in August 2026, and the adoption analysis for the project advises verifying that the specific integrations you need are maintained in the current release and checking the upgrade path from your existing version. Both projects ask you to verify integration health before relying on an integration in production, just through different mechanisms: LlamaIndex through package-level choices on LlamaHub, LangChain through the current release and its alpha cadence.
Where each falls short
LangChain's cost is weight. If your application needs a single fixed provider and you want minimal dependencies, the framework's abstraction layer adds surface you will not use, and the adoption analysis says as much: teams that prefer to hand-roll orchestration should skip it. The fast-moving 1.x line with alpha releases is a second risk, because upgrades can demand attention. LlamaIndex's cost is scatter. The adoption analysis notes it is not the right fit if you need a minimal single-purpose library, and the integration-based architecture means your dependency footprint is spread across many packages whose individual maintenance you must track. There is also an accuracy risk on the README itself, since the project warns it lags the documentation. Neither framework is wrong for its core use case; each one simply puts a different burden on the team adopting it, one in abstraction weight and the other in package sprawl.
Licence, maintenance and the choice
Both repositories are healthy and both were pushed on September 11, 2026, so neither project is at risk on maintenance grounds. Both cores are MIT licensed. For concrete situations: pick LangChain when the application is an agent, meaning multiple steps, tool calls and model fallbacks behind one interface, especially if you plan to swap providers, and verify that the model, tool and retriever integrations you need are healthy in the current release before committing. Pick LlamaIndex when the application is a document product, meaning ingest, indexing and retrieval over your own data, and verify on LlamaHub which integration packages you need, check whether the starter package's bundled integrations match your LLM and vector store, and treat the documentation as current rather than the README. If both descriptions fit, the frameworks can be layered: LlamaIndex's README explicitly lists LangChain as an outer framework it integrates with, so a document-heavy RAG pipeline can feed an agent built on LangChain.
Bottom line
Choose LangChain when you are engineering agents that must switch between model providers, tools and retrievers, and choose LlamaIndex when your application is about ingesting and querying private documents. Verify first: for LangChain, that the integrations you depend on are healthy in the current 1.x release; for LlamaIndex, that your needed LlamaHub packages match your LLM and vector store, and that you are reading the documentation rather than the README, which the project itself warns lags behind.