mirror of
https://github.com/anthropics/claude-cookbooks.git
synced 2025-10-06 01:00:28 +03:00
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>