This library provides integration for LlamaIndex to create, manage, and query indices hosted on Llama Cloud. It enables persistent, scalable, and production-ready Retrieval-Augmented Generation (RAG) solutions without needing to manage vector databases or other infrastructure directly. The current version is `0.11.1`, and it follows the frequent release cadence of the broader LlamaIndex ecosystem, often tied to Llama Cloud service updates.
pip install llama-index-indices-managed-llama-cloudVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a `LlamaCloudIndex`, optionally providing documents for ingestion, and then querying it. It assumes the `LLAMA_CLOUD_API_KEY` environment variable is set for authentication with Llama Cloud.
Ensure `LLAMA_CLOUD_API_KEY` is set in your environment (e.g., `export LLAMA_CLOUD_API_KEY='your-key'`) or passed directly as `api_key='your-key'` to the `LlamaCloudIndex` constructor.
It is highly recommended to pin the exact versions of both `llama-index` and `llama-index-indices-managed-llama-cloud` in your `requirements.txt` or `pyproject.toml` to ensure stability: `llama-index==x.y.z` and `llama-index-indices-managed-llama-cloud==a.b.c`.
Always use a distinct name for a truly new index. If you intend to update an existing index, explicitly pass `index_name` and handle document updates accordingly. Consider checking for index existence before creating if logic depends on it.
Ensure the package is installed by running `pip install llama-index-indices-managed-llama-cloud`. If the issue persists, verify your Python environment. Note that this package is deprecated; consider migrating to `pip install llama-cloud` and updating your imports to `from llama_cloud_services import LlamaCloudIndex` for ongoing support.
Verify your API key in the Llama Cloud dashboard, generate a new one if it's expired or compromised, and ensure it's correctly set as an environment variable (e.g., `os.environ["LLAMA_CLOUD_API_KEY"] = "llx-..."`) or passed directly to the `LlamaCloudIndex` constructor (`api_key="llx-..."`). Also, confirm the API key's associated region and project.
Update the `llama-index-indices-managed-llama-cloud` package to its latest version (e.g., `pip install --upgrade llama-index-indices-managed-llama-cloud`) and ensure your `llama-index-core` packages are also up-to-date. If the issue persists, review the Llama Cloud documentation for the `retrieval_mode` parameter to align your code with the current API specifications.
To ensure continued support, access to new features, and bug fixes, migrate your application to use the `llama-cloud` package. First, uninstall the deprecated package (`pip uninstall llama-index-indices-managed-llama-cloud`), then install the new package (`pip install llama-cloud`). Update your import statements in your code, for example, from `from llama_index.indices.managed.llama_cloud import LlamaCloudIndex` to `from llama_cloud_services import LlamaCloudIndex`.