Same name, different library — and that's a good thing.
If you've been living under a rock: LlamaIndex 2.0 is not a polish job, it's an actual rewrite, and the API stopped looking like a rejected LangChain PR.
The Setup
The new install is leaner, the import paths are stable, and the class explosion has been replaced with composable primitives. Indexes, retrievers, and agents are still here — there's just three of each instead of thirty.
pip install llama-index
# core + most defaults, no 12-package side questThe Money Pattern
The new Workflow API is the headline feature. Define steps as async functions, wire them with events, and you get a typed graph instead of a chain. It looks like normal Python, which is the highest compliment.
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.core.workflow import Workflow, step, Event, StartEvent, StopEvent
docs = SimpleDirectoryReader("./claims").load_data()
index = VectorStoreIndex.from_documents(docs)
qa = index.as_query_engine()
class TriageEvent(Event):
summary: str
class ClaimsFlow(Workflow):
@step
async def summarise(self, ev: StartEvent) -> TriageEvent:
res = await qa.aquery(f"Summarise claim {ev.claim_id}")
return TriageEvent(summary=str(res))
@step
async def decide(self, ev: TriageEvent) -> StopEvent:
return StopEvent(result={"summary": ev.summary})
flow = ClaimsFlow(timeout=30)
out = await flow.run(claim_id="4821")
print(out)The Catch
Migration from 0.x is bumpy. Some integrations got renamed, some got merged into core, and a few got quietly dropped. If you've got a big v0.10 codebase, budget a real day for the upgrade, not "fifteen minutes during standup."
The Verdict
LlamaIndex spent a year being mocked for LangChain energy and came back with the cleanest agent framework in Python. Workflows are how you should be writing this stuff. Do not @ me.