Repository
mem4ai
π§ Mem4AI: A LLM Friendly memory management library. Mem4AI enhances AI assistants and agents with an intelligent memory layer, enabling personalized and context-aware AI interactio Β· License Apache 2.0 Β· Install via pip Β· Maintenance unknown
- License
- Apache 2.0
README
π§ Mem4AI: A LLM Friendly memory management library.
Mem4AI enhances AI assistants and agents with an intelligent memory layer, enabling personalized and context-aware AI interactions. Perfect for building smarter chatbots, AI assistants, and autonomous systems that remember and learn.
β¨ Core Features
- π Multi-Level Memory: User, Session, and AI Agent memory retention
- π― Adaptive Personalization: Continuous improvement based on interactions
- π Fast Local Storage: Efficient on-disk storage with quick access
- π Advanced Semantic Search: Find relevant memories quickly
- π·οΈ Flexible Metadata: Tag and filter memories easily
- π§ Customizable Strategies: Adapt embedding and storage to your needs
- πΎ Persistent Storage: Memories that last across sessions
π Quick Start
Install Mem4AI:
pip install Mem4AI
Here's a simple example of how to use Mem4AI:
from mem4ai import Memtor
# Initialize Memtor
memtor = Memtor()
# Add a memory
memory_id = memtor.add_memory(
"The user prefers dark mode in all applications",
metadata={"preference": "ui", "mode": "dark"},
user_id="alice"
)
# Search for memories
results = memtor.search_memories("user interface preferences", user_id="alice")
print(results[0].content) # Output: The user prefers dark mode in all applications
# Update a memory
memtor.update_memory(
memory_id,
"The user prefers dark mode, except for document editing",
metadata={"preference": "ui", "mode": "dark", "exception": "document_editing"}
)
# Delete a memory
memtor.delete_memory(memory_id)
π οΈ Use Cases
- π€ Chatbots with long-term memory
- π Personalized recommendation systems
- π§ Knowledge management systems
- π― Context-aware AI assistants
π Documentation
Coming soon!
π€ Contributing
We welcome contributions! Check out our contribution guidelines for more information.
π License
Mem4AI is released under the Apache 2.0 license. See LICENSE for more information.
Built with β€οΈ by Unclecode. (https://x.com/unclecode)
Give Mem4AI a star β if you find it helpful!
β¨ Core Features
1
-
π Multi-Level Memory : User, Session, and AI Agent memory retention π― Adaptive Personalization : Continuous improvement based on interactions π Fast Local Storage : Efficient on-disk storage with quick access π Advanced Semantic Search : Find relevant memories quickly π·οΈ Flexible Metadata : Tag and filter memories easily π§ Customizable Strategies : Adapt embedding and storage to your needs πΎ Persistent Storage : Memories that last across sessions
π Quick Start
1
-
Install Mem4AI:
π οΈ Use Cases
1
-
π€ Chatbots with long-term memory π Personalized recommendation systems π§ Knowledge management systems π― Context-aware AI assistants
π Documentation
1
-
Coming soon!
π€ Contributing
1
π License
1