Favicon of Haystack

Haystack

An open-source Python AI framework for self-hosted 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 self-hosted AI agents, document search, and apps that answer questions using their own data. Its modular pipelines let teams control which information reaches a model and inspect how retrieval, memory, tools, and generation contribute to an answer. It's open source under Apache 2.0.

You can use local models or connect to services such as OpenAI, Anthropic, Mistral, and Hugging Face. Search integrations include Weaviate, Pinecone, and Elasticsearch. The framework supports Docker deployment and Kubernetes, so teams can run it on their own infrastructure or in the cloud. Choosing a cloud model provider sends model requests to that service.

Pipelines support branches, loops, and conditional routing, including hybrid retrieval and self-correction flows. Built-in components handle indexing, ranking, filtering, and evaluation; developers can also write their own. Agents support tool calling, concurrent tool execution, and hooks for custom checks. Streaming responses, logging, and usage tracking help teams build and monitor interactive applications. Image processing and audio transcription extend its scope beyond text.

Hayhooks can expose pipelines as REST APIs, MCP servers, or OpenAI-compatible chat endpoints for interfaces such as Open WebUI. A separate enterprise platform provides visual pipeline design, testing, access controls, and auditability, with managed cloud and self-hosted deployment options.

Haystack collects anonymous component usage telemetry and lets users opt out.

Similar to Haystack