You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement working memory with long-term extraction strategy awareness
MAJOR FEATURE: Strategy-aware memory tools that understand extraction configuration
Core Components:
- WorkingMemory: Temporary storage with configurable extraction strategies
- LongTermExtractionStrategy: Abstract base for extraction logic
- MessageCountStrategy: Concrete strategy that extracts after N messages
- WorkingMemoryToolProvider: Creates tools with strategy context
Key Features:
✅ Memory tools receive extraction strategy context in descriptions
✅ Tools make intelligent decisions based on strategy configuration
✅ LLM understands when/how extraction will happen
✅ Automatic extraction based on configurable triggers
✅ Importance calculation integrated with strategy
✅ Working memory persisted in Redis with TTL
✅ Agent integration with strategy-aware tools
Memory Tools Enhanced:
- add_memories_to_working_memory: Strategy-aware memory addition
- create_memory: Decides working vs long-term based on strategy
- get_working_memory_status: Shows strategy context
- force_memory_extraction: Manual extraction trigger
- configure_extraction_strategy: Runtime strategy updates
Agent Integration:
- ClassAgent now accepts extraction_strategy parameter
- Working memory tools automatically added to agent toolkit
- System prompt includes working memory strategy context
- Messages automatically added to working memory
- Extraction happens in store_memory_node
This solves the original problem: memory tools now have full context about
the working memory's long-term extraction strategy configuration.
0 commit comments