Skip to content

feat: add Haystack agent memory cookbook notebook#31

Open
DK09876 wants to merge 6 commits into
mainfrom
feat/haystack-cookbook
Open

feat: add Haystack agent memory cookbook notebook#31
DK09876 wants to merge 6 commits into
mainfrom
feat/haystack-cookbook

Conversation

@DK09876

@DK09876 DK09876 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds notebooks/haystack-agent-memory.ipynb demonstrating persistent memory for Haystack agents
  • Covers: creating tools, building an agent, storing preferences (retain), cross-session recall, and reflect for synthesis
  • Works with Hindsight Cloud or self-hosted

Test plan

  • Run notebook cells end-to-end against Hindsight Cloud

🤖 Generated with Claude Code

Demonstrates persistent memory for Haystack agents using hindsight-haystack:
retain, recall, and reflect tools with cross-session memory persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DK09876
DK09876 force-pushed the feat/haystack-cookbook branch from ee2bebd to 15fe18c Compare May 1, 2026 17:36
@DK09876
DK09876 marked this pull request as ready for review May 1, 2026 17:36
DK09876 and others added 4 commits May 1, 2026 14:04
- Add auto-recall/retain example using HindsightToolset
- Fix cleanup cell to use async adelete_bank to avoid event loop crash
- Update key takeaways to mention HindsightToolset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
asyncio.get_event_loop().run_until_complete() fails inside Jupyter/
IPython's already-running event loop. Use hindsight_haystack's _run_sync
helper which routes through a persistent daemon thread, working in any
event loop context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
V2 audit found cell 9 (reflect on knowledge) failing because gpt-4o-mini
answered without invoking recall/reflect on the broad personalization
prompt. Same Claude-SDK d92ccab template: prepend an explicit recall
directive so the model has to ground its answer in memory.

Integration code unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant