LlamaIndex vs LangChain for retrieval and document agents
LlamaIndex is a data framework centred on ingesting, indexing and querying documents, now backed by a company whose stated focus is document parsing, while LangChain is a general agent layer that runs on LangGraph, so LlamaIndex fits document-heavy retrieval and LangChain fits broader tool-calling agents.
Checked
LlamaIndex and LangChain started in the same place: helping developers connect language models to their own data. They have since moved apart. LangChain reached 1.0 in October 2025 with an agent layer built on LangGraph. LlamaIndex is still on 0.x, and its README says the company's current focus is document parsing and extraction through LlamaParse, with the open-source framework still available.
For a team building retrieval or document agents, that split is useful. LlamaIndex brings connectors, indexes and query engines for documents. LangChain brings a broad agent layer, middleware and a lower-level runtime for long-running flows. Some teams use both: LlamaIndex for ingestion and retrieval, exposed as a tool to an agent built elsewhere.
What each is built around
LlamaIndex
An open-source framework to build agentic applications, with data connectors for APIs, PDFs and SQL, ways to structure data as indices and graphs, and a retrieval and query interface. The README counts over 300 integration packages, and document agents are built with Workflows.
LangChain
The high-level agent layer of the LangChain stack. create_agent runs on LangGraph, with middleware hooks for guardrails and approvals and a wide set of model and tool integrations.
Release activity and direction
LangChain ships weekly: Python 1.4.7 on 21 October 2026 and npm 1.6.0 on 28 October 2026. LlamaIndex's last Python framework release before this check was 0.14.25 on 21 September 2026, and its TypeScript package was last released on 2 December 2025.
LlamaIndex's ten most recent blog posts, dated 28 September to 29 October 2026, were about document parsing and extraction. A team picking LlamaIndex for a new TypeScript project should weigh that cadence.
Which fits which job
LlamaIndex fits
Ingestion-heavy retrieval over PDFs, contracts, reports and other messy documents, where parsing quality decides answer quality.
LangChain fits
Agents whose main job is calling tools and APIs, with retrieval as one tool among several, and teams that may later need LangGraph's persistence and approvals.
Both together
A LlamaIndex query engine wrapped as a retrieval tool for an agent built on LangChain, LangGraph or a model vendor's SDK.
How Motiontic approaches it
Retrieval quality is decided by parsing, chunking, hybrid search and reranking more than by the framework around them. Motiontic's engineers measure retrieval on the client's own documents and questions first, then pick the thinnest framework that supports the pipeline that passed.
Motiontic's engineers are framework-neutral. They choose per project after a short spike on the client's real task, keep prompts, tool definitions and evals outside the framework so a later switch is a refactor rather than a rewrite, and hand the eval suite to the client's team so the next framework decision can be measured.
LlamaIndex and LangChain, figures retrieved 30 October 2026
| LlamaIndex | LangChain | |
|---|---|---|
| Centre of gravity | Documents: connectors, indexes, query engines | Agents: create_agent, middleware, tool calling |
| Licence | MIT | MIT |
| Languages | Python; TypeScript package last released 2 Dec 2025 | Python, JavaScript / TypeScript |
| Version and maturity | 0.14.25 (21 Sep 2026), still 0.x | 1.4.7 (21 Oct 2026), 1.0 since 17 Oct 2025 |
| Company focus | Document parsing and extraction (LlamaParse) | Agent stack: LangChain, LangGraph, Deep Agents, LangSmith |
| Integrations | Over 300 integration packages | Broad model and tool integration surface |
| Google Agent Runtime support | Managed SDK template | Managed SDK template |
| GitHub stars | 52,745 | 148,719 (Python repo) |
| PyPI downloads, last week | 1.37M (llama-index-core) | 37.24M |
Common questions
Is LlamaIndex still maintained?
Yes. The open-source framework remains available and released 0.14.25 on 21 September 2026. Its README says the company's current focus is document parsing and extraction, and the TypeScript package has not been released since December 2025.
Is LlamaIndex or LangChain better suited to RAG?
LlamaIndex is built around ingestion, indexing and querying, which suits document-heavy RAG. LangChain treats retrieval as one tool in an agent. On either, answer quality depends more on parsing, chunking, hybrid search and reranking than on the framework.
Can LlamaIndex and LangChain be used together?
Yes. A common pattern wraps a LlamaIndex query engine as a retrieval tool and calls it from an agent built on LangChain or LangGraph.
What licence do LlamaIndex and LangChain use?
Both are MIT licensed.
Related
AI agent development
Agents that do real work for users, with the evals, traces and guardrails to keep them in production.
LangChain vs LangGraph
The agent layer and the runtime underneath it, compared after the 1.0 releases.
DSPy vs LangChain
Prompt and program optimisation compared with agent orchestration.
Retrieval-augmented generation (RAG)
Fetch the right passages at query time, then answer from them with citations.
Hybrid search
Keyword ranking and vector similarity, fused into one result list.
Running agents that have to hold up?
Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.