Head to head · Agent frameworks · October 2026 research run

DSPy vs Haystack

Haystack scores 77.8 (BB) on agent readiness against DSPy's 68.3 (B), and leads in 6 of 7 scored categories. Both do agent frameworks.

Best agent frameworks and SDKs · All 253 frameworks comparisons

Which one, for what

DSPy B

Best for Python teams who want typed LM programs they can evaluate and optimise against a metric, with ReAct for tool use.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

3.5 changed the default adapter, reasoning and API routing and removed CodeAct and ProgramOfThought in a minor release

Haystack BB

Best for Python teams building retrieval-heavy agents or pipelines who want explicit components, approval hooks and resumable runs.

Ahead on

  • Reliability, 81 against 62
  • Schema & documentation, 88 against 71
  • Agent ergonomics, 75 against 64
  • Maintenance & community, 95 against 87
  • Transparency & trust, 74 against 52

Also in its favour

  • Agent-ready, a grade of BB or better

Watch for

Anonymous telemetry to PostHog EU is on by default and includes the Agent's model and tool names

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Transparency & trust Haystack +22

DSPy 52

MIT (30). The library keeps only its answer cache, in memory and on disk by default, which the cache guide describes; no terms or privacy policy exist for the project (18). Deprecation warnings name the removal version (ReActV2 removed in 3.6), but there is no written policy and 3.5 removed APIs without a prior deprecation release (8). No telemetry, though no page states it (12). 30+18+8+12 = 68.

Haystack 74

Apache-2.0 (30). The library stores nothing itself, and the telemetry page lists what each event carries and what it never collects, though the company privacy policy doesn't mention it (20). A written deprecation policy with FutureWarning for one minor release, a yearly limit on majors and a migration guide (20). Telemetry disclosed with an environment-variable opt-out (20). 30+20+20+20 = 90.

Reliability Haystack +19

DSPy 62

Local-package reading. Official PyPI package dspy with Python 3.10 to below 3.16 stated (20). A public test workflow runs on pushes to main and pull requests for Python 3.10 to 3.15; whether main passes wasn't read, as the Actions API refused us (15). 352 open issues and 475 open pull requests on 23 November 2026. The 50 newest issues, opened from 6 October to 23 November, had 19 with a comment and 8 closed (10). Release notes and an upgrade guide for 3.5, but 3.5 changed defaults and removed APIs in a minor release (7). 3.x, while the package classifier still says Alpha, so partial (10). 20+15+10+7+10 = 62.

Haystack 81

Local-package reading. Official PyPI package haystack-ai with Python 3.11 or newer stated (20). A public tests workflow runs unit tests on Ubuntu, Windows and macOS for pushes to main and pull requests, plus e2e, CodeQL and Scorecard workflows; whether main passes wasn't read, as the Actions API refused us (15). 106 open issues and 68 open pull requests on 23 November 2026. The 50 newest issues were opened from 11 to 23 November, and 24 had a comment and 19 were closed (20). Release notes for every release and a migration guide for 3.0, but the policy says versions don't follow semantic versioning and minors remove deprecated functionality (11). 3.x with a Production/Stable classifier (15). 20+15+20+11+15 = 81.

Schema & documentation Haystack +17

DSPy 71

Framework reading. A typed Python API with an API reference for modules, tools, adapters and errors (20). No llms.txt at dspy.ai; the docs are Markdown in the repository but not served for agents (0). The tools and ReAct pages say what each part is for and when to read on (15). Tools are typed from signatures and Pydantic annotations and validated against JSON Schema (14). Many tutorials with code, and an errors page in the reference (12). Versioned docs, GitHub release notes and an upgrade guide, with no changelog file (10). 20+0+15+14+12+10 = 71.

Haystack 88

Framework reading. A typed Python API (py.typed) with a generated API reference (22). llms.txt holds the full documentation, 493 pages in one file (10). The agent pages say what each hook and component is for, with a table of which hook guards which risk (16). Tools are typed from function signatures and components (13). Tutorials, a cookbook and code on every page; error types such as PipelineRuntimeError and tool invocation errors are shown in the guides without a catalogue (12). Versioned docs and release notes per release (15). 22+10+16+13+12+15 = 88.

Agent ergonomics Haystack +11

DSPy 64

Framework reading. MCP tools through the dspy[mcp] extra, converted one by one from a client session the developer opens (14). max_iters with a turn budget shown to the model and a forced final submit bound a run (17). Unknown tools and tool exceptions return to the model as error results (15). History continuation and saved programs, but no resume of an interrupted run or durable store; answer caching can mask repeated calls (8). Signatures keep required arguments few, an LM must be configured, Python only (10). 14+17+15+8+10 = 64.

