Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · AI & Machine LearningFree

Haystack Documentation

The official docs for Haystack, deepset's open-source Python framework for production RAG, agents and multimodal search. You build explicit pipelines from components that run the same way every time, or hand control to an agent when you need flexibility. Model-agnostic and Apache 2.0.

GitHub stars

26.7k (deepset-ai/haystack)

GitHub · Oct 2026

Licence

Apache 2.0

GitHub · Oct 2026

Format

Guide

Topic

AI & Machine Learning

Provider

deepset

Time needed

A weekend for the core guides

Level

Intermediate

Access

Free

What Haystack is

Haystack is an open-source AI orchestration framework from deepset for building production-ready agents, RAG applications and multimodal search. It has been around since before the current wave of LLM apps and has a reputation for explicit, predictable designs.

Pipelines and agents

Haystack's central idea is the distinction between two ways of building:

  • Pipelines are graphs you construct yourself from components (retrievers, rankers, prompt builders, generators, converters). They run the same way every time, which makes them easy to test, debug and reason about.
  • Agents hand step-by-step control to the model, trading that predictability for the ability to handle requests you did not plan for.

This is a useful mental model even if you never use Haystack: most production AI features are better as fixed pipelines, with agents reserved for the open-ended parts.

Model-agnostic

Haystack is modular, so you can combine models from OpenAI, Google, Anthropic and open-source projects such as Hugging Face Transformers, along with many document stores and vector databases. That makes it a good fit when you want to compare models or avoid depending on one provider.

Versions

The docs list version 3.3 as current as of October 2026, with older 2.x and 3.x docs still available. Install it with pip install haystack-ai. Check you are reading the docs for the version you installed.

When to choose it

Choose Haystack when you want clear, testable RAG and search pipelines, value predictability over agent autonomy, or plan to run in production with tracing and evaluation. deepset also offers a paid enterprise platform on top, which you do not need to learn the framework.

Prerequisites and time

Comfortable Python and the basics of embeddings, retrieval and model APIs. The core guides and a first pipeline take a weekend.

Free or paid?

The framework is free and open source under the Apache 2.0 licence.

Common questions

Pipeline or agent? Start with a pipeline. If users keep asking for things your fixed steps cannot handle, add an agent for that part only.

Best for: developers who prefer explicit, predictable pipelines for RAG and search, with agents only where needed.

aillmragpythonopen source

Ready to start?

Opens on deepset in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Haystack Documentation". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.