agentscope-ai / agentscope-ai/agentscope
[Feature]: Integrate PowerMem as a Memory Component
- Ngôn ngữ chính
- Python
- Star
- 31.5k
- Fork
- 3.5k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 95
Mô tả
**AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.**
## Feature Request: Integrate PowerMem as a Memory Component
**Is your feature request related to a problem? Please describe.**
Currently, AgentScope agents rely on in-memory storage (`InMemoryMemory`) for conversation history, which has several limitations:
1. **Limited Scalability**: In-memory storage doesn't scale well for production applications with large volumes of conversations
2. **No Intelligent Memory Management**: There's no automatic fact extraction, deduplication, or memory consolidation from conversations
3. **Basic Retrieval**: Simple vector search without advanced features like graph-based relationships, time-decay weighting, or hybrid retrieval
4. **Limited Multi-Agent Support**: No built-in support for agent-specific memory isolation, cross-agent collaboration, or fine-grained permission control
These limitations make it challenging to build production-ready multi-agent systems that require persistent, intelligent memory management.
**Describe the solution you'd like**
I propose integrating [PowerMem](https://github.com/oceanbase/powermem) as an optional memory component for AgentScope. PowerMem is an intelligent memory system that provides:
### Core Features:
1. **Persistent Memory Storage**
- Support for multiple vector databases (OceanBase, PostgreSQL/pgvector, SQLite)
2. **Intelligent Memory Management**
- **Automatic Fact Extraction**: Uses LLM to extract key facts from conversations, avoiding storing raw conversation history
- **Deduplication & Conflict Resolution**: Automatically detects duplicate memories and merges conflicting information
- **Ebbinghaus Forgetting Curve**: Implements cognitive science-based time-decay weighting, prioritizing recent and relevant memories
- **Importance Evaluation**: Automatically evaluates and prioritizes memories based on relevance
3. **Advanced Retrieval**
- **Hybrid Retrieval**: Combines vector search, full-text search, and graph-based retrieval
- **Knowledge Graph**: Builds and traverses knowledge graphs for multi-hop reasoning
- **Reranking**: Optional reranking for improved retrieval accuracy
- **Sub-stores**: Data partitioning for ultra-large-scale deployments
4. **Multi-Agent Support**
- **Agent Memory Isolation**: Each agent has independent memory spaces
- **Cross-Agent Collaboration**: Supports memory sharing and collaboration between agents
- **Fine-grained Permissions**: Access control with read/write/delete/admin permissions
- **Privacy Protection**: Privacy levels (standard/sensitive/confidential) and scope control
- **Memory Scopes**: Private, agent_group, user_group, public, and restricted scopes
5. **Multimodal Support**
- Automatic conversion of images and audio to text descriptions
- Support for mixed content retrieval (text + image + audio)
6. **Developer-Friendly**
- Simple Python SDK
### Integration Approach:
The integration would provide a `PowerMemMemory` class that implements AgentScope's memory interface, similar to `InMemoryMemory`:
```python
from agentscope.memory import PowerMemMemory
from powermem import auto_config
# Simple usage - auto-loads from .env
memory = PowerMemMemory(config=auto_config(), agent_id="my_agent")
# Or with custom configuration
memory = PowerMemMemory(
config={
"llm": {"provider": "openai", "config": {...}},
"embedder": {"provider": "openai", "config": {...}},
"vector_store": {"provider": "pgvector", "config": {...}},
"intelligent_memory": {"enabled": True}
},
agent_id="my_agent"
)
```
The memory component would automatically:
- Extract and store facts from agent conversations
- Retrieve relevant context when needed
- Manage memory lifecycle (creation, updates, forgetting)
- Support multi-agent scenarios with proper isolation
**Additional context**
### Resources:
- **PowerMem GitHub**: https://github.com/oceanbase/powermem
- **Documentation**: https://github.com/oceanbase/powermem/tree/master/docs
- **PyPI Package**: https://pypi.org/project/powermem/
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.