← Back to Leaderboard
Hdeepset-ai

deepset-ai/haystack

Component-based Python orchestration for RAG pipelines and tool-using agents

Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated today
Latest Release
v3.5.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedAPI
Total Stars
★ 27,168
24h Growth
+7
7d Growth
+53
Forks
3,541

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

deepset-ai/haystack Star History (2020-01-12 - 2026-12-04) ALL-TIME STAR HISTORY (2020-01 – 2026-12) +27.2k in 2518d · avg +11/day 28.7k 14.3k 0 2020-01-12: ★ 122020-06-13: ★ 3212020-11-14: ★ 9502021-04-17: ★ 1,5372021-09-18: ★ 2,2682022-02-19: ★ 3,9402022-07-23: ★ 4,8222022-12-24: ★ 5,9422023-05-27: ★ 8,5542023-10-28: ★ 10,9142024-03-30: ★ 12,8852024-08-31: ★ 15,8442025-02-01: ★ 18,4562025-07-05: ★ 20,9932025-12-06: ★ 23,1862026-05-09: ★ 24,9332026-12-04: ★ 27,168 ★ 27.2k 2020-01 2023-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Haystack is an embeddable Python SDK with two execution abstractions. Pipeline connects components through named inputs and outputs, with branches and loops when the next step depends on a result. This makes it possible to keep ingestion and indexing separate from the query path, where retrieval, filtering, ranking, and generation can be tested independently. Agent handles workflows where the model selects tools at runtime.

The haystack-ai distribution targets Python 3.11 or newer and uses Hatchling for builds. Core code lives in haystack/, with sibling test/, e2e/, and examples/ directories. The component interface is the main extension boundary: custom code can adapt a converter, retriever, or model backend without replacing the workflow. The interface makes substitution possible, but does not guarantee equivalent outputs or behavior across backends.

Key Capabilities & Differentiators

Haystack covers indexing, retrieval, memory, generation, and evaluation. It supports synchronous and asynchronous pipeline execution and token streaming. Components can connect to hosted providers including OpenAI, Anthropic, Mistral, Google, Azure OpenAI, and AWS Bedrock, as well as local models. Text and image routing components in v3.5.0 provide concrete entry points for multimodal workflows.

Agents can run tool calls concurrently. Lifecycle hooks such as before_llm, before_tool, and on_exit let application code inspect or intervene at defined points. Built-in tracking of step_count, token_usage, and tool calls helps distinguish repeated model steps from tool fan-out. SkillToolset adds descriptions to the context only when needed. These features provide hooks and signals for policy and monitoring; they are not, by themselves, a security boundary or an operations stack.

Trade-offs & Limitations

Against a hand-written flow using provider SDKs, Haystack earns its place when teams need to test retrieval separately, change ranking without rewriting prompt assembly, or share routing logic across applications. For a stable retrieve-and-generate endpoint, a short Python implementation may be easier to own. Swapping a component also does not eliminate the need to validate score distributions, output schemas, or tool-call behavior.

Async execution overlaps I/O, but concurrency can amplify rate-limit pressure and the load on downstream tools. Set budgets for loops and tool fan-out, and exercise timeout and partial-failure paths before rollout. Compared with the separately offered Haystack Enterprise Platform, the Apache-2.0 SDK gives teams control over where and how they run workloads, but does not supply the platform's packaged governance, access controls, and operational tooling.

Hardware & Deployment Guide

Start with pip install haystack-ai on Python 3.11 or newer. Docker images are available and the repository contains docker/. The core is a library: to expose a self-hosted API, plan for a serving layer and its authentication, secrets, monitoring, and traffic controls. Hosted inference reduces local model-serving requirements but introduces network, quota, and data-handling constraints. Offline use requires locally available models and backends, an inventory of outbound integrations, and a telemetry decision.

In v3.5.0, OpenAIDecisionsTextRouter sends text to named outputs by label via the OpenAI Decisions API, adding a provider-specific option that should not be treated as offline-capable. The v2.31.1 security release raised the minimum versions to anyio>=4.14.2 and certifi>=2026.10.19. Check the resolved versions in the actual deployment image, especially when an existing lockfile pins transitive dependencies.

Execution: Pipeline supports synchronous and asynchronous runs, conditional branches, loops, and token streaming.
Context assembly: Retrieval, ranking, filtering, and routing can be separate components so their effects can be tested independently.
Agent policy: before_llm, before_tool, and on_exit provide extension points around model calls, tool calls, and agent exit.
Agent visibility: Built-in tracking covers step_count, token_usage, and tool calls; SkillToolset adds skill descriptions to context on demand.
Provider integration: Component interfaces support hosted models such as OpenAI, Anthropic, and AWS Bedrock alongside local models.
Release milestone: v3.5.0 adds OpenAI Decisions API routing, including OpenAIDecisionsTextRouter for dispatch by label.
Best For

Teams building RAG, search, or tool-using applications that need to tune retrieval and routing independently and retain control over model providers and deployment.

Skip If

A short, stable provider SDK flow is sufficient, or you need a ready-to-run API with governance and access controls rather than a library to embed.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPI
pip install haystack-ai

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
haystack ★27.2k+53PythonApache-2.0Component-based Python orchestration for RAG pipelines and tool-using agents
llama_index53.1k+104PythonMITA modular Python SDK for document ingestion, indexing, and RAG
langextract39.5k+85PythonApache-2.0Python SDK for extracting structured data with traceable source spans
llmware14.8k+8PythonApache-2.0Local-first Python RAG SDK for document retrieval and small-model inference.

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/deepset-ai/haystack.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

deepset-ai/haystack Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about haystack

How should I divide a workflow between Pipeline and Agent?

Use a Pipeline for steps whose order and branches you want to define, such as retrieval, filtering, reranking, and generation. Implement a custom component when a backend needs an adapter. Use an Agent where the model needs to choose tools at runtime, and enforce tool policy in hooks such as before_tool rather than relying on the model to follow a prompt.

Does Haystack need a GPU, and what should I size for?

An API-backed setup does not require a GPU for model inference on the Haystack host, but any local conversion, embedding, or reranking can still consume CPU, RAM, or accelerator capacity. For local models, size hardware around the model, serving backend, context length, and concurrency. Load-test the complete workflow, including concurrent tool calls, rather than estimating from the generator alone.

Can we self-host Haystack in a commercial or restricted environment?

Yes. The core is Apache-2.0, which permits commercial use and self-hosting subject to its terms, including applicable notice requirements on redistribution. Model, integration, and provider terms still need separate review. For restricted environments, opt out of usage telemetry and verify outbound connections from every component; running Haystack locally does not keep requests to hosted models on premises.

When is Haystack preferable to direct provider SDKs or a managed platform?

Choose Haystack when retrieval, routing, and generation need to be independently replaceable and testable. Direct SDK calls can be simpler for a short, stable flow. If the deciding factor is turnkey governance or access control, compare a managed platform with the full self-hosted stack you would need to operate, not with the Haystack library alone.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining deepset-ai/haystack? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature deepset-ai/haystack on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare