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

Haystack 3.2.0 sürüm notları

Haystack 3.2.0 sürümünün yayın tarihi 24 Eylül 2026. En güncel sürüm 3.5.0.

v3.2.0 · · 94 değişiklik maddesi

Orijinal sürüm notları

⭐️ Highlights

🧠 SummarizationCompactor: Compact Agent Context Without Losing It

The experimental SummarizationCompactor is a new compaction strategy for CompactionHook. It replaces older turns and Agent steps with LLM-generated summaries. Long-running Agents keep a condensed record of earlier goals, decisions, and open work. It summarizes as little as needed to reach the target size, starting with the oldest historical turns and only then moving to the current task's older steps. The min_keep_steps newest steps always stay as they are. You can use a small, cheap model to write the summaries.

from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIResponsesChatGenerator
from haystack.hooks.compaction import CompactionHook, SummarizationCompactor

compaction_hook = CompactionHook(
    compactor=SummarizationCompactor(
        chat_generator=OpenAIResponsesChatGenerator(model="gpt-5.4-nano"),
        min_keep_steps=2,
    ),
    context_window=400_000,
    compact_at=0.7,
    compact_to=0.4,
)

agent = Agent(
    chat_generator=OpenAIResponsesChatGenerator(model="gpt-5.4"),
    tools=[web_search],
    hooks={"before_llm": [compaction_hook]},
)
💰 Token Budgets and Clean Stops for Agent Runs

The experimental TokenBudgetHook caps how many tokens an Agent run can spend. Once the budget is used up, the Agent stops before its next LLM call, sets exit_reason to "token_budget_exceeded", and returns the messages collected so far. Set add_final_message=True to add an assistant message explaining why the run ended.

The hook is built on the new stop_run state key, which any hook can set to end a run cleanly with a custom reason instead of raising an error. For example, you can stop after too many calls to one tool:

from haystack.hooks import hook
from haystack.hooks.budget import TokenBudgetHook

@hook
def limit_searches(state):
    if state.get("tool_call_counts", {}).get("web_search", 0) >= 5:
        state.set("stop_run", "search_limit_reached")

agent = Agent(
    chat_generator=OpenAIChatGenerator(model="gpt-5.4-nano"),
    tools=[web_search],
    hooks={"before_llm": [TokenBudgetHook(max_total_tokens=100_000), limit_searches]},
)
result = agent.run(messages)
print(result["exit_reason"])  # "text", "token_budget_exceeded", or "search_limit_reached"
🔗 Fluent Pipeline Building

Building a pipeline takes less code with Haystack version 3.2: Pipeline.add_components() adds several components in one call and Pipeline.connect_many() creates several connections in one call. Both add_component() and add_components() now return the pipeline, so you can chain the calls.

from haystack import Pipeline

pipeline = (
    Pipeline()
    .add_components({"retriever": retriever, "prompt_builder": prompt_builder, "llm": llm})
    .connect_many([("retriever", "prompt_builder.documents"), ("prompt_builder", "llm")])
)

⬆️ Upgrade Notes

🚀 New Features

⚡️ Enhancement Notes

🔒 Security Notes

🐛 Bug Fixes

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

@abhati27, @abo3losh1, @Aftabbs, @AjayShivran, @alanhuangyoo, @anakin87, @Anurag-M1, @Arman-Beykmohammadi, @ArzelaAscoIi, @atikulmunna, @Awshesh12, @bilgeyucel, @bogdankostic, @businessarshgoyal, @coder058, @CoralGarden52, @davidsbatista, @dfedoryshchev, @dingpuyu, @Diwak4r, @Dxfory, @eatLaoJun, @ege-arhan, @feiiiiii5, @fng713, @Goodnight77, @Gout999, @gyanu2507, @Harsh23Kashyap, @iridescentWen, @JbravoI, @JimmyWang0417, @jliounis, @julian-risch, @kacperlukawski, @Koushik890, @Kuang-xianxin, @L4XB, @Lesereingrape, @lets-order-some-fries, @LHMQ878, @linhongyu510, @mfurkanakinci, @mikemikimike, @MohammadHijjawi97, @mrchtr, @Nikhi00718, @otiscuilei, @PattonBrown, @pcbeingused333, @PeterSmith0127-lcm, @Rainmemery, @rautaditya2606, @Ricky-7-Yan, @sainikhiljuluri, @samrusani, @seanxuu, @ShousenZHANG, @simpleqt, @sjrl, @spacesheepinternet, @SyedShahmeerAli12, @teachershuang, @tstadel, @uczltw6, @Vedant-Agarwal, @vercel[bot], @winter-street, @xblwh, @yavuz-yilmaz

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

Daha yeni: 3.3.0Daha eski: 3.1.1Haystack