๐Ÿง  Memoria โ€” AI Memory Intelligence System

An intelligent memory orchestration layer for AI assistants โ€” without retraining the model.


๐Ÿ“ธ Screenshots

### ๐Ÿ–ฅ๏ธ Main Dashboard โ€” 3-Panel Layout Memoria Dashboard

### ๐Ÿ’ฌ Chat with Memory Retrieval & Explainable AI Chat with Memory Retrieval

### ๐Ÿ“ก Backend API Documentation (FastAPI + Swagger) API Documentation

๐ŸŽฏ What is Memoria?

Memoria is a full-stack AI Memory Intelligence System that gives any LLM a persistent, intelligent memory. Instead of retraining models, it:

  • ๐Ÿง  Stores memories with semantic embeddings across 5 memory types
  • ๐Ÿ” Retrieves relevant memories using hybrid search (vector + keyword + metadata)
  • ๐Ÿ“Š Ranks memories with a multi-factor scoring system
  • ๐Ÿ’‰ Injects only the best memories into LLM prompts
  • ๐Ÿ’ก Explains exactly why each memory was selected

Think of it as "ChatGPT with a brain-like adaptive memory system."


โœจ Key Features

### ๐Ÿ”ฎ Memory Engine - **5 memory types**: `preference` ยท `long_term` ยท `session` ยท `episodic` ยท `semantic` - **Conflict resolution**: auto-detects contradictions, prioritizes recent truth - **Feedback loop**: ๐Ÿ‘/๐Ÿ‘Ž voting updates future ranking scores ### ๐ŸŽฏ Hybrid Retrieval - Semantic vector search via **Qdrant** - Keyword overlap matching - Metadata filtering by type - Configurable top-K selection
### ๐Ÿ“Š Intelligent Ranking ``` final_score = 0.45 ร— semantic_similarity + 0.20 ร— recency + 0.15 ร— importance + 0.10 ร— feedback_score + 0.10 ร— contextual_match ``` ### ๐Ÿงช Explainable AI Every retrieved memory comes with: - โœ… Similarity percentage - ๐Ÿ“ˆ Score breakdown (5 factors) - ๐Ÿ’ฌ Human-readable reasons - ๐Ÿ… Rank position
### ๐Ÿ’Ž Premium UI Futuristic 3-panel dark theme ยท Glassmorphism & glow effects ยท Smooth Framer Motion animations ยท Real-time streaming responses ยท Live latency sparklines & system metrics

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                โ”‚   โ”‚              FastAPI Backend              โ”‚   โ”‚              โ”‚
โ”‚  React + Vite  โ”‚โ”€โ”€โ–ถโ”‚  Memory Engine โ†’ Ranking โ†’ Compression   โ”‚โ”€โ”€โ–ถโ”‚   Qdrant DB  โ”‚
โ”‚  + TailwindCSS โ”‚   โ”‚  Conflict Resolver โ†’ Explanation Engine  โ”‚   โ”‚  (Vectors)   โ”‚
โ”‚  + Framer      โ”‚โ—€โ”€โ”€โ”‚  LLM Service (OpenAI-compatible + Mock)  โ”‚   โ”‚              โ”‚
โ”‚                โ”‚   โ”‚                                          โ”‚   โ”‚              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                        โ”‚
                                        โ–ผ
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚  sentence-        โ”‚
                              โ”‚  transformers     โ”‚
                              โ”‚  BAAI/bge-small   โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • (Optional) Docker for Qdrant server

Backend Setup

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Copy environment file
cp .env.example .env
# Edit .env to add your OpenAI API key (optional โ€” mock mode works without it)

# Start the server
uvicorn app.main:app --reload --port 8000

โšก First startup downloads the embedding model (~130MB) โ€” takes ~30 seconds. After that, startup is fast.

Frontend Setup

cd frontend

# Install dependencies
npm install

# Start dev server
npm run dev

Open http://localhost:5173 โ€” you're ready! ๐ŸŽ‰


๐Ÿ”— Live Demo

Service URL Status
๐ŸŒ Frontend memoria-ai-memory-intelligence.vercel.app Vercel
๐Ÿ“ก Backend API memoria-ai-backend.hf.space HuggingFace

๐Ÿ”‘ Environment Variables

Variable Default Description
OPENAI_API_KEY sk-mock-key OpenAI API key (mock mode if not set)
OPENAI_MODEL gpt-4o-mini LLM model name
QDRANT_MODE memory memory (in-process) or server (Docker)
EMBEDDING_MODEL BAAI/bge-small-en-v1.5 Sentence transformer model

๐Ÿ“ก API Endpoints

Method Endpoint Description
POST /chat Send message, get memory-augmented response
POST /chat/stream Same as above, but streaming (SSE)
POST /memory/store Store a new memory
GET /memory/search?query=... Search memories by query
GET /memory/all List all stored memories
POST /memory/feedback Submit ๐Ÿ‘/๐Ÿ‘Ž feedback
GET /metrics System metrics for dashboard
GET /health Health check endpoint

๐Ÿ’ก Full interactive API docs available at /docs


๐Ÿ› ๏ธ Tech Stack

Layer Technology
Frontend React, TypeScript, Vite, TailwindCSS v4, Framer Motion, shadcn/ui, Lucide Icons
Backend FastAPI, Python, Pydantic v2, SSE Streaming
Vector DB Qdrant (in-memory or server mode)
Embeddings sentence-transformers (BAAI/bge-small-en-v1.5, 384-dim)
LLM OpenAI-compatible API (with mock fallback)
Deployment Vercel (Frontend) ยท HuggingFace Spaces (Backend) ยท Docker

๐Ÿ“ Project Structure

memoria/
โ”œโ”€โ”€ frontend/                # React + Vite + TailwindCSS
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ chat/        # Neural Chat panel
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ memory/      # Memory Bank timeline
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/   # Intelligence metrics panel
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ui/          # Reusable UI components (shadcn)
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/           # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ lib/             # Utility functions
โ”‚   โ”‚   โ””โ”€โ”€ App.tsx          # Main 3-panel layout
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ backend/                 # FastAPI + Python
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py          # App entry point + CORS
โ”‚   โ”‚   โ”œโ”€โ”€ config.py        # Environment configuration
โ”‚   โ”‚   โ”œโ”€โ”€ routes/          # API route handlers
โ”‚   โ”‚   โ”œโ”€โ”€ services/        # Business logic (memory, LLM, ranking)
โ”‚   โ”‚   โ”œโ”€โ”€ models/          # Pydantic schemas
โ”‚   โ”‚   โ””โ”€โ”€ database/        # Qdrant vector store
โ”‚   โ””โ”€โ”€ requirements.txt
โ”œโ”€โ”€ Dockerfile               # Backend container
โ”œโ”€โ”€ docker-compose.yml       # Full stack orchestration
โ””โ”€โ”€ README.md

๐Ÿ† Built for Hackathon

This project is designed to be demo-friendly:

  • โšก Zero config โ€” Works out of the box with in-memory Qdrant and mock LLM
  • ๐Ÿ“ฆ Pre-seeded โ€” Comes with 15 sample memories across all categories
  • ๐Ÿ‘๏ธ Visual โ€” Every feature is visible in the UI โ€” no hidden functionality
  • ๐Ÿง  Explainable โ€” Shows exactly how the AI makes memory decisions
  • ๐Ÿš€ Deployed โ€” Live on Vercel + HuggingFace Spaces

๐Ÿค Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


**Built with โค๏ธ for the Hackathon** โญ Star this repo if you found it useful!

Built With

Share this project:

Updates