Favicon of Haystack

Haystack

An open-source Python framework for self-hosted AI agents and document search, with local model support and an Apache 2.0 license.

Screenshot of Haystack website

Haystack is a Python framework for developers building AI agents, document search and applications that answer questions using their own data. Its pipelines give teams control over the information a model receives and the steps that produce an answer.

  • Document retrieval: Combine indexing, ranking and filtering with generation, including hybrid search and flows that revisit an answer to correct it.
  • Agent workflows: Build tool-calling agents with memory, branches and loops, concurrent tool execution and hooks for custom checks.
  • Model and search integrations: Use local models or providers such as OpenAI, Anthropic, Mistral and Hugging Face, alongside search systems including Weaviate, Pinecone and Elasticsearch.
  • Interactive and multimodal apps: Stream responses, process images and transcribe audio, with evaluation components and usage tracking.
  • Application endpoints: Hayhooks can expose pipelines as REST APIs, MCP servers or OpenAI-compatible chat endpoints for interfaces such as Open WebUI.

Haystack is open source under Apache 2.0 and supports deployment on your own infrastructure, including Docker and Kubernetes. Cloud model requests go to the selected provider. A separate enterprise platform offers visual pipeline design, access controls and auditability, with managed cloud and self-hosted deployment. The framework collects anonymous component usage telemetry and allows users to opt out.

Similar to Haystack