How caspianmoon/memoripy works
Main Components
a) Core Components:
• Memory Manager (Central Controller)
• Memory Store (Memory Organization)
• Storage Systems (Abstract and Implementations)
• Model Interfaces (AI Models Integration)
b) External Integrations:
• OpenAI API
• Ollama API
• External Storage (JSON files)
Top Layer: Client Interface
Middle Layer: Core Components
Bottom Layer: External Services & Storage
Specific Component Relationships
a) Memory Manager Layer:
• It as the central orchestrator
• It bidirectionally with Memory Store
• Connections to Model interfaces
• Concept extraction and embedding generation flows
b) Memory Store Layer:
• Both short-term and long-term memory stores
• Hierarchical clustering system
• Graph-based associations
• Decay and reinforcement mechanisms
c) Storage Layer:
• Abstract storage interface
• Implementations (JSONStorage and InMemoryStorage)
• Persistence flows
Specific Elements
a) Components:
[Memory Manager]
• Concept Extraction
• Embedding Generation
• Response Generation
• Interaction Management
[Memory Store]
• Short-term Memory
• Long-term Memory
• Clustering System
• Graph Associations
[Storage Interface]
• JSON Storage
• In-Memory Storage
[Model Interface]
• OpenAI Models
• Ollama Models
b) Data Flows:
• Embedding generation flow
• Concept extraction process
• Demonstrate memory retrieval paths
• Storage operations
Key Interactions to Highlight
• Memory Manager ↔ AI Models (concept extraction and embeddings)
• Memory Manager ↔ Memory Store (storage and retrieval)
• Memory Store ↔ Storage Implementation (persistence)
• Graph-based associations within Memory Store
• Clustering mechanisms within Memory Store
Implementation Details
Use standardized UML or similar notation:
• Diamond endings for composition relationships
Optimization Recommendations
• Related components visually
• Use clear, readable labels
• Version information
• Brief descriptions for complex interactions