# Haystack

An open-source Python framework for orchestrating LLM applications, with modular pipelines and agent workflows that give explicit control over retrieval, routing, memory and generation.

Haystack is an open-source AI orchestration framework for building production-ready LLM applications in Python. It lets a developer design modular pipelines and agent workflows with explicit control over retrieval, routing, memory and generation.

It is used to build retrieval-augmented generation systems, multimodal applications, semantic search, question answering and autonomous agents, in an architecture meant to be inspected, customized and deployed with confidence. Agents built with Haystack support lifecycle hooks such as before_llm, before_tool and on_exit for guardrails and custom logic, and track step count, token usage and tool calls for monitoring and cost control.

It installs from PyPI with pip, including a nightly pre-release channel, and also supports Docker-based installation. A separate paid Haystack Enterprise offering adds support and a platform on top of the open-source framework.

Website: https://haystack.deepset.ai
