LlamaIndex is a data framework for building LLM-powered agents over your data. Specializes in RAG pipelines, document parsing, and agent workflows. Core package is llama-index-core. Integrations are separate packages installed from LlamaHub.
Install & Compatibility
Where this runs
tested against v? · 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
421MB installed
● package 421MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
VectorStoreIndex
✓ from llama_index.core import VectorStoreIndex
✗ from llama_index import GPTVectorStoreIndex
GPTVectorStoreIndex renamed to VectorStoreIndex in 0.10. Old name removed.
OpenAI (LLM)
✓ from llama_index.llms.openai import OpenAI
✗ from llama_index import OpenAI
LLMs moved to integration packages in 0.10. Install llama-index-llms-openai.
AgentWorkflow
✓ from llama_index.core.agent.workflow import AgentWorkflow
✗ from llama_index.core.agent import AgentRunner
AgentRunner, AgentWorker, FunctionCallingAgent, ReActAgent (old) all removed. Use AgentWorkflow.
Settings
✓ from llama_index.core import Settings
Settings.llm = OpenAI(model='gpt-4o')
✗ from llama_index.core import ServiceContext
service_context = ServiceContext.from_defaults(llm=...)
ServiceContext fully removed. Use Settings global object or pass params directly.
Minimal RAG pipeline using VectorStoreIndex with OpenAI in LlamaIndex 0.14.x.
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, Settings
from llama_index.llms.openai import OpenAI
from llama_index.embeddings.openai import OpenAIEmbedding
Settings.llm = OpenAI(model='gpt-4o')
Settings.embed_model = OpenAIEmbedding(model='text-embedding-3-small')
documents = SimpleDirectoryReader('data').load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query('What did the author do growing up?')
print(response)
llamaindex --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'llama_index.query_engine'
This error occurs because of a significant refactoring in LlamaIndex v0.10 and later, where core modules were moved under the `llama_index.core` namespace.
fixUpdate your import statements to use `llama_index.core` for core components. For example, change `from llama_index.query_engine import RetrieverQueryEngine` to `from llama_index.core.query_engine import RetrieverQueryEngine`.
ImportError: cannot import name 'ServiceContext' from 'llama_index.core'
The `ServiceContext` abstraction was deprecated in LlamaIndex v0.10.0 and replaced by a more modular `Settings` object for global configurations, or by directly passing parameters.
fixRemove `ServiceContext` and instead configure LLMs, embedding models, etc., using the global `Settings` object or by passing them directly to the relevant LlamaIndex components. For example, use `from llama_index.core import Settings` and then `Settings.llm = OpenAI()` instead of `ServiceContext.from_defaults(llm=OpenAI())`.
ModuleNotFoundError: No module named 'llama_index.llms.huggingface'
With LlamaIndex v0.10.0 and above, integrations like LLMs, embedding models, and vector stores were split into separate PyPI packages. This error indicates that the specific integration package is not installed.
fixInstall the specific integration package using pip. For HuggingFace LLMs, run `pip install llama-index-llms-huggingface`. The general pattern is `pip install llama-index-llms-<provider>`, `llama-index-embeddings-<provider>`, or `llama-index-vector-stores-<provider>`.
AttributeError: module 'llama_index' has no attribute '__version__'
This error typically arises when an older part of your code or an integrated library attempts to access `__version__` directly from the top-level `llama_index` module, but in newer versions (v0.10.x and later), this attribute might have moved, for instance, to `llama_index.core.__version__` or is not exposed in the same way.
fixEnsure all `llamaindex` packages are updated to compatible versions. If you are integrating with other libraries, they may need to be updated to support the newer LlamaIndex package structure. Manually checking `llama_index.core.__version__` might reveal the version, but the underlying issue is often a version mismatch or an outdated dependency expecting the old structure.
ValueError: LLM must be a FunctionCallingLLM
This error occurs when an LlamaIndex agent workflow (like `AgentWorkflow`) requires an LLM with function calling capabilities, but the configured LLM does not expose the necessary `is_function_calling_model` metadata or does not implement the `FunctionCallingLLM` interface.
fixUse an LLM that explicitly supports function calling, such as OpenAI's models, or ensure your custom LLM implementation correctly sets `llm.metadata.is_function_calling_model = True` and provides the required function calling methods. Alternatively, if your LLM doesn't support function calling, consider using an agent that doesn't require this capability (e.g., a ReAct agent instead of a FunctionAgent in some contexts).
Audit
Dependencies
llama-index-llms-openairequiredRequired for OpenAI LLM access. Not included in llama-index-core.
llama-index-embeddings-openairequiredRequired for OpenAI embeddings. Not included in llama-index-core.
llama-index-llms-anthropicoptionalRequired for Anthropic/Claude LLM access.