.. | ||
graph.html | ||
index.html | ||
package.json | ||
README.md |
Mem0 Chat Frontend
A simple, clean frontend for chatting with your Mem0 memories.
Features
- Chat Interface: Send messages and get AI responses with memory context
- Memory Sidebar: View all your memories with timestamps
- Memory Management: Delete individual memories with confirmation
- Persistent Chat: Chat history saved in localStorage (survives page refresh)
- Real-time Updates: Memories automatically refresh after each chat
- Simple & Clean: No fancy animations, just working functionality
Setup
-
Make sure the backend is running on
http://localhost:8000
-
Open the frontend by simply opening
index.html
in your browser:open frontend/index.html
Or serve it with a simple HTTP server:
cd frontend python3 -m http.server 8080 # Then open http://localhost:8080
Usage
- Start chatting - Type messages in the input field and press Enter or click Send
- View memories - All extracted memories appear in the right sidebar
- Delete memories - Click the "Delete" button on any memory (with confirmation)
- Refresh memories - Click the 🔄 button to manually refresh the memories list
- Persistent history - Your chat history is saved and will reload when you refresh the page
Configuration
- User ID: Hardcoded as "pratik" in the JavaScript
- Backend URL:
http://localhost:8000
(change in the JavaScript if needed) - Memory Limit: Loads up to 50 memories
Debugging
Open browser console and use:
clearChatHistory()
- Clear all stored chat history
Files
index.html
- Complete frontend (HTML + CSS + JavaScript all in one file)README.md
- This file
API Integration
The frontend uses these backend endpoints:
POST /chat
- Send messages and get responsesGET /memories/pratik
- Load user memoriesDELETE /memories/{id}
- Delete specific memory
Simple, functional, and clean - exactly as requested!