Haystack vs LlamaIndex

Both are Python frameworks that grew from retrieval into agents. Haystack builds everything from typed components wired into pipelines, with an Agent component and coordinator-plus-specialist multi-agent setups. LlamaIndex builds agents on event-driven Workflows, with AgentWorkflow handoffs between agents. Haystack favors explicit data flow; LlamaIndex favors handoff-style agent teams and a large integration catalog.

Facts side by side

Haystack vs LlamaIndex. Data as of 2026-10-04.
Fact Haystack LlamaIndex
Type Framework Framework
Languages / SDKs Python Python
License Apache-2.0 MIT
Pricing model Open core Open core
Orchestration pattern Supervisor Handoff
GitHub stars 26,647 (as of 2026-10-04) 52,398 (as of 2026-10-04)
GitHub forks 3,228 8,274
Last push 2026-10-02 2026-10-01
Latest release v3.3.0 v0.14.25
Repository deepset-ai/haystack run-llama/llama_index
Website haystack.deepset.ai developers.llamaindex.ai
Documentation docs.haystack.deepset.ai developers.llamaindex.ai
Last verified 2026-09-30 2026-09-30
MCP support Yes (checked 2026-09-30) Yes (checked 2026-09-30)
A2A support Unknown (checked 2026-09-30) Unknown (checked 2026-09-30)
AG-UI support Unknown (checked 2026-09-30) Yes (checked 2026-09-30)
Install verified Not yet 2026-09-30

Choose Haystack if

  • You want explicit, inspectable pipelines where retrieval, routing and generation are separate components, serializable to YAML.
  • You need tool-level human review with confirm, reject and modify (ConfirmationHook).
  • You want to serve pipelines as REST, OpenAI-compatible or MCP endpoints with Hayhooks.

Choose LlamaIndex if

  • You want agents that hand off to each other (AgentWorkflow with can_handoff_to).
  • You need AG-UI: LlamaIndex ships a first-party llama-index-protocols-ag-ui package; no AG-UI evidence was found for Haystack.
  • You want run state in a serializable Context that can be stored and restored between runs.

Migration notes

A Haystack Agent with tools maps to a LlamaIndex FunctionAgent. Haystack's coordinator pattern (specialists wrapped with AgentTool) maps to LlamaIndex's orchestrator pattern (sub-agents as tools); LlamaIndex handoffs have no direct Haystack equivalent. Haystack pipelines map to LlamaIndex Workflows, but the model differs: typed component sockets versus events passed between async steps. Human review moves between ConfirmationHook on before_tool and ctx.wait_for_event(HumanResponseEvent, ...) inside a tool. Points to check: Haystack 3.0 removed agent-level breakpoints and several legacy classes; LlamaIndex's README says the company's primary focus has shifted to LlamaParse, and LlamaIndex.TS is deprecated and archived. Both need separate packages for MCP (mcp-haystack, llama-index-tools-mcp).

FAQ

Which is better for RAG plus agents?

Both cover it. Haystack expresses RAG as explicit pipelines that an agent can sit inside; LlamaIndex has a large catalog of data integrations (the README counts over 300 packages) and agents built on Workflows.

Do both support MCP?

Yes, in both directions: each can consume MCP servers as tools and publish pipelines or workflows as MCP servers.

Is there a TypeScript version?

Not currently maintained for either: Haystack is Python only, and LlamaIndex.TS is deprecated and archived.