Skip to content

cookbook: add LlamaIndex ReAct agent notebook#18

Open
DK09876 wants to merge 4 commits intomainfrom
cookbook/llamaindex-react-agent
Open

cookbook: add LlamaIndex ReAct agent notebook#18
DK09876 wants to merge 4 commits intomainfrom
cookbook/llamaindex-react-agent

Conversation

@DK09876
Copy link
Contributor

@DK09876 DK09876 commented Mar 24, 2026

Summary

  • Add notebooks/08-llamaindex-react-agent.ipynb demonstrating LlamaIndex agents with Hindsight memory
  • Two patterns: Tool Spec (HindsightToolSpec + to_tool_list()) and Factory (create_hindsight_tools())
  • Per-user memory banks, selective tool export, cleanup
  • Updated README with notebook entry

Test plan

  • Run notebook end-to-end against local Hindsight
  • Verify all cells execute without errors

🤖 Generated with Claude Code

DK09876 and others added 4 commits March 24, 2026 06:56
Add notebook 08-llamaindex-react-agent.ipynb demonstrating two patterns:
Tool Spec (HindsightToolSpec with to_tool_list) and Factory
(create_hindsight_tools with include/exclude flags). Updated README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix ReActAgent API: from_tools() → constructor, chat() → await run()
- Fix self-hosted auth wording ("not required" → "not required for local")
- Add note about custom auth configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- client.create_bank() → await client.acreate_bank()
- client.delete_bank() → await client.adelete_bank()
- Fixes RuntimeError: This event loop is already running

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add try/except cleanup of leftover bank before creating fresh one
- Add max_iterations=10 to all agent.run() calls to prevent LLM loops
- Verified end-to-end execution with nbclient against local Hindsight

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DK09876 DK09876 marked this pull request as ready for review March 25, 2026 00:23
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