Skip to content

docs: add Tool Result Offloading page for Agent - #11945

Merged
julian-risch merged 1 commit into
mainfrom
docs/v3-tool-result-offloading
Jul 10, 2026
Merged

docs: add Tool Result Offloading page for Agent#11945
julian-risch merged 1 commit into
mainfrom
docs/v3-tool-result-offloading

Conversation

@julian-risch

@julian-risch julian-risch commented Jul 10, 2026

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

  • New "Tool Result Offloading" page under Agents, covering the haystack.hooks.tool_result_offloading module: ToolResultOffloadHook as an after_tool hook, the pointer format (preview_chars, default 200), per-tool offload_strategies (exact / tuple / "*" wildcard keys with specificity precedence), the built-in policies (AlwaysOffload, NeverOffload, OffloadOverChars), what is and isn't offloaded, FileSystemToolResultStore incl. key derivation and root-escape rejection, custom OffloadPolicy/ToolResultStore subclasses with default to_dict/from_dict, per-run stores via hook_context under RESULT_STORE_CONTEXT_KEY for multi-user servers, a file-reading tool to read offloaded results back, and serialization.
  • Hooks page: the ToolResultOffloadHook bullet under "Ready-made hooks" now links to the new page
  • Agent page: added the new page to Additional References.
  • Sidebar: registered the new page in the Agents category.

How did you test it?

  • All code examples on the page were executed against the real API with MockChatGenerator driving an Agent: pointer rewrite and store file creation, exact/tuple/wildcard policy resolution and precedence, the custom OffloadPolicy and ToolResultStore subclasses from the page (incl. protocol-default to_dict/from_dict round-trip), per-run store override via hook_context, reading an offloaded result back with a file tool, and hook serialization round-trip.

Notes for the reviewer

Checklist

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment Jul 10, 2026 7:29am

Request Review

@julian-risch
julian-risch marked this pull request as ready for review July 10, 2026 08:13
@julian-risch
julian-risch requested a review from a team as a code owner July 10, 2026 08:13
@julian-risch
julian-risch requested review from davidsbatista and sjrl and removed request for a team and davidsbatista July 10, 2026 08:13

@sjrl sjrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@julian-risch
julian-risch merged commit 4306fa3 into main Jul 10, 2026
21 checks passed
@julian-risch
julian-risch deleted the docs/v3-tool-result-offloading branch July 10, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants