Files
Alex Notov aaa76b9c44 Fix context management for SDK 0.69.0 and improve documentation
This commit fixes the memory cookbook to work with anthropic SDK 0.69.0
and improves documentation around context clearing behavior.

Changes:
- Update context_management parameter usage for SDK 0.69.0
  - Pass as direct parameter instead of extra_body
  - Update response handling to use getattr() for Pydantic objects
- Fix context clearing configuration in notebook
  - Lower clear_at_least threshold from 3000 to 50 tokens
  - Memory tool operations have small results (~50-150 tokens)
  - Add documentation explaining why threshold is low
- Add explanatory notes about context clearing behavior
  - Explain why token savings are small in the demo
  - Provide guidance for production configurations
  - Document that larger tool results would save more tokens

The notebook now works correctly with SDK 0.69.0 and provides clear
guidance for users configuring context management in their applications.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 15:16:15 -06:00
..
2025-09-27 14:42:12 -06:00
2025-09-27 14:38:48 -06:00
2024-05-30 00:31:42 -07:00