Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Local-first AI extension that turns what you read into a searchable knowledge graph with hybrid search, temporal context, and proactive recall—fully private.

License

Notifications You must be signed in to change notification settings

zrg-team/memorall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memorall Icon

Memorall 🧠

AI-Powered Personal Knowledge Assistant

Build your digital memory with AI that runs entirely in your browser

License: MIT Extension.js TypeScript React Privacy Focused


Memorall is an AI-powered browser extension that transforms how you manage digital knowledge. It seamlessly captures, organizes, and recalls information from your browsing experience while maintaining complete privacy through local AI processing.

📋 Table of Contents

📸 Demo

See Memorall in action! The extension seamlessly integrates with your browsing experience to build a personal knowledge base.

🎬 Quick Demo

Memorall Demo

📷 Screenshots

Main Interface Knowledge Graph Memory Recall
Page Summary Entity Recognition Knowledge Building
Context Awareness

🎯 Use Cases

  • 📚 Research & Learning: Summarize articles, papers, and documentation while browsing
  • 📝 Note Taking: Ask AI to remember key points from meetings, videos, or conversations
  • 🏗️ Knowledge Building: Build a personal knowledge base that grows with your browsing
  • 🔄 Context Switching: Quickly recall what you were working on across different projects
  • 🔗 Information Synthesis: Let AI help connect related memories and insights

🛠️ Technical Architecture

  • ⚛️ Frontend: React with TypeScript
  • 🧠 AI Engine: WebAssembly-based language models (Wllama) + HuggingFace Transformers
  • 🗄️ Database: PGlite (PostgreSQL in the browser) with vector embeddings
  • 🔧 Extension Framework: Extension.js
  • 🎨 Styling: Tailwind CSS with Radix UI components

🕸️ Knowledge Graph Engine

The Knowledge Graph Flow is Memorall's core intelligence module that transforms unstructured content into interconnected knowledge:

🧠 How It Works

  1. 📄 Content Processing: Analyzes web pages, documents, and conversations
  2. 🔍 Entity Extraction: Identifies people, organizations, concepts, and locations
  3. 💡 Relationship Discovery: Finds connections between entities
  4. ⏰ Temporal Understanding: Captures when relationships were established
  5. 🕸️ Knowledge Building: Creates a persistent, searchable knowledge graph

✨ Key Capabilities

  • 🎯 Smart Deduplication: Prevents duplicate entities (e.g., "Dr. Smith" = "John Smith")
  • 🔄 Incremental Learning: Continuously builds knowledge from new content
  • 🕐 Temporal Awareness: Tracks how relationships change over time
  • 🔍 Hybrid Search System: Three-tier search using SQL, trigram matching, and vector similarity
  • 🎯 Intelligent Fallback: Automatic failover to vector search when needed for optimal recall
  • 📈 Context Building: Connects new information to existing knowledge

💼 Real-World Examples

  • Research: "Alice published a paper on AI safety in 2023" → Creates entities for Alice (Person), AI Safety (Concept), and their relationship with publication date
  • Professional: "Google acquired DeepMind" → Links companies and captures acquisition relationship
  • Personal: "Met Sarah at the conference last week" → Records social connection with temporal context

🔍 Advanced Search Technology

Memorall uses a sophisticated three-tier hybrid search system for optimal knowledge retrieval:

  1. SQL Search (60%): Lightning-fast exact pattern matching using database indexes
  2. Trigram Search (40%): Fuzzy text matching with PostgreSQL's pg_trgm extension for typo tolerance
  3. Vector Fallback: Intelligent semantic similarity using embeddings when primary methods yield insufficient results

This approach ensures both high performance and comprehensive recall, making knowledge discovery both fast and thorough.

The Knowledge Graph enables Memorall to provide contextual, intelligent responses by understanding not just what you've encountered, but how everything connects together.

📚 Detailed Documentation - Learn more about the architecture and implementation

🏗️ Architecture Details

