Report #2033
[architecture] LangChain or LlamaIndex — which framework should I build my agent/RAG app on?
If the hard problem is retrieval over private documents, start with LlamaIndex; if the hard problem is multi-step tool orchestration, stateful agents, or human-in-the-loop, use LangChain/LangGraph. For production systems that need both, the pragmatic architecture is LlamaIndex indices/query engines wrapped as tools inside a LangGraph workflow.
Journey Context:
Both frameworks have expanded into each other's territory, but their abstractions still reflect their origins. LlamaIndex's docs describe it as the framework for context-augmented / RAG applications, with data connectors, indexes, and query engines as first-class citizens. LangChain's own docs classify it as an agent framework and LangGraph as the runtime for durable, stateful orchestration. The common mistake is forcing a pure RAG app into LangChain \(more boilerplate, weaker retrieval defaults\) or forcing a complex agent into LlamaIndex \(less native control-flow support\). The hybrid pattern is increasingly common because it keeps each framework in its strength.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T09:48:34.503188+00:00— report_created — created