Haystack has released version 3.0 of its open-source AI orchestration framework, moving agent development to the centre of the project. The major update adds lifecycle hooks, first-class skills, runtime tool selection, built-in run metrics and preconfigured agents, while reducing the size of the core package.

The release is available through the haystack-ai Python package. Existing Haystack 2.x users can continue receiving security patches and critical fixes for version 2.31 until the end of October 2026, giving production teams a limited migration window rather than requiring an immediate upgrade.

More control over the agent loop

Haystack 3.0 introduces hooks before and after an agent run, model call or tool call, as well as an exit hook. Developers can use these extension points to validate input, enforce a policy, collect audit information or require human approval before a sensitive operation without rewriting the agent component.

Skills are now a first-class concept. Through a skill store and toolset, an agent initially sees only a name and short description, then loads the full instructions when needed. This progressive-disclosure design aims to keep context use under control when a deployment has access to many specialised procedures.

Tools can also be selected dynamically at runtime. One agent configuration can therefore expose different capabilities for a team, tenant or task instead of requiring a separate agent for each permission set.

Preconfigured agents and visibility

A separate agent-pack package includes the first two high-level agents: a deep-research agent that returns a cited Markdown report and an advanced retrieval-augmented generation agent. Keeping these implementations outside the core lets developers start from a working pattern without making the framework itself dependent on every optional feature.

Agents now expose token usage, step count and tool-call counts in their state. Teams can use those metrics to compact context, stop a runaway loop or route work to a less expensive model after a budget threshold. Updated tracing adds spans for individual agent steps, model calls and tool use.

Unified pipelines and a lighter core

Haystack has merged its former Pipeline and AsyncPipeline classes. A single Pipeline now supports synchronous execution, asynchronous execution, streaming and concurrent tool calls. Components also gain matching warm-up and close stages, which should help long-running services acquire and release network connections or accelerator memory predictably.

The project has removed legacy generator components in favour of chat generators and moved about 30 integrations into independently released packages. This reduces transitive dependencies in the core and allows an integration fix to ship without waiting for a full framework release.

Those changes also create migration work. Applications using AsyncPipeline or a removed generator must update imports and some calling patterns. Haystack provides a migration guide, scanner and agent skill intended to identify version 2 patterns, but production teams should still review generated changes and run their own test suites.

Safer loading and deterministic testing

Pipeline deserialisation is now restricted to an allowlist of trusted modules by default. Potentially dangerous built-ins cannot be resolved, and applications must explicitly permit custom modules or choose an unsafe mode for content they fully trust. This reduces the risk of treating a pipeline configuration as harmless data when it can instantiate arbitrary code.

Version 3.0 also includes mock chat generators and embedders. They return predictable responses without network access or API keys, giving teams a way to test agent and pipeline behaviour without variable model output or per-call costs.

What developers should consider

The update addresses several problems that emerge after an agent moves beyond a prototype: permission checks, observability, context growth, lifecycle management and repeatable testing. Its value will depend on how cleanly existing integrations migrate and how well the new hooks and state metrics work under real production load.

Because this is a major version with intentional breaking changes, teams should test serialised pipelines, custom modules, async behaviour and observability exports before upgrading a live service. The availability of version 2.31 fixes through October provides time for that work, but not indefinite parallel support.

Migration priorities

A sensible migration begins with inventorying removed generators, AsyncPipeline usage and any serialised configuration that loads custom code. Teams can then upgrade a staging environment, compare synchronous and asynchronous outputs, and verify that hooks do not accidentally alter tool arguments or agent state.

Security testing should include deliberately untrusted pipeline files and tool results. The new allowlist is a safer default, but an application can weaken it by permitting broad module patterns or using the unsafe option. Human-approval hooks likewise need tests for cancellation, timeout and repeated attempts rather than only the successful path.

Finally, built-in token and step metrics are most useful when connected to explicit operating limits. Observability can explain a runaway agent after the event, while a configured budget or loop cap can stop it during execution. Haystack 3.0 supplies the mechanisms; application owners still have to choose and enforce the policy.