🧠 AI Components

  • 🤖 Language Model: Wllama (WebAssembly-based LLM)
  • 📊 Embeddings: HuggingFace Transformers for text embeddings
  • 🔍 Hybrid Search Engine:
    • SQL Search (60%): Fast exact pattern matching using database indexes
    • Trigram Search (40%): Fuzzy text matching with PostgreSQL's pg_trgm extension
    • Vector Fallback: Semantic similarity using embeddings when primary methods insufficient

🗄️ Data Storage

  • 💬 Conversations: Chat history and context
  • 🕸️ Knowledge Graph: Nodes, edges, and relationships between concepts
  • 📊 Embeddings: Vector representations for semantic search
  • 📜 Sources: Webpage content and metadata

📚 Documentation

🏗️ Core Services

🧠 Knowledge Graph & AI

🔀 Extension Flow

High-level flow showing clear separation between UI, background coordination, content script injection, and offscreen processing.

graph TD
  %% UI Layer - Direct to Offscreen via Background Jobs
  UI[UI Surfaces] -.->|background-jobs| JQ[Job Queue]

  %% Background Script - Context Menus & Content Script Communication Only
  BG[Background Script] -->|inject & extract| CS[Content Scripts]
  CS -->|page data| BG
  BG -->|enqueue extracted data| JQ

  %% Offscreen Processing
  JQ --> OFF[Offscreen Document]
  OFF --> SVC[Core Services\nLLM/Embedding/DB/Remember/KG]
  OFF -->|claim & process| JQ

  %% Content Scripts - Page Injection Only
  CS -.->|page context| WEB[Web Pages]
Loading

🔄 Communication Patterns

  • UI Surfaces → Offscreen Document: Direct communication via Job Queue (no background script involvement)
  • Background Script → Content Scripts: Context menu actions trigger content script data extraction
  • Content Scripts → Background Script: Return extracted page data (HTML, selections, metadata)
  • Background Script → Offscreen Document: Enqueue extracted data for processing via Job Queue
  • Offscreen Document ↔ Job Queue: Claim jobs, process data, update status

📦 Component Responsibilities

  • Background Script: Context menu registration, content script communication, and job enqueueing only
  • Job Queue: Cross-context job queue with progress tracking and offscreen processing
  • UI Surfaces: Directly use job queue service for user actions
  • Content Scripts: Page data extraction and injection (communicate only with background script)
  • Offscreen Document: Heavy processing, AI operations, and database work to keep UI responsive

🏷️ Component Aliases

  • UI Surfaces: popup.html & standalone.html - Extension popup and full-page interfaces
  • Background Script: src/background.ts - Chrome extension service worker
  • Job Queue: src/services/background-jobs/* - Cross-context job management system
  • Content Scripts: Injected scripts in web pages for data extraction
  • Offscreen Document: public/offscreen.html - Dedicated processing environment
  • Core Services: Database, LLM, Embedding, Remember, and Knowledge Graph services

📋 Installation & Development

🚀 Quick Start

git clone <repository-url>
cd memorall
npm install
npm run build
# Load the 'dist' folder in your browser's extension manager

🔧 Available Commands

Command Description
npm run dev 🚀 Development mode with hot reloading
npm run build 📦 Production build
npm run preview 👀 Preview built extension
npm run type-check 🔍 TypeScript type checking

🌐 Load Extension in Browser

  1. Open your browser's extension management page
  2. Enable "Developer mode"
  3. Click "Load unpacked" and select the dist folder
  4. First launch will download and initialize AI models (one-time setup)

🤝 Contributing

🐛 Bug Reports

  • Use GitHub Issues to report bugs
  • Include steps to reproduce and expected behavior
  • Provide browser and extension version information

💡 Feature Requests

  • Open a GitHub Issue with "enhancement" label
  • Describe the feature and its benefits
  • Consider submitting a pull request

🔧 Development Workflow

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Make changes following existing code style
  4. Test thoroughly
  5. Submit pull request with clear description

📝 Documentation

  • Improve documentation and examples
  • Fix typos and clarify instructions
  • Add tutorials or guides

💬 Support

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ using Extension.js • Made for privacy-conscious knowledge workers

⭐ Star this repo🐛 Report Issue💡 Request Feature

About

Local-first AI extension that turns what you read into a searchable knowledge graph with hybrid search, temporal context, and proactive recall—fully private.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published