deepset-ai/haystack

Pythonhaystack.deepset.ai

Open-source AI orchestration framework for building context-engineered, production-ready LLM applications. Design modular pipelines and agent workflows with explicit control over retrieval, routing, memory, and generation. Built for scalable agents, RAG, multimodal applications, semantic search, and conversational systems.

semantic-searchinformation-retrievalaipythonlarge-language-modelsgenerative-aillmragretrieval-augmented-generationagentsorchestrationagent-framework
Crescimento de estrelas
Estrelas
26.4k
Forks
3.1k
Crescimento semanal
+69
Issues
74
10k20k
nov. de 2019fev. de 2022mai. de 2024set. de 2026
ArtefatosPyPI
README
Blue banner with the Haystack logo and the text ‘haystack by deepset – The Open Source AI Framework for Production Ready RAG & Agents’ surrounded by abstract icons representing search, documents, agents, pipelines, and cloud systems.
CI/CD Tests types - Mypy Coverage badge Ruff
Docs Website
Package PyPI PyPI - Downloads PyPI - Python Version Conda Version GitHub License Compliance HVTrust Evidence Grade OpenSSF Best Practices
Meta Discord Twitter Follow

🎉🎊✨   Haystack 3.0 is out!   ✨🎊🎉

Read the announcement here!

🥳 🎈 🎆 🪅 🎇 🍾 🥂 🎁 🌈

Haystack is an open-source AI orchestration framework for building production-ready LLM applications in Python.

Design modular pipelines and agent workflows with explicit control over retrieval, routing, memory, and generation. Build scalable RAG systems, multimodal applications, semantic search, question answering, and autonomous agents, all in a transparent architecture that lets you experiment, customize deeply, and deploy with confidence.

Table of Contents

Installation

The simplest way to get Haystack is via pip:

pip install haystack-ai

Install nightly pre-releases to try the newest features:

pip install --pre haystack-ai

Haystack supports multiple installation methods, including Docker images. For a comprehensive guide, please refer to the documentation.

Documentation

If you're new to the project, check out "What is Haystack?" then go through the "Get Started Guide" and build your first LLM application in a matter of minutes. Keep learning with the tutorials. For more advanced use cases, or just to get some inspiration, you can browse our Haystack recipes in the Cookbook.

At any given point, hit the documentation to learn more about Haystack, what it can do for you, and the technology behind.

Features

Agents built for production
Extend agent behavior with lifecycle hooks (before_llm, before_tool, on_exit, …) for guardrails and custom logic, and track step_count, token_usage, and tool calls out of the box for monitoring and cost control. Get started fast with ready-made agents from Agent Pack (e.g., a deep research agent, or an advanced RAG agent) or give your own agents progressive skill discovery via SkillToolset, so skill descriptions only enter context when needed.

Built for context engineering
Design flexible systems with explicit control over how information is retrieved, ranked, filtered, combined, structured, and routed before it reaches the model. Define pipelines and agent workflows where retrieval, memory, tools, and generation are transparent and traceable.

Native Async Support
One Pipeline runs synchronously or asynchronously and streams token by token. Agent can run concurrent tool calls.

Modular and customizable
Use built-in components for retrieval, indexing, tool calling, memory, and evaluation, or create your own. Add loops, branches, and conditional logic to precisely control how context moves through your pipelines and agent workflows.

Model- and vendor-agnostic
Integrate with OpenAI, Mistral, Anthropic, Cohere, Hugging Face, Google, Azure OpenAI, AWS Bedrock, local models, and many others. Swap models or infrastructure components without rewriting your system.

Extensible ecosystem
Build and share custom components through a consistent interface that makes it easy for the community and third parties to extend Haystack and contribute to an open ecosystem.

[!TIP]

Would you like to deploy and serve Haystack pipelines as REST APIs or MCP servers? Hayhooks provides a simple way for you to wrap pipelines and agents with custom logic and expose them through HTTP endpoints or MCP. It also supports OpenAI-compatible chat completion endpoints and works with chat UIs like open-webui.

Haystack Enterprise: Support & Platform

