LlamaIndex agents are language-model-powered assistants that use tools to complete tasks over your own data, from answering questions over your documents to taking actions in other systems. LlamaIndex is an open-source framework that started life as a tool for retrieval-augmented generation, or RAG, and has grown into a full toolkit for data-aware agents. The short answer is that LlamaIndex agents are the right choice when your agent’s value comes from knowing your documents, not just from reasoning well.
This guide explains what LlamaIndex agents are, how they relate to indexes, query engines and workflows, and when to choose LlamaIndex over a general-purpose agent framework.
Key takeaways
- LlamaIndex is an open-source framework for connecting language models to your own data, originally focused on RAG.
- Agents in LlamaIndex choose and call tools, including query engines that search your documents.
- Workflows are event-driven, multi-step processes that combine agents, data connectors and tools.
- The framework is MIT-licensed, with Python and TypeScript versions and a large catalogue of integrations.
- LlamaIndex is strongest when the agent must ground its answers in private documents and data.
What LlamaIndex is
LlamaIndex is an open-source framework and a broader ecosystem of tools for building AI applications that work with documents and private data. It was started by Jerry Liu in November 2022 under the name GPT Index, while he was experimenting with ways to give GPT-3 access to more text than fit in its prompt. It was renamed LlamaIndex in early 2023.
At its core, LlamaIndex connects language models to documents and private data through context augmentation — supplying external information to the model at inference time rather than retraining it. The framework addresses a basic limitation of language models: although they are trained on large public datasets, their weights do not contain your organisation’s private data or information created after training.
LlamaIndex provides the mechanisms for supplying that information at inference time: ingesting documents, parsing them into a format models can reason over, and retrieving the most relevant content at query time. That pipeline is what makes LlamaIndex agents different from agents built on a general framework.
How LlamaIndex agents work
An agent in LlamaIndex is a model that chooses and calls tools to complete a task. A RAG pipeline is one of many tools an agent can call. An agent might use several query engines as tools — one per document collection — plus a SQL tool for structured data, and decide for itself which to call, read the results, and continue.
That design is what makes the agents data-aware. A general agent framework gives you coordination and leaves the data layer to you. LlamaIndex gives you the data layer first: documents, nodes, indexes and query engines, with agents built on top. If your agent’s hardest problem is finding the right information, that ordering matters.
The framework is built from composable parts. The high-level API gets you from documents to answers in a few lines; the lower-level API lets you customise or replace any part of it. That composability is also why LlamaIndex works well as a component inside larger systems, not only as a standalone framework.
Core building blocks: documents, indexes and query engines
Understanding LlamaIndex agents means understanding the pieces they stand on. Data ingested from any source — PDFs, APIs, SQL databases, Markdown files, images — is loaded as Document objects. Documents are split into nodes, which are chunks with metadata, and nodes are organised into index structures.
The most common index is a VectorStoreIndex, which enables semantic retrieval: search based on meaning rather than keyword matching. LlamaIndex supports multiple index types suited to different querying strategies, including vector store, summary and knowledge graph indexes. Choosing the right index type is one of the most consequential decisions in a LlamaIndex project.
Query engines accept natural language queries and return context-rich responses by retrieving the most relevant nodes and combining them with the model’s prompt. Chat engines add conversation history on top of query engines. An agent treats these query engines as tools, calling them when a question needs grounded information and using other tools when the task needs something else.
Workflows: event-driven orchestration
Workflows are the framework’s way of organising multi-step processes. A workflow is created by defining steps that are triggered by events, and each step emits events that trigger further steps. That event-driven design gives you branching, loops, retries and human-in-the-loop review, and workflows can be deployed as services.
Workflows strike a balance between the autonomy of agents and control over the overall process. An agent can decide which tool to call, while the workflow decides the shape of the process around it. Steps communicate through type-safe events, and built-in state management means every step has access to shared context.
That balance is the practical answer to a common tension in agent design. Pure agents are flexible but hard to predict. Pure pipelines are predictable but rigid. A workflow with agents inside it gives you both: the agent handles the parts that need judgement, and the workflow handles the parts that need structure. For more on that tension, see our guide to how to coordinate multiple agents without chaos.

LlamaIndex agents at a glance
| Dimension | LlamaIndex | What it means in practice |
|---|---|---|
| Started | November 2022 as GPT Index; renamed early 2023 | One of the oldest RAG frameworks, with a mature ecosystem |
| Licence | MIT | Open source, free to self-host and extend |
| Languages | Python and TypeScript | Core lives in llama-index-core; integrations are separate packages |
| Core strength | Connecting models to private data | Documents, parsing, indexing and retrieval are first-class |
| Agents | Models that choose and call tools | Query engines, SQL tools and APIs are all usable as tools |
| Workflows | Event-driven steps triggered by events | Branching, loops, retries and human review |
| Integrations | Large catalogue through LlamaHub | Model providers, embedding models, vector stores, data connectors |
| Document parsing | LlamaParse for complex PDFs; LiteParse for local parsing | Parsing quality decides answer quality |
| Best fit | Question answering over company documents | Assistants that read contracts, reports and knowledge bases |
Where LlamaIndex agents fit
LlamaIndex agents fit anywhere the answer lives in your data. Common uses include question-answering systems over company documents, assistants that read contracts or reports, and agents that combine document search with database queries. A support agent that answers from the product manual, a legal assistant that reads clauses, and a research agent that synthesises internal reports are all natural LlamaIndex applications.
The framework is also a good fit when retrieval quality is the bottleneck. If your agent gives wrong answers because it retrieves the wrong documents, no amount of prompt engineering will fix it — you need better parsing, chunking, indexing and retrieval. That is exactly what LlamaIndex is built to improve.
Parsing: the step that decides quality
The quality of what goes into your index decides the quality of every answer. For clean text, the framework’s built-in readers are fine. For scanned PDFs, forms, spreadsheets and slide decks, you need a serious parser. LlamaParse is the company’s enterprise platform for agentic OCR and document processing, handling parsing, extraction, indexing and agent deployment. LiteParse is a standalone local parser built in Rust for fast, lightweight, on-device parsing.
This is the step teams most often underinvest in. They spend weeks tuning prompts and retrieval settings, then discover that the real problem is that tables were mangled on ingest or that scanned pages were never read at all. Test your parsing on your worst documents first, not your cleanest ones.
Version 0.10 of the framework, released in early 2024, split the code into a small core package and many separate integration packages. That modularity means you install only what you need, but it also means you should pin your versions and check compatibility when you upgrade.
Building a LlamaIndex agent: the practical path
Best for LlamaIndex agents: teams whose agents must answer from private documents, with retrieval quality as the main risk and the data pipeline as the main work.
The practical path has six steps. First, load your documents from their sources. Second, parse them properly, with a parser matched to the document type. Third, split them into nodes with useful metadata. Fourth, create embeddings and store them in an index. Fifth, build a query engine and test retrieval quality on real questions. Sixth, wrap the query engine as a tool in an agent, and add other tools — SQL, APIs, web search — as the task requires. If you are new to agents in general, start with our explainer on AI agents and how autonomous software actually gets work done.
Do not skip step five. Retrieval quality is measurable: for a set of test questions, check whether the right documents were retrieved before you judge the final answer. If retrieval is wrong, fix the index. If retrieval is right but the answer is wrong, fix the prompt or the model. That separation saves hours of confused debugging.
Decision checklist: should you use LlamaIndex agents?
Work through this checklist before you commit.
- Does the agent’s value come from your documents and private data? If yes, LlamaIndex is a strong fit.
- Are your documents messy — scanned PDFs, tables, forms, slide decks? Budget for serious parsing.
- Do you need agents that combine document search with database queries and API calls? LlamaIndex agents treat all of these as tools.
- Do you need event-driven workflows with branching, retries and human review? LlamaIndex Workflows cover that.
- Is retrieval quality your main risk? Measure it with test questions before you tune prompts.
- Are you already using LangChain or another framework? LlamaIndex can supply the data layer as a component.
- Do you need TypeScript support? LlamaIndex has a TypeScript version alongside Python.
- Have you planned how to keep the index fresh as documents change? A stale index gives stale answers.
Common mistakes to avoid
The most common mistake is treating RAG as a solved problem and moving straight to agents. Retrieval is the foundation, and a weak foundation makes every agent built on it unreliable. Measure retrieval before you add agent complexity.
Another mistake is chunking without metadata. Nodes without source, date and section information are hard to filter, hard to cite and hard to debug. Add metadata at ingest time, when it is cheap, rather than trying to recover it later.
Frequently asked questions
What are LlamaIndex agents?
LlamaIndex agents are language-model-powered assistants that use tools to complete tasks over your own data. A RAG pipeline is one of many tools an agent can call, alongside SQL tools, APIs and other data sources.
Is LlamaIndex only for RAG?
No, though RAG is where it started. LlamaIndex began as a data framework for retrieval-augmented generation and has grown to include agents and event-driven workflows, so it now covers the full path from documents to agentic applications.
What is the difference between a query engine and an agent in LlamaIndex?
A query engine answers a question by retrieving relevant nodes and synthesising a response. An agent decides which tools to call — including query engines — reads their results, and continues until the task is done.
What are LlamaIndex Workflows?
Workflows are event-driven, multi-step processes in which steps are triggered by events and emit events that trigger further steps. They support branching, loops, retries and human-in-the-loop review, and can be deployed as services.
What is LlamaParse?
LlamaParse is LlamaIndex’s enterprise platform for agentic OCR and document parsing, handling complex PDFs with tables and charts, plus extraction, classification and managed retrieval. LiteParse is a free local parser for on-device use.
Is LlamaIndex free?
The LlamaIndex framework is open source under the MIT licence and free to use. The company also offers commercial services, including the LlamaParse parsing platform and hosted retrieval, for teams that need them.







