LangChain is an MIT-licensed open-source framework (Python/JS) for building LLM applications and agents via LangGraph; LangSmith adds optional hosted tracing, evaluation and deployment.
LlamaIndex is an MIT-licensed open-source framework (Python/TypeScript) for RAG pipelines and data agents on top of LLMs; LlamaCloud adds hosted document parsing and extraction.
Choose LangChain for general agent applications that call tools and need explicit control flow, and choose LlamaIndex when the core of the project is retrieval over your own documents. Both are MIT-licensed Python frameworks with JavaScript or TypeScript versions. LangChain pairs with LangGraph for stateful orchestration and LangSmith for tracing and evaluation. LlamaIndex is built around data connectors, indexes and query engines, but its README says the company now focuses on LlamaParse document parsing, which matters for long-term framework investment. The deciding factors are agent orchestration versus document retrieval, and how much you rely on each company's roadmap.
Choose LangChain if
Shortlist LangChain when you are building tool-calling agents or long-running, stateful workflows and want LangGraph for orchestration and LangSmith for tracing and evaluation.
Choose LlamaIndex if
Shortlist LlamaIndex when the project is mainly retrieval over your own documents and you want ready data connectors, indexes and query engines, possibly combined with LlamaParse.
Key differences
Key differences between LangChain vs LlamaIndex
Aspect
LangChain
LlamaIndex
Primary focus
A framework for building agents and LLM-powered applications through a standard interface for models, embeddings, vector stores and related components.
The original open-source toolkit for retrieval-augmented generation and agents, built for LLM-powered agents that work over your own data.
Orchestration layer
LangGraph is a separate low-level runtime for long-running, stateful agents, where workflows are graphs of shared state, nodes and edges.
LlamaIndex Workflows are event-driven, multi-step processes with branching, retries and human-in-the-loop review that can be deployed as services.
Licence and cost
The LangChain repository is released under the MIT License, copyright LangChain, Inc., and the framework is free to self-host.
The llama_index repository is also released under the MIT License, so the core framework is free to use and modify.
Integrations and packaging
Model providers are swappable behind a common interface, so teams can change models as they experiment without rebuilding the application.
Projects combine LlamaIndex core with chosen integration packages, and the README counts over 300 packages for LLM, embedding and vector store providers.
Commercial products
LangSmith is the company's paid platform for tracing, evaluation, prompts and deployment, with a free tier and pay-as-you-go usage.
LlamaParse is the company's paid platform for document parsing and extraction, with credit-based plans and a free allowance.
Company direction
The LangGraph docs present one stack: LangChain as the agent framework, LangGraph as the orchestration runtime and LangSmith as the platform for tracing and deployment.
The README says the company's primary focus has shifted to LlamaParse, while the open-source framework stays available as an open toolkit.
Abstraction levels
LangChain offers create_agent, a configurable agent harness, and points to LangGraph when you need explicit control over state and flow.
A high-level API goes from documents to answers in a few lines, and a lower-level API lets you customize or replace each part.
More specifications
From the iThub profiles. “Not recorded” means the profile does not confirm it. Confirm prices and editions with each vendor.
LangChain is an open-source framework, in Python and JavaScript, for building applications and agents on top of large language models. The README describes it as a framework for building agents and LLM-powered applications, with interoperable components and third-party integrations for chat and embedding models, tools, vector stores and retrievers. The framework is MIT-licensed and free to self-host. The company was incorporated in April 2023 (founded by Harrison Chase) and is headquartered in San Francisco.
The Python package installs with uv add langchain, and a JS and TypeScript equivalent, LangChain.js, is available. For more advanced customization the README points to LangGraph, its framework for controllable agent workflows, and to Deep Agents, a higher-level package for agents that plan, use subagents and work with file systems. Because models are swappable behind a common interface, a team can compare providers without rewriting application code.
LlamaIndex
LlamaIndex is an open-source framework, founded in 2023 by Jerry Liu and Simon Suo and headquartered in San Francisco, for building retrieval-augmented generation (RAG) pipelines and data agents on top of LLMs. The core library is MIT-licensed and available in Python and TypeScript, covering data ingestion, indexing, query engines and agent workflows. The README describes it as an open-source framework to build agentic applications.
In Python there are two ways to start. The llama-index package is a starter that includes core LlamaIndex and a selection of integrations, while llama-index-core lets you add only the integration packages you need. The README says there are over 300 integration packages for LLM, embedding and vector store providers. Data connectors ingest sources such as APIs, PDFs, docs and SQL, and the retrieval and query interfaces feed context to the model.
How to evaluate LangChain and LlamaIndex
LangChain and LlamaIndex are both MIT-licensed frameworks for building LLM applications in code, but they start from different problems. LangChain centres on agents and a standard interface to models and tools, with LangGraph for stateful orchestration. LlamaIndex centres on connecting LLMs to your own data through connectors, indexes and query engines, while its company now focuses on LlamaParse. Start by deciding whether agent control flow or document retrieval is the harder part of your project.
Write down the core workload, such as document question answering, tool-calling agents or multi-step workflows, plus the data sources, model providers and vector store you will use. Decide who maintains the code long term and which hosted add-ons, if any, you would pay for, then compare how much custom code each framework needs.
Criteria to verify
Retrieval quality on your own documents
Support for your model and vector store
Control over multi-step agent state
Tracing and evaluation options
Release cadence and maintenance activity
Lock-in to the vendor's paid platform
Proof-of-concept plan
Build the same small application twice: ingest one representative document set, answer a fixed list of 30 questions, and add one tool call. Use the same model and vector store in both. Compare answer accuracy, lines of custom code, ease of tracing failures and the effort to swap the model provider.
Advertisements
Frequently asked questions
What is the main difference between LangChain and LlamaIndex?
LangChain is a general framework for building agents and LLM-powered applications, with LangGraph for stateful orchestration. LlamaIndex started as a toolkit for retrieval-augmented generation and agents over your own data, with data connectors, indexes and query engines. In practice LangChain fits tool-calling agents and complex control flow, while LlamaIndex fits projects centred on indexing and querying documents.
Are LangChain and LlamaIndex open source?
Yes. Both frameworks are published under the MIT License on GitHub, so they are free to use, modify and self-host. Each company also sells a separate hosted product: LangChain sells LangSmith for tracing, evaluation and deployment, and LlamaIndex sells LlamaParse for document parsing and extraction. Neither paid product is required to use the open-source framework.
Which is better for RAG, LangChain or LlamaIndex?
LlamaIndex is built around retrieval: the framework is a toolkit for LLM-powered agents over your data, with data connectors, indexes and query engines, and over 300 integration packages for LLM, embedding and vector store providers. LangChain also supports RAG through its standard interface for models, embeddings and vector stores. Test both on your own documents and retrieval quality metrics before deciding.
Is LlamaIndex still maintained?
The LlamaIndex README says the company's current focus is document parsing and extraction with LlamaParse. It also says the open-source framework is still available as an open toolkit that developers are welcome to use. Teams planning a long-term dependency should review recent releases and issue activity on GitHub before committing to it.
Does LangGraph require LangChain?
No. The LangGraph documentation says its examples often use LangChain for model and tool integrations, but LangGraph does not require LangChain. LangGraph is a low-level orchestration framework and runtime for long-running, stateful agents, so it can be used with or without the higher-level LangChain agent APIs.
How are LangSmith and LlamaParse priced?
Both are separate from the free MIT-licensed frameworks. LangSmith pricing says you pay for what you use, and the free plan covers up to 5k base traces a month before pay-as-you-go billing. LlamaParse is sold on credit-based plans for document parsing and extraction, with free credits included. Check both pricing pages for current rates.
Sources
Facts on this page come from these official pages, checked on , and from the iThub profiles. Vendors change plans and features: confirm with them before buying.