Beyond retrieval, LlamaIndex builds agents that reason over your data and Workflows that orchestrate multi-step processes. A LlamaIndex agent wraps a…
See how LlamaIndex grows from retrieval into agents and orchestration.
LlamaIndex is best known for RAG, but a single retrieve-and-answer step isn't enough for harder questions — ones needing multiple lookups, comparisons across sources, or a sequence of reasoning steps. LlamaIndex extends into agents that reason over your data and Workflows that orchestrate multi-step processes.
The connecting idea is that your indexes become tools. Instead of the model answering from one retrieval, an agent can decide which index to query, look something up, reason about it, and query again — turning static retrieval into active, data-grounded reasoning.
Build agents whose tools are query engines over your indexes.
A LlamaIndex agent is a model equipped with tools and a loop that lets it decide which to call. The powerful move is exposing query engines — each backed by an index over some data — as tools. An agent can then have one tool for your product docs, another for financials, and pick the right one per question, or combine them.
It can also use ordinary function tools (a calculator, an API). The agent reasons, calls a data tool, reads the result, and continues, so multi-hop questions over multiple sources become tractable.
Orchestrate multi-step processes with events.
For explicit orchestration, LlamaIndex Workflows use an event-driven model. You define steps as functions, each of which listens for a type of event and, when it runs, emits new events that trigger other steps. The flow is the web of events between steps, not a hard-coded call order.
This is flexible: branches, loops, and parallel paths emerge from which events are emitted, so complex agentic pipelines — retrieve, grade, maybe re-retrieve, then synthesize — are expressed as steps reacting to events. It gives the control and inspectability that a single query engine call lacks.
Choose the right tool and avoid the common errors.
Choose by how much you want the model to decide. An agent is best when the path is open-ended and you want the model to choose its lookups and steps dynamically. A Workflow is best when you want explicit, controllable orchestration — defined steps and branches you can inspect and test — even if a step internally calls an agent or a query engine.
They compose: a Workflow can orchestrate agents and query engines as steps, giving you structure on the outside and flexibility within. Start with a simple query engine, move to an agent for dynamic multi-hop reasoning, and to a Workflow when you need explicit multi-step control.
Watch for: reaching for an agent when a single query engine answers the question (extra cost and unpredictability); vague tool descriptions so the agent picks the wrong index; no step limit on an agent loop; and building an elaborate Workflow for a linear task. Match the abstraction to the task's real complexity, and inspect what the agent retrieved when answers are wrong.
LlamaIndex extends beyond RAG into agents and Workflows. Agents wrap a model with tools — especially query engines over your indexes — so they can choose what to look up and reason across sources for multi-hop questions. Workflows use an event-driven model where steps emit and listen for events, giving explicit, inspectable orchestration with branches and loops. Choose an agent for dynamic paths, a Workflow for controllable multi-step processes, and compose them; match the abstraction to real complexity.
Design a LlamaIndex system that answers questions requiring both product docs and financial data, sometimes re-retrieving when confidence is low. Decide what becomes query-engine tools, whether an agent or a Workflow orchestrates it, and where a re-retrieval loop would live.
How does LlamaIndex extend beyond basic RAG?
LlamaIndex turns indexes into tools an agent can query dynamically and adds Workflows for explicit multi-step orchestration beyond one retrieval.
What makes LlamaIndex agents powerful for data questions?
Exposing per-index query engines as tools lets an agent handle multi-hop questions by selecting and combining data sources.
How do LlamaIndex Workflows define control flow?
Workflows are event-driven, giving flexible, inspectable orchestration where the flow is the pattern of events between steps.
When should you choose a Workflow over an agent?
Workflows give structure and control; agents give dynamic autonomy, and the two compose (a Workflow can orchestrate agents).