Open
Conversation
Add hindsight-llamaindex package providing persistent memory tools for LlamaIndex agents via the native BaseToolSpec pattern. Includes retain, recall, and reflect tools, a convenience factory, global config, full test suite, docs page, blog post, and integrations.json entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix ReActAgent API: from_tools() → constructor, chat() → await run() - Add create_bank step to all quickstart examples - Add production patterns section to docs (tags, error handling, bank lifecycle) - Add memory scoping recommendation to README - Add when-not-to-use section to blog post - Add LlamaIndex compatibility tests (agent acceptance, FunctionTool.call) - Fix self-hosted auth wording in cookbook notebook Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use await client.acreate_bank() instead of sync create_bank() to avoid "event loop already running" errors in notebooks and async contexts - Wrap plain Python examples in async def main() + asyncio.run(main()) so they are copy-paste runnable as scripts - Add Jupyter notebook tip to docs showing top-level await pattern - Bank lifecycle example in docs now uses async acreate_bank Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HindsightToolSpec now provides both sync and async tool implementations
using LlamaIndex's (sync_fn, async_fn) tuple pattern in spec_functions.
Async agents (ReActAgent, etc.) use aretain/arecall/areflect natively,
avoiding the "Timeout context manager should be used inside a task"
error that occurred when sync _run_async() was called from within an
active event loop.
- Add aretain_memory, arecall_memory, areflect_on_memory async methods
- Extract shared kwargs builders (_retain_kwargs, _recall_kwargs, etc.)
- spec_functions now uses tuples: [("retain_memory", "aretain_memory"), ...]
- Tests verify tools have both sync fn and async fn set
- Notebook verified end-to-end with nbclient against local Hindsight
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hindsight-llamaindexpackage:BaseToolSpecsubclass +create_hindsight_tools()factory giving LlamaIndex agents persistent memory via retain/recall/reflecthindsight-docs/docs/sdks/integrations/llamaindex.mdhindsight-docs/blog/2026-03-23-llamaindex-memory.mdintegrations.jsonTest plan
uv run pytest tests/ -v— 34 passed, 3 skipped (manual)uv run ruff check . && uv run ruff format --check .— cleantest_manual.py🤖 Generated with Claude Code