# LlamaIndex: a Python data framework for RAG and document agents

> LlamaIndex connects private documents to LLMs through ingest, index and query layers, shipped as a core package plus over 300 integrations. It is a good fit when you want to own the retrieval pipeline; it is the wrong tool when you want a managed parser and agent runtime.

**run-llama/llama_index** — A framework for building document agents and retrieval applications.

- Repository: https://github.com/run-llama/llama_index
- Website: https://developers.llamaindex.ai
- Stars: 52,330 · Forks: 8,226
- Language: Python
- License: MIT
- Published: 2026-08-08 · Updated: 2026-08-18 · Language: en
- Canonical page: https://hysenlabs.com/projects/run-llama-llama-index

## What problem LlamaIndex solves, and for whom

An LLM is pre-trained on public data. Your contracts, tickets and PDFs are not in that data. LlamaIndex exists to close that gap: the README describes it as a "data framework" to help you build LLM apps, with data connectors for APIs, PDFs, docs and SQL, ways to structure that data into indices and graphs, and a retrieval and query interface that returns knowledge-augmented output.

The intended audience is a Python developer who already has a corpus and an LLM provider in mind. The README splits users into two groups: beginners who want to ingest and query in roughly five lines of code through the high-level API, and advanced users who want to replace individual modules such as data connectors, indices, retrievers, query engines and reranking. That second group is the real target. If you never intend to swap a retriever or a reranker, you are paying the framework's complexity cost for nothing.

The project is not a model and not a vector database. It is the glue layer. Everything it does sits between your storage and your LLM call, which is also why the integration surface is so large: over 300 integration packages are listed on LlamaHub, covering LLM, embedding and vector store providers.

## The core and integration split, and how imports encode it

The repository is a monorepo rather than a single package. Top-level directories include llama-index-core, llama-index-integrations, llama-index-instrumentation, llama-index-utils and llama-dev. There are two supported starting points. The starter package, llama-index, bundles core plus a selection of integrations. The customized route installs llama-index-core and then adds only the integration packages your application needs.

The naming convention is the part worth internalising, because it tells you which package a class comes from. As the README puts it, import statements containing core imply the core package is in use, and statements without core imply an integration package. Their concrete example pairs the abstract LLM class from core with the OpenAI implementation from an integration:

```python
from llama_index.core.llms import LLM
from llama_index.llms.openai import OpenAI
```

That pattern repeats across the framework: the base type lives in llama_index.core.<submodule>, the provider-specific subclass lives in llama_index.<submodule>.<provider>. Once you see it, you can guess an import path before opening the docs. It also means the base class is the extension point: substituting a different provider is a matter of changing the subclass, not rewriting the pipeline.

## Installing llama-index-core and running a first index

The README gives the customized install as a sequence of pip commands, one per package. Core first, then the LLM, embedding and vector store integrations you actually use:

```bash
pip install llama-index-core
pip install llama-index-llms-openai
pip install llama-index-llms-ollama
pip install llama-index-embeddings-huggingface
```

You do not need all four. The list is the README's illustration of the pattern: one core package plus one package per provider you talk to. If you prefer the bundled route, the alternative is a single pip install llama-index, which pyproject.toml defines as depending on llama-index-core, llama-index-embeddings-openai, llama-index-llms-openai and nltk. That dependency list is the practical difference between the two routes: the starter package pulls OpenAI's LLM and embedding integrations whether or not you use OpenAI.

The README points to the docs/examples folder for runnable examples and to the indices folder for the index implementations. A minimal first run, following the README's stated flow of ingest, index and query, is: load documents with a reader, build a vector store index over them, then query that index and read back the retrieved context. The README's own example builds a simple vector store index using OpenAI; the exact code is truncated in the README, so take the working version from docs/examples rather than reconstructing it. The command to watch for is the API key: the OpenAI integrations read it from the environment, and the README does not print a placeholder key in the install block, so set it yourself before the first query.

## What the repository layout tells you about upgrade cost

The version constraints are the clearest signal of how tightly the pieces move together. pyproject.toml for the starter package pins llama-index-core to >=0.14.24,<0.15.0, llama-index-embeddings-openai to >=0.6.0,<0.7, and llama-index-llms-openai to >=0.7.0,<0.8. Those are narrow ranges on a 0.x line. A minor bump in core can therefore require a matching bump across the integration packages you depend on, and the integration packages are versioned independently of core.

The monorepo structure adds a second cost. The Makefile exposes separate test targets per area, including test-core, test-integrations and test-packs, and the default test target runs pants with --changed-since=origin/main and --changed-dependents=transitive. That is a maintainer-facing setup built for a large repository; it is not a workflow you can lift into a small application. For an adopter, the practical consequence is that you should pin the integration packages in your own lockfile rather than tracking the latest release, and treat a core upgrade as a change that requires re-running your retrieval tests.

