astrbot_plugin_mnemosyne  by lxfight

AI long-term memory plugin for chatbots

Created 1 year ago
250 stars

Top 100.0% on SourcePulse

GitHubView on GitHub
Project Summary

This AstrBot plugin provides AI agents with persistent, long-term memory capabilities by leveraging Retrieval-Augmented Generation (RAG). It targets users of the AstrBot framework seeking to build more context-aware and personalized conversational AI experiences, enabling AI to recall and utilize past interactions effectively.

How It Works

Mnemosyne employs a RAG architecture, integrating with AstrBot's existing LLM and Embedding providers. It automatically summarizes conversations based on configurable turn thresholds or time intervals. These summaries are then vectorized and stored in Milvus (or Milvus Lite), a high-performance vector database. During subsequent interactions, relevant memories are retrieved based on semantic similarity to the current query and injected into the AI's context, enhancing its recall and coherence.

Quick Start & Requirements

  • Prerequisites: AstrBot v4.0.0+, Python 3.8+, Milvus (Milvus Lite or Standalone), configured Embedding Provider (e.g., OpenAI, Gemini), configured LLM Provider.
  • Installation: Navigate to the plugin directory (cd data/plugins/astrbot_plugin_mnemosyne) and run uv pip install -r requirements.txt.
  • Initialization: Execute /memory init command within AstrBot.
  • Web Management Panel: Accessible at http://127.0.0.1:8000 (default).
  • Documentation: Refer to QUICKSTART.md, WINDOWS_TUTORIAL.md, and the project Wiki for detailed guides.

Highlighted Details

  • Core functionality built on RAG, Milvus vector database, and LLM summarization for persistent AI memory.
  • Supports automatic conversation summarization, intelligent semantic retrieval, and session-specific memory contexts.
  • Includes a FastAPI-based Web Management Panel for visualizing, querying, and managing memory data.
  • Offers flexible configuration for memory triggers, retrieval strategies, and session/personality filtering.
  • Provides robust support for dimension migration when changing embedding models, preserving historical data.

Maintenance & Community

The project is maintained by lxfight and is currently at version v2.0.0. Community discussion occurs via QQ Group 953245617. Bug reports and feature requests should be submitted via GitHub Issues. Contributions via Pull Requests are welcomed.

Licensing & Compatibility

The project is distributed under a Custom license, detailed in the LICENSE file. Compatibility is primarily for AstrBot framework users. Specific terms regarding commercial use or integration with closed-source systems should be reviewed in the license.

Limitations & Caveats

Milvus Lite, a lightweight option, is not supported on Windows systems. The plugin requires specific versions of AstrBot and pre-configuration of external Embedding and LLM providers. The dimension migration process for existing users can be time-consuming depending on the volume of stored memories. The "Custom" license necessitates careful review before deployment in sensitive or commercial environments.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
4
Star History
4 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.