https://github.com/run-llama/llama_index
LlamaIndex is the leading framework for building LLM-powered agents over your data.
https://github.com/run-llama/llama_index
agents application data fine-tuning framework llamaindex llm multi-agents rag vector-database
Last synced: 3 months ago
JSON representation
LlamaIndex is the leading framework for building LLM-powered agents over your data.
- Host: GitHub
- URL: https://github.com/run-llama/llama_index
- Owner: run-llama
- License: mit
- Created: 2022-11-02T04:24:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-13T00:14:06.000Z (4 months ago)
- Last Synced: 2026-02-13T08:37:45.822Z (4 months ago)
- Topics: agents, application, data, fine-tuning, framework, llamaindex, llm, multi-agents, rag, vector-database
- Language: Python
- Homepage: https://developers.llamaindex.ai
- Size: 368 MB
- Stars: 46,975
- Watchers: 261
- Forks: 6,812
- Open Issues: 302
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-openclaw-money-maker - **LlamaIndex** - Data-centric agents with RAG primitives. 500+ connectors via LlamaHub. (AI Agent Frameworks / General Agent Frameworks)
- Awesome-RAG-Production - LlamaIndex
- awesome-ai-agent - run-llama/llama_index
- awesome-mlops - LlamaIndex
- awesome-ml-python-packages - LlamaIndex
- awesome-ChatGPT-repositories - llama_index - LlamaIndex (formerly GPT Index) is a data framework for your LLM applications (Langchain)
- ai-game-devtools - LlamaIndex
- awesome-llm-json - LlamaIndex - defined Pydantic programs for specific output types. (Python Libraries)
- awesome - run-llama/llama\_index - LlamaIndex is the leading document agent and OCR platform (Python)
- awesome-opensource-ai - LlamaIndex - Full-featured RAG pipeline with advanced indexing.  (5. Retrieval-Augmented Generation (RAG) & Knowledge)
- awesome-mistral - LlamaIndex
- awesomeLibrary - llama_index - LlamaIndex is the leading framework for building LLM-powered agents over your data. (语言资源库 / python)
- Awesome-AI-Agents - llama_index - LlamaIndex (formerly GPT Index) is a data framework for your LLM applications  (Frameworks / Advanced Components)
- awesome-sentiment-analysis - LlamaIndex - heavy sentiment pipelines. (LLM Techniques for Sentiment Analysis / Retrieval-Augmented Generation (RAG))
- alan_awesome_llm - LlamaIndex
- awesome-ai-ml-testing - LlamaIndex Evaluation - Evaluation modules for RAG applications. (🤖 LLM & Chatbot Testing)
- awesome-genai - LamaIndex - LlamaIndex is a data framework for your LLM applications. [](https://github.com/run-llama/llama_index/network/members) [](https://github.com/run-llama/llama_index/stargazers) (Tools & Frameworks / Development Frameworks)
- awesome-github-projects - llama_index - LlamaIndex is the leading document agent and OCR platform ⭐49,439 `Python` 🔥 (🤖 AI & Machine Learning)
- awesome-llm-and-aigc - LlamaIndex - llama/llama_index?style=social"/> : LlamaIndex is a data framework for your LLM applications. [docs.llamaindex.ai](https://docs.llamaindex.ai/) (Summary)
- awesome-generative-ai-data-scientist - LlamaIndex - augmented generative AI applications with LLMs. (AI LLM Frameworks)
- awesome-ai - **LlamaIndex**
- awesome-ai-papers - [LlamaIndex - llama/llama_deploy)\]\[[A Cheat Sheet and Some Recipes For Building Advanced RAG](https://blog.llamaindex.ai/a-cheat-sheet-and-some-recipes-for-building-advanced-rag-803a9d94c41b)\]\[[Fine-Tuning Embeddings for RAG with Synthetic Data](https://www.llamaindex.ai/blog/fine-tuning-embeddings-for-rag-with-synthetic-data-e534409a3971)\] (NLP / 3. Pretraining)
- best-of-ai-open-source - GitHub - 9% open · ⏱️ 07.01.2025): (LLM Frameworks & Libraries)
- awesome-LLM-resources - LlamaIndex
- awesome-ai-agents - LlamaIndex Agents - centric framework with retrieval-heavy agent workflows. (Frameworks)
- awesome-data-analysis - LlamaIndex - Data framework for LLM-based applications with RAG capabilities. (🧠 AI Applications & Platforms / Tools)
- awesome-data-engineer - LlamaIndex
- awesome_ai_agents - LlamaIndex Tools - LlamaIndex offers a variety of tools for building data agents, with top downloads including IonicShoppingToolSpec, OpenAPIToolSpec, WikipediaToolSpec, GmailToolSpec, and GoogleCalendarToolSpec, enabling seamless integration with user-defined functions, query engines, and third-party services [github](https://github.com/run-llama/llama_index) | [website](https://llamahub.ai/?tab=tools) | [docs](https://docs.llamaindex.ai/en/latest/module_guides/deploying/agents/tools/) (Learning / Repositories)
- awesome-agents - LlamaIndex - Data framework for connecting custom data sources to large language models. (Frameworks)
- awesome-safety-critical-ai - `run-llama/llama_index` - powered agents over your data (<a id="tools"></a>🛠️ Tools / Bleeding Edge ⚗️)
- awesome-production-machine-learning - LlamaIndex - llama/llama_index.svg?style=social) - LlamaIndex (GPT Index) is a data framework for your LLM application. (Industry Strength Natural Language Processing)
- awesome-multimodal-search - GitHub
- awesome-LLMs-finetuning - LlamaIndex
- awesome-ai-agents-2026 - LlamaIndex - focused. Best for RAG agents. | (🧱 Agent Frameworks / General Purpose)
- awesome-ccamel - run-llama/llama_index - LlamaIndex is the leading document agent and OCR platform (Python)
- awesome-harness-engineering - run-llama/llama_index
- awesome-local-llm - llama_index - the leading framework for building LLM-powered agents over your data (Tools / Agent Frameworks)
- awesome-local-ai - LlamaIndex - Data framework for LLM apps (AI Agents / Frameworks)
- awesome-ai-tools - LlamaIndex - LlamaIndex is a data framework for your LLM applications (LLM Ops / Other Cloud Provider Credits)
- awesome-python - LlamaIndex - A data framework for your LLM application. (Machine Learning)
- awesome-generative-ai-meets-julia-language - Llama Index - Similar to LangChain but with a focus on data-centered applications like RAG. (Must-Know Python Projects / Generative AI - Previous Generation)
- Awesome-LLMOps - LlamaIndex - powered agents over your data.    (Orchestration / Workflow)
- awesome-prompts - LlamaIndex
- awesome-prompt-engineering - LlamaIndex - Data framework for LLM apps (Tools & Frameworks / Development Tools)
- awesome-ai - 🔗
- my-awesome - run-llama/llama_index - tuning,framework,llamaindex,llm,multi-agents,rag,vector-database pushed_at:2026-05 star:49.4k fork:7.4k LlamaIndex is the leading document agent and OCR platform (Python)
- Awesome-RAG - LlamaIndex - llama/llama_index?style=flat)](https://github.com/run-llama/llama_index/stargazers) | (Libraries/Frameworks)
- stars - run-llama/llama_index - LlamaIndex (formerly GPT Index) is a data framework for your LLM applications (Python)
- awesome-llms-fine-tuning - LlamaIndex
- my-awesome-starred - run-llama/llama_index - LlamaIndex is the leading document agent and OCR platform (Python)
- awesome-vibe-coding - LlamaIndex - in-class RAG and data connectors. | (AI Frameworks & SDKs / AI SDKs & Libraries)
- awesome-vision-ai-stack - LlamaIndex - Retrieval and agents, with multimodal extensions. (Applications and Demos / Useful open projects)
- jimsghstars - run-llama/llama_index - LlamaIndex is a data framework for your LLM applications (Python)
- fucking-awesome-python - LlamaIndex - A data framework for your LLM application. (Machine Learning)
- awesome-ai - Llama Index - based applications to ingest, structure, and access private or domain-specific data. |  | (Autonomous Agents)
- awesome-llm-tools - LlamaIndex - heavy, enterprise knowledge systems | (2. Libraries & Frameworks / Python)
- awesome-llm-agents - Llama Index - Data framework for LLM (Frameworks)
- awesome-agents - llama_index - powered agents over your data. | framework | 41,549 | 5,924 | 332 | 476 | 0 days, 20 hrs, 51 mins | 378 | MIT License | (Table of Open-Source AI Agents Projects)
- llmops - LlamaIndex - llama/llama_index?style=flat-square) | (Orchestration / Application Frameworks)
- awesome-ai-agents - LlamaIndex
- Awesome-Prompt-Engineering - GitHub
- awesome-hacking-lists - run-llama/llama_index - LlamaIndex is the leading framework for building LLM-powered agents over your data. (Python)
- awesome-agent-cortex - LlamaIndex - Data framework for document agents, retrieval, and workflow orchestration. (Agent Frameworks)
- awesome-ai-agents - LlamaIndex - llama/llama_index) | Data framework for LLM apps with RAG, agents, and 300+ integrations | (🌟 Core Frameworks)
- awesome-rag-study - LlamaIndex
- awesome-x-ops - LlamaIndex
- awesome-rag - LlamaIndex
- awesome-workflow-automation - LlamaIndex - in-class RAG pipelines, retrieval, and observability/evals. (🧩 Agent Frameworks & Dev Libraries / LLM App & RAG Builders)
- awesome - LlamaIndex
- awesome-rainmana - run-llama/llama_index - LlamaIndex is the leading document agent and OCR platform (Python)
- awesome-telco-ai - LlamaIndex - Data framework for LLM applications with RAG support (Open Source and Commercial Projects / RAG and Knowledge Systems)
- awesome-ai-mexico - LlamaIndex
- awesome-vibe-coding - LlamaIndex - Data framework for LLMs. (Open Source Projects / Frameworks & Libraries)
- awesome-agentic-knowledge-base - run-llama/llama_index - framework | Foundational Python RAG/agent framework; 571 separately versioned integration packages ([survey](surveys/run-llama__llama_index.md)) | (Open-source repos)
- awesome-ai-agents - run-llama/llama_index - LlamaIndex is a leading data framework that enables building LLM-powered applications by providing tools for data ingestion, structuring, and advanced querying to augment large language models with private and external data. (Corporate and Analytical Applications / Data Integration and Specialized Solutions)
- awesome-production-llm - llama_index - llama/llama_index.svg?style=social) LlamaIndex is a data framework for your LLM applications (LLM Application / RAG)
- awesome-ai-coding-agent-tools - LlamaIndex - RAG framework with agent workflows and context-aware AI agents. (Agent SDKs & Frameworks / Orchestration Frameworks)
- awesome-open-source-ai-tools - run-llama/llama_index - LlamaIndex is the leading framework for building LLM-powered agents over your data. (Chatbots & Virtual Companions)
README
# 🗂️ LlamaIndex 🦙
[](https://pypi.org/project/llama-index/)
[](https://github.com/jerryjliu/llama_index/graphs/contributors)
[](https://discord.gg/dGcwcsnxhU)
[](https://www.phorm.ai/query?projectId=c5863b56-6703-4a5d-87b6-7e6031bf16b6)
LlamaIndex (GPT Index) is a data framework for your LLM application. Building with LlamaIndex typically involves working with LlamaIndex core and a chosen set of integrations (or plugins). There are two ways to start building with LlamaIndex in
Python:
1. **Starter**: `llama-index` (https://pypi.org/project/llama-index/). A starter Python package that includes core LlamaIndex as well as a selection of integrations.
2. **Customized**: `llama-index-core` (https://pypi.org/project/llama-index-core/). Install core LlamaIndex and add your chosen LlamaIndex integration packages on [LlamaHub](https://llamahub.ai/)
that are required for your application. There are over 300 LlamaIndex integration
packages that work seamlessly with core, allowing you to build with your preferred
LLM, embedding, and vector store providers.
The LlamaIndex Python library is namespaced such that import statements which
include `core` imply that the core package is being used. In contrast, those
statements without `core` imply that an integration package is being used.
```python
# typical pattern
from llama_index.core.xxx import ClassABC # core submodule xxx
from llama_index.xxx.yyy import (
SubclassABC,
) # integration yyy for submodule xxx
# concrete example
from llama_index.core.llms import LLM
from llama_index.llms.openai import OpenAI
```
### Important Links
LlamaIndex.TS (Typescript/Javascript): https://github.com/run-llama/LlamaIndexTS.
Documentation: https://docs.llamaindex.ai/en/stable/.
Twitter: https://twitter.com/llama_index.
Discord: https://discord.gg/dGcwcsnxhU.
### Ecosystem
- LlamaHub (community library of data loaders): https://llamahub.ai.
- LlamaLab (cutting-edge AGI projects using LlamaIndex): https://github.com/run-llama/llama-lab.
## 🚀 Overview
**NOTE**: This README is not updated as frequently as the documentation. Please check out the documentation above for the latest updates!
### Context
- LLMs are a phenomenal piece of technology for knowledge generation and reasoning. They are pre-trained on large amounts of publicly available data.
- How do we best augment LLMs with our own private data?
We need a comprehensive toolkit to help perform this data augmentation for LLMs.
### Proposed Solution
That's where **LlamaIndex** comes in. LlamaIndex is a "data framework" to help you build LLM apps. It provides the following tools:
- Offers **data connectors** to ingest your existing data sources and data formats (APIs, PDFs, docs, SQL, etc.).
- Provides ways to **structure your data** (indices, graphs) so that this data can be easily used with LLMs.
- Provides an **advanced retrieval/query interface over your data**: Feed in any LLM input prompt, get back retrieved context and knowledge-augmented output.
- Allows easy integrations with your outer application framework (e.g. with LangChain, Flask, Docker, ChatGPT, anything else).
LlamaIndex provides tools for both beginner users and advanced users. Our high-level API allows beginner users to use LlamaIndex to ingest and query their data in
5 lines of code. Our lower-level APIs allow advanced users to customize and extend any module (data connectors, indices, retrievers, query engines, reranking modules),
to fit their needs.
## 💡 Contributing
Interested in contributing? Contributions to LlamaIndex core as well as contributing
integrations that build on the core are both accepted and highly encouraged! See our [Contribution Guide](CONTRIBUTING.md) for more details.
## 📄 Documentation
Full documentation can be found here: https://docs.llamaindex.ai/en/latest/.
Please check it out for the most up-to-date tutorials, how-to guides, references, and other resources!
## 💻 Example Usage
```sh
# custom selection of integrations to work with core
pip install llama-index-core
pip install llama-index-llms-openai
pip install llama-index-llms-replicate
pip install llama-index-embeddings-huggingface
```
Examples are in the `docs/examples` folder. Indices are in the `indices` folder (see list of indices below).
To build a simple vector store index using OpenAI:
```python
import os
os.environ["OPENAI_API_KEY"] = "YOUR_OPENAI_API_KEY"
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("YOUR_DATA_DIRECTORY").load_data()
index = VectorStoreIndex.from_documents(documents)
```
To build a simple vector store index using non-OpenAI LLMs, e.g. Llama 2 hosted on [Replicate](https://replicate.com/), where you can easily create a free trial API token:
```python
import os
os.environ["REPLICATE_API_TOKEN"] = "YOUR_REPLICATE_API_TOKEN"
from llama_index.core import Settings, VectorStoreIndex, SimpleDirectoryReader
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
from llama_index.llms.replicate import Replicate
from transformers import AutoTokenizer
# set the LLM
llama2_7b_chat = "meta/llama-2-7b-chat:8e6975e5ed6174911a6ff3d60540dfd4844201974602551e10e9e87ab143d81e"
Settings.llm = Replicate(
model=llama2_7b_chat,
temperature=0.01,
additional_kwargs={"top_p": 1, "max_new_tokens": 300},
)
# set tokenizer to match LLM
Settings.tokenizer = AutoTokenizer.from_pretrained(
"NousResearch/Llama-2-7b-chat-hf"
)
# set the embed model
Settings.embed_model = HuggingFaceEmbedding(
model_name="BAAI/bge-small-en-v1.5"
)
documents = SimpleDirectoryReader("YOUR_DATA_DIRECTORY").load_data()
index = VectorStoreIndex.from_documents(
documents,
)
```
To query:
```python
query_engine = index.as_query_engine()
query_engine.query("YOUR_QUESTION")
```
By default, data is stored in-memory.
To persist to disk (under `./storage`):
```python
index.storage_context.persist()
```
To reload from disk:
```python
from llama_index.core import StorageContext, load_index_from_storage
# rebuild storage context
storage_context = StorageContext.from_defaults(persist_dir="./storage")
# load index
index = load_index_from_storage(storage_context)
```
## 🔧 Dependencies
We use poetry as the package manager for all Python packages. As a result, the
dependencies of each Python package can be found by referencing the `pyproject.toml`
file in each of the package's folders.
```bash
cd
pip install poetry
poetry install --with dev
```
## 📖 Citation
Reference to cite if you use LlamaIndex in a paper:
```
@software{Liu_LlamaIndex_2022,
author = {Liu, Jerry},
doi = {10.5281/zenodo.1234},
month = {11},
title = {{LlamaIndex}},
url = {https://github.com/jerryjliu/llama_index},
year = {2022}
}
```