47 model prices
  1. Home
  2. Releases
  3. Haystack
  4. 3.4.0

Haystack 3.4.0 release notes

Haystack 3.4.0 was released on October 15, 2026. The latest version is 3.5.0.

v3.4.0 · · 55 listed changes

Release notes

⭐️ Highlights

🐍 Python 3.15 Support, Python 3.10 Dropped

Haystack now officially supports Python 3.15. Python 3.10 reaches end of life in October 2026, so the minimum supported version is now 3.11. ⚠️

📦 ToolResultOffloadCompactor: Compact Agent Context Without Losing Tool Results

The experimental ToolResultOffloadCompactor is a new compaction strategy for CompactionHook. When compaction is triggered, it doesn't drop or summarize older tool results. It writes them to a ToolResultStore and leaves a reference in their place. The Agent can read the full output back on demand with a read tool scoped to the same store. Fresh results stay in context until compaction kicks in, so short runs pay nothing extra.

from typing import Annotated

from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIResponsesChatGenerator
from haystack.hooks.compaction import CompactionHook, ToolResultOffloadCompactor
from haystack.hooks.tool_result_offloading import FileSystemToolResultStore
from haystack.tools import tool

store = FileSystemToolResultStore(root="tool_results")

@tool
def read_offloaded_result(path: Annotated[str, "Path of an offloaded tool result"]) -> str:
    """Read back the full content of an offloaded tool result."""
    content = store.read(path)
    if isinstance(content, bytes):
        return f"'{path}' holds {len(content)} bytes of binary content and cannot be read as text."
    return content

agent = Agent(
    chat_generator=OpenAIResponsesChatGenerator(model="gpt-5.4-nano"),
    tools=[web_search, read_offloaded_result],
    hooks={"before_llm": [CompactionHook(compactor=ToolResultOffloadCompactor(store=store), context_window=400_000)]},
)

⬆️ Upgrade Notes

🚀 New Features

⚡️ Enhancement Notes

🐛 Bug Fixes

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

@Aditya17-bot, @agnieszka-m, @amengnew, @anakin87, @ArzelaAscoIi, @Ayushdevo, @basilalshukaili, @Ben160804, @bhaskargurram-ai, @bilgeyucel, @bogdankostic, @camgrimsec, @chrikrah, @davidsbatista, @Evihut, @hardness1020, @Harsh23Kashyap, @julian-risch, @kacperlukawski, @L4XB, @LimbC-C, @LindseyZ1205, @Marcuswang0824, @Morningstar202604, @otiscuilei, @rautaditya2606, @rxchitrx, @ShousenZHANG, @sjrl, @Timotty, @TimurRakhmatullin86, @Vedant-Agarwal, @yuv009

Source: GitHub release v3.4.0

Newer: 3.4.1Older: 3.3.0Haystack