-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(memory): add reme long-term memory #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add ReMePersonalMemory, ReMeTaskMemory, and ReMeToolMemory classes - Implement base class ReMeBaseLongTermMemory with common functionality - Add support for personal memory recording and retrieval with keywords - Implement task memory for storing and retrieving execution trajectories - Create tool memory for recording tool call results and generating guidelines - Add proper error handling and logging with loguru- Include async context manager support for memory initialization- Add comprehensive docstrings and type hints - Integrate with DashScope and OpenAI models for embedding and LLM APIs - Provide example usage in personal memory demonstration script
… and ReActAgent integration- Improved docstrings for record_to_memory and retrieve_from_memory methods across all ReMe memory classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Please see inline comments.
examples/functionality/long_term_memory/reme/personal_memory_example.py
Outdated
Show resolved
Hide resolved
examples/functionality/long_term_memory/reme/task_memory_example.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds ReMe (Reflection Memory) long-term memory support to AgentScope, introducing three specialized memory types: Personal, Task, and Tool memory. The implementation provides both tool function interfaces (for agent-driven memory management) and direct method interfaces (for programmatic control), with comprehensive test coverage and documentation.
Key changes:
- Added three ReMe memory implementations:
ReMePersonalMemory,ReMeTaskMemory, andReMeToolMemory - Integrated ReMe memory types into AgentScope's memory system with dual interface design
- Added comprehensive test suite, examples, and documentation
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Added reme-ai dependency with Python 3.12+ constraint |
src/agentscope/memory/__init__.py |
Exported three new ReMe memory classes |
src/agentscope/memory/reme/__init__.py |
ReMe memory module initialization |
src/agentscope/memory/reme/_reme_base_long_term_memory.py |
Base class for ReMe memory implementations with context manager support |
src/agentscope/memory/reme/_reme_personal_memory.py |
Personal memory implementation for user preferences and facts |
src/agentscope/memory/reme/_reme_task_memory.py |
Task memory implementation for learning from execution trajectories |
src/agentscope/memory/reme/_reme_tool_memory.py |
Tool memory implementation for recording tool usage patterns |
tests/memory_reme_test.py |
Comprehensive test suite with dynamic memory type testing |
examples/functionality/long_term_memory/reme/*.py |
Three example files demonstrating each memory type |
examples/functionality/long_term_memory/reme/README.md |
Complete documentation with API reference and usage guide |
docs/tutorial/zh_CN/src/task_long_term_memory.py |
Chinese tutorial integration |
docs/tutorial/en/src/task_long_term_memory.py |
English tutorial integration |
docs/tutorial/_static/css/gallery.css |
CSS styling for console output blocks |
Comments suppressed due to low confidence (1)
pyproject.toml:21
- The project requires Python 3.10+ (
requires-python = '>=3.10'), butreme-airequires Python 3.12+ (python_full_version >= '3.12'). While this is technically valid since reme-ai is an optional dependency, users may be confused when they cannot install thefullextras on Python 3.10-3.11. Consider adding a note in the documentation or README explaining that ReMe memory features require Python 3.12+.
requires-python = ">=3.10"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see inline comment, others lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
feat(ad reme memory): implement ReMe-based long-term memory modules