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