Spaces:
Sleeping
Sleeping
|
Download README.md from killbizz/memorymind: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/spaces/killbizz/memorymind/resolve/main/README.md
- Command line
-
hf download hf://spaces/killbizz/memorymind/README.md
-
curl -L -o README.md https://huggingface.co/spaces/killbizz/memorymind/resolve/main/README.md
3.12 kB
| title: MemoryMind | |
| emoji: π§ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: docker | |
| app_file: app.py | |
| pinned: false | |
| # MemoryMind β The Chatbot That Actually Remembers You | |
| Most chatbots forget everything the moment you close the tab. MemoryMind doesn't. | |
| It extracts facts from your conversation, stores them permanently, and uses them in future sessions β even weeks later. A live memory panel shows exactly what the bot knows about you, which memories it used in the last response, and lets you wipe everything with a single button. | |
| --- | |
| ## Features | |
| - **Persistent memory** β facts survive browser refresh, app restarts, and new sessions | |
| - **Semantic retrieval** β finds relevant memories by meaning, not just keywords | |
| - **Memory correction** β say "actually I moved to Berlin" and it updates the old entry | |
| - **Deduplication** β never stores the same fact twice | |
| - **Memory panel** β live sidebar showing all stored facts, timestamps, and usage counts | |
| - **Highlighted memories** β see exactly which memories informed each response | |
| - **Reset button** β wipe all memory and start fresh (great for demos) | |
| --- | |
| ## Tech Stack | |
| | Layer | Tool | | |
| |---|---| | |
| | LLM | Groq API β Llama 3.3 70B | | |
| | Memory Store | ChromaDB (local, persistent) | | |
| | Embeddings | sentence-transformers `all-MiniLM-L6-v2` | | |
| | Frontend | Streamlit | | |
| | Hosting | Hugging Face Spaces | | |
| | Language | Python 3.11+ | | |
| --- | |
| ## Project Structure | |
| ``` | |
| βββ app.py # Streamlit UI + memory sidebar | |
| βββ chatbot.py # LLM calls, prompt building, contradiction detection | |
| βββ memory.py # ChromaDB store, retrieve, deduplicate, correct | |
| βββ extractor.py # Fact extraction via second LLM call | |
| βββ requirements.txt | |
| βββ .env # GROQ_API_KEY (never committed) | |
| ``` | |
| --- | |
| ## How Memory Works | |
| ``` | |
| User message | |
| β | |
| Retrieve top-5 relevant memories (semantic search on ChromaDB) | |
| β | |
| Build prompt: system + memories + chat history + user message | |
| β | |
| Groq LLM β response | |
| β | |
| Extract new facts from the exchange | |
| β | |
| Deduplicate β check for contradictions β store or correct | |
| β | |
| Render response + updated memory panel | |
| ``` | |
| --- | |
| ## Setup | |
| **1. Clone the repo** | |
| ```bash | |
| git clone https://github.com/satomustar/Memorymind-Chatbot.git | |
| cd Memorymind-Chatbot | |
| ``` | |
| **2. Create a virtual environment** | |
| ```bash | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| ``` | |
| **3. Install dependencies** | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| **4. Add your Groq API key** | |
| Create a `.env` file: | |
| ``` | |
| GROQ_API_KEY=your_key_here | |
| ``` | |
| Get a free key at [console.groq.com](https://console.groq.com). | |
| **5. Run the app** | |
| ```bash | |
| streamlit run app.py | |
| ``` | |
| --- | |
| ## Testing | |
| Test the memory core and chat logic without the UI: | |
| ```bash | |
| # Test memory storage, retrieval, and deduplication | |
| python test_extractor.py | |
| # Interactive terminal chat | |
| python chatbot.py | |
| ``` | |
| --- | |
| ## Roadmap | |
| - [ ] FastAPI backend (decouple UI from logic) | |
| - [ ] Multi-user support with per-user memory namespaces | |
| - [ ] Memory decay scoring (stale facts fade out) | |
| - [ ] Deploy to Hugging Face Spaces | |