llama-index-legacy
Interface between LLMs and your data
What it is and what it does
LlamaIndex Legacy is a framework for augmenting language models with private data through structured indexing and retrieval. It sits between your data sources and LLM applications, handling ingestion, structuring into indices, and retrieval-augmented query execution. The package provides both high-level APIs for quick prototyping and lower-level customization points for advanced use cases.
The framework depends on core data science libraries (SQLAlchemy, pandas, numpy) for data handling, embedding and tokenization (tiktoken, openai), and async utilities (aiohttp, nest-asyncio). It supports multiple LLM backends and embedding providers. Data can be persisted to disk or kept in-memory, and query results are augmented with retrieved context before being sent to the LLM.
Use it for:
- Build a chatbot that answers questions about internal documentation or knowledge bases
- Create semantic search over large document collections without manual indexing
- Augment an LLM with domain-specific data for more accurate contextual responses
- Prototype a retrieval-augmented generation pipeline with minimal boilerplate
- Index and query structured data from SQL databases alongside unstructured documents
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
LlamaIndex Legacy is a data framework for building LLM applications that connects private data to language models through indexing, retrieval, and query interfaces.
Yes, if you are building an LLM application that needs to incorporate private data and are comfortable with the legacy version status. The package is actively maintained, has no known vulnerabilities, and offers a straightforward API for common retrieval tasks. However, verify whether migration to the current package is recommended for your use case, as this is explicitly a legacy release.
Install
llama-index-legacy on PyPI
pip
pip install llama-index-legacyuv
uv add llama-index-legacypoetry
poetry add llama-index-legacyInstalling llama-index-legacy
Before you install
Low friction install with 18 runtime dependencies including core data and ML libraries (SQLAlchemy, pandas, numpy, openai, tiktoken). Actively maintained with recent commits and no known vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most production applications.
Quickstart
pip install llama-index-legacy
import os
os.environ["OPENAI_API_KEY"] = "YOUR_KEY"
from llama_index_legacy import VectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader("YOUR_DATA_DIRECTORY").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
query_engine.query("YOUR_QUESTION")
Requires an LLM API key (OpenAI by default) and data directory to index; Python 3.8.1 or later.
Verify before relying
- Whether this legacy version is still recommended or if migration to current package is advised
- Performance characteristics and scalability limits for large document collections
- Specific vector store backends supported beyond in-memory storage
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8.1) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 18 — SQLAlchemy, dataclasses-json, deprecated, fsspec, httpx, nest-asyncio, nltk, numpy, openai, pandas, tenacity, tiktoken, typing-extensions, typing-inspect, requests, aiohttp, networkx, dirtyjson |
| Maintenance | actively maintained — 645 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,347,955/month — #3,116 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: llama_index_legacy-0.9.48.post4-py3-none-any.whl
Keywords: LLM, NLP, RAG, data, devtools, index, retrieval
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
llama-indexLlamaIndex is a data framework that connects…
permissive · top 5,000 on PyPI
llama-index-coreLlamaIndex Core provides foundational…
permissive · top 5,000 on PyPI
gptcacheGPTCache provides semantic caching for LLM API…
permissive · top 15,000 on PyPI
llama-index-indices-managed-llama-cloudProvides deprecated integration for creating…
permissive · top 1,000 on PyPI
llama-index-cliProvides command-line interface tools for…
permissive · top 5,000 on PyPI
llama-index-llms-openai-likeProvides a thin wrapper to use…
permissive · top 15,000 on PyPI
llama-index-vector-stores-redisIntegrates Redis as a vector store backend for…
permissive · top 15,000 on PyPI
llama-index-vector-stores-qdrantIntegrates Qdrant vector database with…
permissive · top 15,000 on PyPI
llama-index-readers-fileProvides file loaders that parse documents in…
permissive · top 5,000 on PyPI
pypiThis package is a historical reference to…
permissive · top 15,000 on PyPI