Haystack 75

Framework reading. MCPToolset loads an MCP server's tools with a tool_names filter, and SearchableToolset shows the model only matching tools, but MCP needs the separate mcp-haystack package (20). max_agent_steps, a step budget hook, streaming and ToolResultOffloadCompactor bound a run and its context (17). Tool failures go back to the model by default, or raise when raise_on_tool_invocation_failure is set (14). Failed pipelines raise with a snapshot of the last valid state and runs resume from it or from a breakpoint, with no built-in durable store (14). The Agent needs a chat generator passed in, so there is no silent default provider, and the framework is Python only (10). 20+17+14+14+10 = 75.

Maintenance & community Haystack +8

DSPy 87

3.5.0 tagged on 10 November 2026, 13 days before this check (30). Three releases in the 90 days to 23 November (3.4.0, 3.4.1, 3.5.0) (20). The 50 newest issues had 19 with a comment and 8 closed, with 352 issues and 475 pull requests open, while 213 commits from about 30 authors reached the repository in 90 days (12). The package is current (15). CI on six Python versions, Dependabot and actions pinned to commit SHAs (10). 30+20+12+15+10 = 87.

Haystack 95

3.5.0 tagged on 10 November 2026, 13 days before this check (30). Six releases in the 90 days to 23 November (3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.4.1, 3.5.0) and nightly dev builds on PyPI (20). The 50 newest issues, opened from 11 to 23 November, had 24 with a comment and 19 closed, with 106 issues open (20). The package and its integrations are current, with 3.6 in release candidate (15). CodeQL, Scorecard, Dependabot updates and actions pinned to commit SHAs (10). 30+20+20+15+10 = 95.

Score by category

CategoryWeightDSPyHaystackEdge
Reliability16%6281Haystack +19
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7188Haystack +17
Agent ergonomics13%6475Haystack +11
Security & auth14%6063Haystack +3
Payments & pricing10%9090even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8795Haystack +8
Transparency & trust7%5274Haystack +22
Negative events≤150-2
TotalB 68.3/100BB 77.8/100

Facts side by side

FactDSPyHaystack
KindAgent frameworkAgent framework
VendorStanford NLPdeepset
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFree
x402nono
LicenceMITApache-2.0
Read-only variant documentednono
llms.txtnoyes
Last release2026-11-102026-11-10
Terms last updatedno document linked2025-07-24
Privacy policy last updatedno document linked2026-10-23
Customer content may train modelsnot read yetnot found in the text
Terms restrict automated accessnot read yetnot found in the text
Terms restrict benchmarkingnot read yetyes
Terms or service can change without noticenot read yetnot found in the text
Arbitration or class-action waivernot read yetyes
Popularity39k stars27k stars

Verdicts

DSPy

An MIT Python framework with typed signatures, a ReAct agent that returns tool errors to the model, MCP tool conversion, a Deno sandbox for generated code, no telemetry found and monthly releases. Release 3.5 changed defaults and removed APIs in a minor version, and there is no tool approval hook or llms.txt.

Haystack

An Apache-2.0 Python framework with an Agent component, per-tool approval hooks, MCP tools, failure snapshots, a written deprecation policy and releases every few weeks. It sends anonymous usage telemetry to deepset's PostHog by default, including agent model and tool names, until HAYSTACK_TELEMETRY_ENABLED is set to False.

Before you call either

DSPy

  1. Re-evaluate saved programs after upgrading to 3.5, since the default adapter and prompts changed
  2. Install dspy[mcp] and convert each MCP tool with dspy.Tool.from_mcp_tool while the client session stays open
  3. Disable the answer cache for calls whose output must change between runs, since memory and disk caches are on by default
  4. Wrap tools that send, pay or delete in your own confirmation step, because ReAct runs tools without approval
  5. Pin dspy to a minor version, since minor releases remove APIs

Haystack

  1. Set HAYSTACK_TELEMETRY_ENABLED=False before importing haystack if usage events must not leave the machine
  2. Add a ConfirmationHook before tools that send, pay or delete
  3. Pass tool_names to MCPToolset so only the needed tools from an MCP server load
  4. Load pipeline YAML and resume snapshots only from trusted sources, since deserialisation can run code
  5. Pin haystack-ai to a minor version and read the release notes before upgrading

Questions

Which is better for AI agents, DSPy or Haystack?

Haystack scores 77.8 (BB) on agent readiness against DSPy's 68.3 (B), and leads in 6 of 7 scored categories.

Are DSPy and Haystack open source?

Yes. DSPy is open source (MIT). Haystack is open source (Apache-2.0).

Other comparisons with DSPy or Haystack

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.