Installation
Purpose and Scope
This page helps you install LlamaIndex and understand what you are installing. LlamaIndex is presented in the first-party documentation as a framework for building LLM-powered agents, workflows, and context-augmented applications over your data. In the repository, that broad framework is distributed as an open source Python project with a visible PyPI package entry, a core package, and many separately packaged integrations. Installing the top-level project is the usual starting point, but successful applications often add provider, data connector, vector store, tool, or agent integration packages as the application design becomes more specific. Sources: README.md, llama-index-core/README.md, llama-index-integrations/README.md
The key installation idea is that LlamaIndex is intentionally modular. The core package contains foundational abstractions for LLM applications, especially retrieval-augmented generation, while integrations are categorized by type and distributed as their own Python packages. That split lets a small project begin with core primitives and add only the external systems it needs, instead of treating every model provider, connector, database, and tool as part of a single mandatory dependency set. For new users, this means installation is not only a command; it is also an architectural choice about which runtime components your application will call. Sources: llama-index-core/README.md, llama-index-integrations/README.md
Quick Install
For a new Python project, start by installing the top-level LlamaIndex package from PyPI. The repository README links the project to the llama-index PyPI package, which is the public package name most users encounter first. Use a virtual environment so model SDKs, connector dependencies, and vector store clients can be added without affecting your system Python installation. After installation, you can begin with the common examples that import from llama_index.core, then add integration packages as soon as you choose a specific LLM provider, embedding model, reader, vector store, or tool implementation. Sources: README.md
python -m venv .venv
source .venv/bin/activate
pip install llama-indexOn Windows PowerShell, activate the environment with .venv/Scripts/Activate.ps1 before running the same pip install llama-index command. The exact Python version policy is not stated in the provided source snippets, so follow the package metadata from PyPI or your lockfile when pinning production environments. For reproducible projects, commit a dependency manifest such as requirements.txt, pyproject.toml, or a lockfile produced by your package manager. LlamaIndex applications commonly depend on remote APIs, so keep provider credentials in environment variables or a secret manager rather than hard-coding them in notebooks or application source.
pip freeze | grep llama-indexCore Primitives
After installation, the first package boundary to understand is llama-index-core. Its README describes it as the core Python package for the LlamaIndex library and says its classes and abstractions are foundational building blocks for LLM applications, most notably RAG. Those building blocks include abstractions for LLMs, vector stores, embeddings, storage, callables, and other extension points. In practice, these are the stable concepts you will see across examples: documents are loaded, transformed into nodes, indexed, retrieved, and synthesized into responses through model-backed components. Sources: llama-index-core/README.md
The core package is designed to be extended through subclasses. That matters during installation because core abstractions are not the same thing as every concrete implementation. You can write application code against common interfaces while selecting a concrete OpenAI, Anthropic, local model, database, reader, or tool integration separately. This design keeps imports such as llama_index.core close to the reusable framework layer and leaves provider-specific imports to integration packages. When debugging dependency issues, first ask whether the failing import is part of the core framework or a separately installed integration. Sources: llama-index-core/README.md, llama-index-integrations/README.md
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
documents = SimpleDirectoryReader("data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What is in this data?")
print(response)Package Structure
The repository separates the core package from a large llama-index-integrations area. The integrations README states that building LLM applications with LlamaIndex involves using core plus the integrations required for your application, and that integrations are categorized by type with each integration published as its own Python package. This is the most important rule for selecting dependencies: install the base framework first, then install named integration packages for the external systems your application actually touches. Sources: llama-index-integrations/README.md
A typical application therefore grows in layers. The first layer is the core application code: indexes, retrievers, query engines, storage abstractions, and agent or workflow orchestration. The second layer is the model layer: an LLM implementation and often an embedding implementation. The third layer is the data or tool layer: readers, vector stores, databases, web APIs, MCP-compatible tools, or custom callables. The repository layout supports this growth model by keeping core abstractions separate from the many integration packages that bind LlamaIndex to external services.
| Layer | What it provides | Installation implication |
|---|---|---|
llama-index | Top-level project package exposed on PyPI | Start here for a new project |
llama-index-core | Foundational abstractions for LLMs, embeddings, vector stores, storage, callables, and RAG | Use llama_index.core imports for framework primitives |
llama-index-integrations packages | Provider, connector, tool, agent, callback, and other implementation packages | Add only the packages required by your application |
Installing Integrations
Install integrations when your code imports a concrete external implementation that is not already available in your environment. The integration package names follow the repository’s modular packaging approach: each integration is its own Python package, categorized by type in the integrations tree. For example, an application that uses a specific tool or agent integration should add that integration package explicitly rather than assuming the core installation includes it. This keeps dependency sets smaller and reduces conflicts among provider SDKs, database clients, authentication libraries, and optional native dependencies. Sources: llama-index-integrations/README.md
# Example shape: install the base framework, then add the packages your app imports
pip install llama-index
pip install llama-index-llms-openai
pip install llama-index-embeddings-openaiTreat the second and third commands as a pattern rather than a universal requirement. Your real integration list should follow the imports used by your application and the provider choices in your architecture. A local development prototype may use one LLM provider and an in-memory or local vector store, while a production RAG service may add a managed vector database, observability callbacks, structured data connectors, or deployment-specific agent integrations. Because integrations are their own packages, production images can be trimmed to the exact connectors and providers needed at runtime.
Verification Workflow
A good installation check should verify both package import boundaries and a minimal end-to-end path. First, confirm that Python can import from llama_index.core, because that demonstrates the framework layer is available. Second, run a tiny indexing or loading example using local files, then add the LLM or embedding provider configuration required by your selected integrations. Third, verify that any optional integration import succeeds in the same virtual environment used by your application server, notebook kernel, or job runner. This avoids the common mismatch where packages are installed into one Python environment but executed from another.
python - <<'PY'
import llama_index.core
print("llama_index.core import ok")
PYIf an import fails, identify which layer it belongs to before changing your dependency file. A missing core import suggests the base package or environment activation is wrong. A missing provider, reader, vector store, callback, or agent import usually means an integration package still needs to be installed. If runtime calls fail after imports succeed, check provider credentials, network access, model names, database permissions, and service-specific configuration. The repository’s package split is useful here: it narrows troubleshooting to either the shared framework layer or the concrete integration layer.
Relevant Source Files
README.md— Identifies the top-level LlamaIndex open source project and links the project to its PyPI package surface.llama-index-core/README.md— Definesllama-index-coreas the core Python package and lists the foundational abstractions it provides for LLM and RAG applications.llama-index-integrations/README.md— Explains that applications combine core with required integrations, and that integrations are categorized by type as separate Python packages.
Next Steps
After installing the base package, continue with the starter example to build a small application and confirm your model configuration. Then read the core concepts primer to understand documents, nodes, indexes, retrieval, query engines, chat engines, agents, and workflows as application building blocks. Once the architecture is clear, choose integration pages based on your concrete providers: LLM integrations for model calls, embedding integrations for vector search, vector store integrations for persistence and retrieval, and data or tool integrations for connecting the application to external systems.