Full-Code · Orchestration Frameworksactive

Haystack

Type: full-code  ·  Vendor: deepset  ·  Language: Python  ·  License: Apache-2.0  ·  Status: active  ·  Status in practice: mature

Links: homepage docs repo

Build production-ready LLM applications — RAG, agents, and multimodal search — as explicit pipelines of typed Components with a tool-using Agent at the top.

Description. Haystack is deepset's open-source orchestration framework for retrieval-augmented and agentic LLM applications. Its core abstractions are Components (typed building blocks) wired into Pipelines, with an Agent component that runs a tool-calling loop over chat-based LLMs. Tools include Tool, ComponentTool, PipelineTool, MCPTool, and MCPToolset, so a Haystack agent can call other pipelines, MCP servers, or arbitrary Python functions. Haystack ships first-class hybrid retrieval (BM25 + dense) backends for Weaviate, OpenSearch, Azure AI Search, and an in-memory store; cross-encoder rerankers; and Hayhooks for exposing pipelines as REST or MCP servers.

Agent loop shape. Pipeline-of-components topped by a loop-based Agent. The Agent component takes a chat-based LLM and a list of Tools (Tool, ComponentTool, PipelineTool, MCPTool, Toolset, MCPToolset, SearchableToolset) and iterates: call LLM, dispatch any tool calls, update state, repeat until an exit condition (text reply with no tool call, or a named tool being executed) or max_agent_steps is reached.

Primary use cases

  • production RAG over millions of documents
  • tool-using agents with explicit retrieval and routing
  • hybrid (BM25 + dense) search pipelines with reranking
  • agents exposed as MCP servers via Hayhooks

Key concepts

  • Component / Pipeline (docs)Components are typed building blocks; Pipelines connect their outputs to compatible inputs to form a graph.
  • Agent react (docs)Tool-using loop component that drives a chat-based LLM through tool calls until an exit condition fires or max_agent_steps is hit.
  • MCPTool / MCPToolset mcp (docs)Connects to external MCP servers over Streamable HTTP, SSE, or StdIO and exposes them to the Agent as tools.
  • Hybrid retrievers hybrid-search (docs)First-class BM25 + dense embedding retrievers for Weaviate, OpenSearch, Azure AI Search, and in-memory stores; results merged via RRF.
  • max_agent_steps + exit conditions step-budget (docs)Agent iteration is bounded by max_agent_steps (default 100) and a list of exit conditions (e.g. 'text' or a tool name).
  • Hayhooks (docs)Serves Haystack pipelines as REST APIs or MCP servers.

Patterns this full-code implements

Neighbourhood

Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.