47 model fiyatı
  1. Ana sayfa
  2. Sürümler
  3. Haystack
  4. 3.0.0

Haystack 3.0.0 sürüm notları

Haystack 3.0.0 sürümünün yayın tarihi 20 Temmuz 2026. En güncel sürüm 3.5.0.

v3.0.0 · · 174 değişiklik maddesiKırıcı Ana sürüm

Bu sürümün notları kırıcı değişikliklerden bahsediyor.

Orijinal sürüm notları

⭐️ Highlights

Haystack 3.0 is a major release for building production-grade agents with full control and flexibility. It ships a wave of new capabilities: a more capable Agent with hooks and first-class skills, built-in run introspection, first-class async for serving, a leaner core, and safer pipeline loading.

A few small, intentional breaking changes come with it but our Migration Guide and Upgrading to Haystack 3.0 make it easy to upgrade.

🤖 A more capable, adaptable Agent

The Agent gained a general-purpose hooks system and now owns tool execution end to end (the standalone ToolInvoker has been removed). Hooks at before_run, before_llm, before_tool, after_tool, on_exit, and after_run let you shape behavior, enforce guardrails, and add human-in-the-loop checkpoints without touching the agent's internals:

from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.hooks import hook

@hook
def audit_tool_calls(state):
    pending = state.data["messages"][-1].tool_calls
    print(f"about to run: {[tc.tool_name for tc in pending]}")

agent = Agent(
    chat_generator=OpenAIChatGenerator(),
    tools=[...],
    hooks={"before_tool": [audit_tool_calls]},
)

Built on this foundation:

🔎 Built-in introspection and observability

Agents now expose step_count, token_usage, and tool_call_counts as built-in state. React to them to compact context when the window fills, cap runaway tool loops, or route to a cheaper approach past a budget threshold. Tracing now emits dedicated step-level spans (haystack.agent.step with nested .llm / .tool children) tagged with the tools actually used, so you can see exactly what your agent did. ⚠️

⚡ A core built for serving: first-class async

Pipeline and AsyncPipeline are now one class — no more switching between them. A single Pipeline exposes run, run_async, run_async_generator, and stream; serialized pipelines, SuperComponents, and PipelineTools load as Pipeline instances. ⚠️

from haystack import Pipeline

pipeline = Pipeline()
result = pipeline.run(data)                 # synchronous
result = await pipeline.run_async(data)     # asynchronous

Concurrent tool calls and token-by-token streaming come standard: Pipeline.stream() yields StreamingChunks as they're produced and exposes the final output on handle.result — the lower latency and streaming UX serving apps need. Components and Pipeline also get a symmetric lifecycle — warm_up to acquire, close to release — so long-running services don't leak connections, GPU memory, or file handles. External resources (and API keys) are now created at warm_up, not in __init__. ⚠️

🧱 A leaner, faster-moving framework ⚠️

Legacy Generators are gone, haystack-experimental is no longer a core dependency, and 30 components now live in independently released packages in haystack-core-integrations: Sentence Transformers, local & API Hugging Face, Whisper, spaCy/langdetect, Tika and Azure OCR, SerperDev/SearchApi, OpenAPI connectors, and the Datadog/OpenTelemetry tracers. As a result, there are fewer transitive dependencies to audit and we can ship independent of the core release cycle. Migration is an install plus an import change:

# pip install sentence-transformers-haystack
# Before: from haystack.components.embedders import SentenceTransformersTextEmbedder
from haystack_integrations.components.embedders.sentence_transformers import SentenceTransformersTextEmbedder

The full old → new import table is in MIGRATION.md.

💬 Chat Generators everywhere (legacy Generators removed) ⚠️

OpenAIGenerator, AzureOpenAIGenerator, HuggingFaceAPIGenerator, and HuggingFaceLocalGenerator have been removed in favor of their Chat Generator counterparts. To ease the switch, all Chat Generators now accept a plain str for messages:

# Before
from haystack.components.generators import OpenAIGenerator
text = OpenAIGenerator().run("What is NLP?")["replies"][0]        # str

# After
from haystack.components.generators.chat import OpenAIChatGenerator
reply = OpenAIChatGenerator().run("What is NLP?")["replies"][0]    # ChatMessage
text = reply.text                                                 # str; metadata in reply.meta

DALLEImageGenerator was also renamed to OpenAIImageGenerator. ⚠️

🔒 Safer pipeline loading ⚠️

Pipeline deserialization (Pipeline.load / loads / from_dict) is now gated by a trusted-module allowlist (haystack, haystack_integrations, haystack_experimental, builtins, typing, collections by default), and dangerous builtins like eval, exec, open, and getattr can no longer be resolved. Allowlist custom modules when needed:

Pipeline.load(fp, allowed_modules=["mypkg.*"])   # or HAYSTACK_DESERIALIZATION_ALLOWLIST / allow_deserialization_module(...)
Pipeline.load(fp, unsafe=True)                    # only if you fully trust the source
🧪 Testing without the API bill

Newly added mock components mean no API keys, no network, no flaky CI for testing and prototyping. MockChatGenerator returns predefined responses, MockTextEmbedder and MockDocumentEmbedder return stable, hash-derived embeddings.

A few smaller breaking changes to know about

See the Upgrade Notes below for the full list.

⬆️ Upgrade Notes

🚀 New Features

⚡️ Enhancement Notes

🔒 Security Notes

🐛 Bug Fixes

💙 Big thank you to everyone who contributed to this release!

@Aarkin7, @Amnah199, @anakin87, @bilgeyucel, @bogdankostic, @camgrimsec, @charliesheh, @chuenchen309, @davidsbatista, @eeshsaxena, @greymoth-jp, @hoangsonww, @hxaxd, @immuhammadfurqan, @jialiuyang, @jinhaosong-source, @julian-risch, @milljer, @mustafakhokhar, @omborda2002, @Osamaali313, @Otis0408, @RajanChavada, @rautaditya2606, @SeCuReDmE-main-dev, @sjrl, @tstadel, @Vedant-Agarwal, @vidigoat

Kaynak: GitHub sürümü v3.0.0

Daha yeni: 3.1.0Daha eski: 2.31.0Haystack