Registry / llm-agents / llama-index-legacy

llama-index-legacy

JSON →
library0.9.48.post4pypypiunverified

LlamaIndex Legacy is a compatibility package that contains the pre-v0.10.0 monolithic codebase of LlamaIndex, a data framework designed to build LLM applications by connecting large language models with external data sources. It is currently at version 0.9.48.post4 and is maintained for users who have not yet migrated to the modular LlamaIndex v0.10+ architecture. While the broader LlamaIndex ecosystem has a rapid release cadence, this specific legacy package receives minimal updates as it is a bridge for older codebases.

pip install llama-index-legacy
INSTALL
IMPORT
SIG · LLAMA-INDEX-LEGACY
L
llama-index-legacy
llm-agentspythonv0.9.48.post4
Install
20.8s avg
Import
9982ms
Disk
339MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.48.post4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 6.391s · 332.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 20.8s · import 5.587s · 323MB
339MB installed
● package 339MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VectorStoreIndex
from llama_index.legacy import VectorStoreIndex
from llama_index import VectorStoreIndex

This quickstart demonstrates how to load documents from a local directory, create a vector store index, and query it using the legacy LlamaIndex API. Ensure you have an `OPENAI_API_KEY` set as an environment variable and a `data` directory with at least one text file.

import os from llama_index.legacy import VectorStoreIndex, SimpleDirectoryReader # Set your OpenAI API key as an environment variable os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "YOUR_OPENAI_API_KEY") # Create a 'data' directory and place some text files inside it # e.g., echo "The quick brown fox jumps over the lazy dog." > data/example.txt # Load documents from the specified directory documents = SimpleDirectoryReader("data").load_data() # Create a vector store index from the loaded documents index = VectorStoreIndex.from_documents(documents) # Create a query engine and query the index query_engine = index.as_query_engine() response = query_engine.query("What did the fox do?") print(response.response)
Debug
Known issues
breakingThe primary LlamaIndex library underwent a significant modularization in version 0.10.0, splitting into `llama-index-core` and numerous integration-specific packages. `llama-index-legacy` is provided as a temporary bridge for pre-v0.10.0 code, but new development should use the modular `llama-index` packages.
fix
Migrate your codebase to use `llama-index` (v0.10+) and its modular components, importing from `llama_index.core` and specific integration packages (e.g., `llama_index.llms.openai`). A CLI tool is available for automated import updates.
affects: <0.10.0
deprecatedThe `ServiceContext` object has been deprecated in favor of a global `Settings` object or local configurations passed directly to APIs. Many agent-related classes (e.g., `AgentRunner`, `FunctionCallingAgent`) are also deprecated in favor of `AgentWorkflow`.
fix
Replace `ServiceContext` usage with `Settings` for global configuration or pass parameters directly. Update deprecated agent classes to use the `AgentWorkflow` abstraction.
affects: <0.10.0
deprecatedThe `llama-index-legacy` package itself is deprecated and has been removed from the main LlamaIndex repository. This implies that it will receive minimal or no new features and potentially limited maintenance.
fix
Users are strongly encouraged to migrate their applications to the latest `llama-index` package and its modular components to ensure access to new features, bug fixes, and ongoing support.
affects: All versions
gotchaWhile `llama-index-legacy` explicitly supports Python >=3.8.1 and <4.0, the broader `llama-index` ecosystem has begun deprecating Python 3.9 in recent releases of its modular packages. Users planning a migration should be aware of future Python version requirements.
fix
When migrating to the latest LlamaIndex, ensure your environment uses a supported Python version, preferably 3.10 or newer, to align with ongoing development.
affects: All versions (for future compatibility)
Upgrade
Version history
0.9.48.post4latest on PyPI · released Nov 7, 2024
Audit
Dependencies
pythonrequiredRequires Python versions greater than or equal to 3.8.1 and less than 4.0.
openaioptionalCommonly used for LLM interactions and embeddings. The legacy package bundles many dependencies, including various LLM, embedding, and vector store integrations.
pydanticrequiredUsed for data validation and parsing, a core dependency across LlamaIndex.
Agent activity
32 hits · last 30 days
node
30
OpenAI (training)
1
Resources
llama-index-legacy — pip install llama-index-legacy · libregistry