Open-source AI orchestration framework for building production-ready LLM applications in Python
open coreApache-2.0self-hostablefree
Haystack is deepset's Apache-2.0 Python framework for building RAG systems, semantic search, question answering and agents from components wired into pipelines, with loops, branches and conditional routing, which you can save to and load from YAML. Its components cover document converters and preprocessors, retrievers for keyword, embedding and (on OpenSearch, Weaviate, Qdrant and others) hybrid search, rankers, generators for OpenAI, Anthropic, Mistral, Cohere, Hugging Face, Bedrock and local models, and evaluators from exact match, MRR and NDCG to LLM-judged faithfulness. Agents run inside pipelines or call pipelines as tools, with lifecycle hooks, MCP tools and progressive skill discovery, and Hayhooks serves a pipeline or agent as a REST API, an OpenAI-compatible endpoint or an MCP server. deepset sells Haystack Enterprise Starter (support, tested templates and deployment guides) and the Haystack Enterprise Platform, a managed or self-hosted platform for building, deploying and monitoring Haystack pipelines.
Problems it solves
- build a question answering system over our documents where I control every retrieval and ranking step
- combine BM25 keyword search and embedding search for document retrieval, then rerank the results
- save my retrieval pipeline as a YAML file so it can be versioned and loaded in production
- evaluate my RAG pipeline's document recall, MRR and answer faithfulness on a labelled question set
- switch my document store from Elasticsearch to Qdrant without rewriting the rest of my LLM pipeline
- serve a search or RAG pipeline as a REST API or an MCP server without writing a web service
- add a reranking step between retrieval and the LLM to improve the answers my RAG app gives
- convert PDFs, Word files and HTML into clean chunks for indexing in a Python pipeline
- a Python LLM framework whose makers sell enterprise support with direct access to the core engineers
- let an agent call a retrieval pipeline as one of its tools, or run an agent as one step of a pipeline
- hook guardrails in before each LLM call and track token usage and tool calls of my agent
- route each query to a different retriever or model depending on what kind of question it is
- a managed platform with a visual pipeline builder to deploy and monitor our RAG application
- an LLM orchestration platform with SOC 2 Type II and ISO 27001 we can also self-host
Features
- pipelines of components with loops, branches and conditional routing, sync or async, with token streaming
- pipeline serialization to and from YAML
- document stores including OpenSearch, Elasticsearch, Weaviate, Qdrant, pgvector, Azure AI Search, Solr, Chroma, Pinecone and in-memory
- retrievers for BM25, embedding, sparse embedding and hybrid search, depending on the store
- converters, preprocessors, embedders, rankers and generators for OpenAI, Anthropic, Mistral, Cohere, Hugging Face, Google, Azure OpenAI, AWS Bedrock and local models
- Agent component with lifecycle hooks (before_llm, before_tool, on_exit), step and token counts, and concurrent tool calls
- Agent Pack of ready-made agents and SkillToolset for progressive skill discovery
- MCPTool (mcp-haystack) for tools from MCP servers over Streamable HTTP or stdio
- evaluators: exact match, document MRR, MAP, NDCG and recall, SAS, context relevance, faithfulness, LLM evaluator; Ragas and DeepEval integrations
- Hayhooks: serve pipelines and agents as REST APIs, OpenAI-compatible chat endpoints or MCP servers
View 2 more
- tracing and logging for production use
- Haystack Enterprise Platform: pipeline builder, playground, deployment with autoscaling, monitoring, collaboration and access control, in deepset's cloud or self-hosted
Ways to run it
Haystack
You arrange
- Python and the LLM and embedding providers you call
- a document store (OpenSearch, Qdrant, pgvector or another)
- serving, for example with Hayhooks or your own web service
Haystack Enterprise Starter
not published; contact deepset3
Only in this edition
- private support with up to 4 hours of remote consultation and an email channel to core engineers
- extended version support for up to 6 months
- tested pipeline templates for RAG, agents and visual data
- deployment guides for AWS, Azure, GCP and on-prem with autoscaling
You arrange
- your own infrastructure
Haystack Enterprise Platform
Studio $0 (1 user, 100 pipeline hours, 50 files, 2 development pipelines); Enterprise custom45
Only in this edition
- pipeline builder and playground
- deployments with autoscaling and zero-downtime updates
- automatic tracing and monitoring dashboards
- SSO and access controls
- managed cloud or self-hosted
Capabilities
| Takes plugins | plan not known |
|---|
Alternatives
The same job
These do what Haystack does.
- R2R Agentic Retrieval-Augmented Generation (RAG) with a RESTful API
- LlamaIndex A Python toolkit for building LLM-powered agents over your data
- LangChain A framework for building agents and LLM-powered applications
- LangGraph Low-level orchestration framework for building stateful agents
- Dify Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace
- Semantic Kernel Model-agnostic SDK for building AI agents and multi-agent systems in C#, Python and Java