The repository also carries a llama-dev directory and a scripts directory, plus a pyproject.toml with a dev dependency group covering black, ruff, mypy, pylint, codespell and pytest. The tooling is conventional Python. Nothing here suggests a build step you would need to reproduce in your own project.

## Where LlamaIndex is the wrong tool

The README is explicit that the open-source framework and the commercial platform are separate things. LlamaParse is described as its own platform, focused on document agents and agentic OCR, with Parse, LlamaAgents, Extract, Index and Split as components, and it can be used with the framework or standalone. Signing up for LlamaParse is a separate step that produces an API key. That boundary matters: if your hard problem is parsing messy scanned documents, the MIT-licensed library does not solve it for you. You either bring your own parser or you adopt the platform.

The second limitation is scope of the retrieval stack. LlamaIndex gives you the interface and the connectors, not the retrieval quality. Chunking strategy, embedding model choice, reranking and evaluation are decisions the framework exposes rather than makes. Teams that expect a framework to produce good answers out of the box will be disappointed, and the README's five-line beginner example is a starting point, not a production configuration.

The third is the README itself. It carries a note that it is not updated as frequently as the documentation and directs readers to the docs for the latest updates. Treat the README as an orientation document. Any version, flag or API detail you rely on should be confirmed against developers.llamaindex.ai before you build on it.

## LlamaIndex and LangChain: different centres of gravity

The comparison people search for most is against LangChain, and the repositories do differ in what they put at the centre. LangChain is built around chains and, more recently, graph-structured agent orchestration. LlamaIndex is built around the data: connectors, indices and a query interface over your own corpus. Its README lists LangChain among the outer frameworks it can integrate with, which is the honest way to read the relationship. They are not mutually exclusive, and the README treats LangChain as an application framework you can wrap around LlamaIndex rather than a rival to replace it.

If your problem is "I have 40,000 internal documents and I need retrieval over them", LlamaIndex starts closer to that problem. If your problem is "I need to orchestrate several tools and models in a stateful loop", the retrieval layer is a smaller part of the work, and the choice matters less than the orchestration model. The related search for llamaindex vs langgraph points at the same split: LangGraph is an orchestration runtime, LlamaIndex is a data and retrieval framework, and the README positions LlamaIndex's own agent story around Workflows and Agent Builder on the LlamaParse side.

One practical difference to weigh: LlamaIndex's integration surface is distributed as separate packages on LlamaHub, so dependency management is your responsibility. Frameworks that bundle providers into one distribution trade flexibility for a simpler install. Neither is better in the abstract; the question is whether you want to pin ten packages or one.

## Conclusion

Adopt LlamaIndex if you are a Python team that needs to own the ingest, index and query pipeline, and you are willing to pick and pin integration packages yourself. Do not adopt it if you want a hosted parser and agent runtime with no retrieval code: LlamaParse and LlamaAgents are separate products, not part of the MIT-licensed library. Before committing, verify that the integration package you need exists on LlamaHub for your LLM, embedding and vector store, check that the release you pin matches the llama-index-core range in pyproject.toml, and confirm your Python version satisfies the >=3.10,<4.0 constraint.

## FAQ

### What is LlamaIndex for?

It is an open-source Python framework for augmenting LLMs with your own private data. The README describes it as a data framework that provides connectors to ingest sources such as APIs, PDFs, docs and SQL, ways to structure that data into indices and graphs, and a retrieval and query interface that returns knowledge-augmented output.

### Is LlamaIndex better than LangChain?

They centre on different things. LlamaIndex is built around data: connectors, indices and query over your corpus. The README lists LangChain among the outer application frameworks LlamaIndex can integrate with, so the two can be used together rather than as a straight substitution.

### How much does LlamaIndex cost?

The library is MIT licensed, so there is no licence fee for the open-source framework. The README separates this from LlamaParse, the commercial platform for agentic OCR, parsing, extraction and indexing, which requires signing up and obtaining an API key.

### Is the LlamaIndex open source?

Yes. The repository is MIT licensed and the source is published under run-llama/llama_index, with the framework distributed on PyPI as llama-index and llama-index-core. The README also notes that the README is updated less frequently than the documentation site.

### How to install llama index core?

Install it on its own with pip install llama-index-core, then add the integration packages for your providers. The README shows this customized route alongside the starter package, llama-index, which bundles core with a selection of integrations. Python >=3.10,<4.0 is required.

### How to install llama_index embeddings huggingface?

The README's custom install example includes the line pip install llama-index-embeddings-huggingface, alongside the core and LLM packages. It is one of the over 300 integration packages listed on LlamaHub that build on core.

## Sources

- [Official documentation](https://developers.llamaindex.ai)
- [Official README](https://github.com/run-llama/llama_index#readme)
- [Project repository](https://github.com/run-llama/llama_index)
- [Release notes](https://github.com/run-llama/llama_index/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/run-llama-llama-index