Get expert support from the Haystack team, build faster with enterprise-grade templates, and scale securely with deployment guides for cloud and on-prem environments with Haystack Enterprise Starter. Read more about it in the announcement post.

👉 Get Haystack Enterprise Starter

Need a managed production setup for Haystack? The Haystack Enterprise Platform helps you build, test, deploy and operate Haystack pipelines with built-in observability, collaboration, governance, and access controls. It’s available as a managed cloud service or as a self-hosted solution.

👉 Learn more about Haystack Enterprise Platform or try it free

Telemetry

Haystack collects anonymous usage statistics of pipeline components. We receive an event every time these components are initialized. This way, we know which components are most relevant to our community.

Read more about telemetry in Haystack or how you can opt out in Haystack docs.

🖖 Community

If you have a feature request or a bug report, feel free to open an issue in GitHub. We regularly check these, so you can expect a quick response. If you'd like to discuss a topic or get more general advice on how to make Haystack work for your project, you can start a thread in Github Discussions or our Discord channel. We also check 𝕏 (Twitter) and Stack Overflow.

Contributing to Haystack

We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature! You don't need to be a Haystack expert to provide meaningful improvements. To learn how to get started, check out our Contributor Guidelines first.

There are several ways you can contribute to Haystack:

[!TIP] 👉 Check out the full list of issues that are open to contributions

Organizations using Haystack

Haystack is used by thousands of teams building production AI systems across industries, including:

Are you also using Haystack? Open a PR or tell us your story

Repositórios relacionados
microsoft/generative-ai-for-beginners

21 Lessons, Get Started Building with Generative AI

Jupyter NotebooktutorialMIT Licenseaichatgpt
119.3k62.8k
meilisearch/meilisearch

A lightning-fast search engine API bringing AI-powered hybrid search to your sites and applications.

Rustcrates.iolibraryOthersearch-enginetypo-tolerance
meilisearch.com
59.2k2.7k
khoj-ai/khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (gpt, claude, gemini, llama, qwen, mistral). Get started - free.

PythonPyPIGNU Affero General Public License v3.0semantic-searchemacs
khoj.dev
37.2k2.5k
NirDiamant/RAG_Techniques

This repository showcases various advanced techniques for Retrieval-Augmented Generation (RAG) systems. Each technique has a detailed notebook tutorial.

Jupyter NotebooktutorialOtherragtutorials
diamant-ai.com
29.4k3.6k
typesense/typesense

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

C++GNU General Public License v3.0search-enginesearch
typesense.org
26.5k970
Tencent/WeKnora

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

GoGo ModulesOtheragentagentic
weknora.weixin.qq.com
21.6k3.1k
arc53/DocsGPT

Private AI platform for agents, assistants and enterprise search. Built-in Agent Builder, Deep research, Document analysis, Multi-model support, and API connectivity for agents.

PythonPyPIMIT Licenseaipython
app.docsgpt.cloud
18.2k2.1k
weaviate/weaviate

Weaviate is an open-source vector database that stores both objects and vectors, allowing for the combination of vector search with structured filtering with the fault tolerance and scalability of a cloud-native database​.

GoGo ModulesBSD 3-Clause "New" or "Revised" Licensesearch-enginesemantic-search
weaviate.io/developers/weaviate/
16.8k1.4k
memvid/memvid

Memory layer for AI Agents. Replace complex RAG pipelines with a serverless, single-file memory layer. Give your agents instant retrieval and long-term memory.

Rustcrates.ioApache License 2.0aicontext
memvid.com
16.5k1.4k
alibaba/zvec

A lightweight, lightning-fast, in-process vector database

C++skillApache License 2.0ragagent-skills
zvec.org
15.8k992
neuml/txtai

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

PythonPyPIApache License 2.0pythonsearch
neuml.github.io/txtai
12.9k890
zilliztech/claude-context

Code search MCP for Claude Code. Make entire codebase the context for any coding agent.

TypeScriptnpmMIT Licenseagentagentic-rag
github.com/zilliztech/claude-context/tree/master/docs
12.5k921