Write notes. VectorMind watches you, understands what you wrote, compares it against everything you've studied, and tells you instantly β what's right, what's wrong, and what's missing.
The most powerful feature β a real-time AI tutor that watches your notes folder and gives you structured feedback every time you save a .txt file.
| What it does | How it helps you |
|---|---|
| Already-studied detector | "You covered this in ML/week2.txt β don't re-learn it, connect it!" |
| Correctness check | Flags factual errors or vague definitions you wrote |
| Incompleteness detector | Points out what's missing from your notes |
| Smart suggestions | Tells you what to study next based on your vault |
| Encouragement | A short motivational message after every save |
The Live Agent tab auto-refreshes every 5 seconds β just write in any editor (VS Code, Notepad, Obsidianβ¦) and watch the feedback appear.
- Semantic search across all your notes using local embeddings (no API key needed)
- Notes are embedded automatically into LanceDB on every file save
- Near-duplicate detection prevents redundant indexing
- Interactive force-directed graph of your entire vault
- Nodes = notes, edges = semantic similarity
- Color-coded by top-level topic folder
- Drag, zoom, hover β powered by PyVis
On-demand AI actions (button-click, no background processing):
- Summarize β 3-5 sentence summary + key terms
- Generate quiz β 4 Q&A pairs grounded in your notes
- Explain simply β beginner-friendly re-explanation
- Flashcards β JSON export for Anki/other tools
- Structured notes β full standalone HTML page with sections, quizzes, and toggles
- Reactive notes lab β AI generates typed blocks (text, list, quiz, image, reference) you can iteratively refine
Built-in note editor that saves directly into the notes/ hierarchy and triggers the watcher immediately.
Stats about your vault: indexed count, most recent saves, topics by frequency.
Notion-style sidebar view of your notes/ folder tree.
βββββββββββββββββββββββββββββββββββββββββββββββ
β notes/*.txt β β You write here (any editor)
ββββββββββββββββββββββββ¬βββββββββββββββββββββββ
β file save
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β watcher.py (watchdog) β β Detects every .txt save
ββββββββ¬ββββββββββββββββββββββββββββ¬βββββββββββ
β index (no LLM) β analyze (background)
βΌ βΌ
ββββββββββββββ ββββββββββββββββββββ
β ingest.py β β live_agent.py β
β embed+store β β diff + vault RAG β
βββββββ¬βββββββ β β Ollama (llama) β
β ββββββββββ¬ββββββββββ
βΌ β review JSON
ββββββββββββββ ββββββββββΌββββββββββ
β LanceDB βββββββββββββββ event queue β
β (vector β β (deque, max 50) β
β store) β ββββββββββ¬ββββββββββ
ββββββββββββββ β poll every 5s
ββββββββββΌββββββββββ
β ui.py (Gradio) β β You see feedback here
β π΄ Live Agent tabβ
ββββββββββββββββββββ
All AI runs locally β Ollama serves the llama3.2:1b model, BGE-small embeddings run via sentence-transformers. No data leaves your machine.
- Python 3.12+
- Ollama installed and running
uvpackage manager (recommended) orpip
# Install Ollama from https://ollama.com/download (Windows/Mac/Linux)
ollama serve # start the Ollama server (leave running)
ollama pull llama3.2:1b # download the model (~1 GB)You can use a larger model (e.g.
llama3.2:3b,mistral) by changingOLLAMA_MODELinai_engine.pyandlive_agent.py.
git clone <your-repo-url>
cd study-assistant
# Option A: uv (fast, recommended)
pip install uv
uv sync
# Option B: plain pip
pip install -r requirements.txt # or: pip install gradio lancedb sentence-transformers watchdog requests pyvis pandas# With uv
uv run python main.py
# With plain Python
python main.pyThe app will open at http://localhost:7860 in your browser.
study-assistant/
βββ main.py # Entry point β starts watcher thread + Gradio UI
βββ watcher.py # Watchdog observer β detects .txt saves, triggers indexing + live agent
βββ live_agent.py # π΄ Live Study Agent β diff, vault RAG, Ollama review, event queue
βββ ai_engine.py # On-demand RAG functions (summarize, quiz, explain, flashcards, β¦)
βββ prompts.py # Prompt templates for all LLM calls
βββ ingest.py # Clean β embed β LanceDB (no LLM)
βββ processor.py # Text cleaning utilities
βββ ui.py # Gradio dashboard (all 7 tabs)
βββ graph_viz.py # Knowledge graph builder (PyVis)
βββ library_tree.py # Folder tree renderer
βββ memory/
β βββ embedding.py # BGE-small sentence-transformers wrapper
β βββ vector_store.py # LanceDB CRUD + search + insights
βββ notes/ # β Write your .txt notes HERE (auto-created)
β βββ Topic/
β βββ Chapter/
β βββ page.txt
βββ db/ # LanceDB vector database (auto-created)
βββ output/ # Exported files (graph.html, flashcards.json, β¦)
βββ pyproject.toml # Dependencies
- Start the app (
python main.py) β the watcher starts automatically. - Open the
π΄ Live Agenttab in the Gradio UI. - Edit any
.txtfile in thenotes/folder using your favourite editor. - Save the file (Ctrl+S).
- Within ~10β30 seconds, the Live Agent tab will show a review card:
π `my_note.txt` Β· 14:32:07 Β· βοΈ +42 chars
π Related vault notes: `ML/week2.txt`, `CS101/arrays.txt`
#### π You've already studied this!
- Binary Search Trees (from `CS101/trees.txt`) β you covered AVL rotations here
#### β
What looks correct
- The definition of a node is accurate
- Time complexity of search is correctly stated as O(log n)
#### β οΈ Wrong or incomplete
- β Insertion complexity stated as O(1)
- π¬ Fix: Insertion in a BST is O(log n) average, O(n) worst case
#### π‘ Next steps
- Add a comparison with AVL trees and Red-Black trees
- Cover the deletion algorithm with all 3 cases
> π Great progress β your understanding of tree fundamentals is solid!
The feed auto-refreshes every 5 seconds. Use Refresh now for instant update.
| Setting | File | Default | Description |
|---|---|---|---|
| LLM model | ai_engine.py, live_agent.py |
llama3.2:1b |
Any Ollama-served model |
| Ollama URL | ai_engine.py, live_agent.py |
http://localhost:11434 |
Change if Ollama runs remotely |
| Embedding model | memory/embedding.py |
BAAI/bge-small-en-v1.5 |
Any sentence-transformers model |
| Notes directory | ingest.py |
notes/ |
Relative to project root |
| Debounce delay | watcher.py |
2.5s |
Wait time after last file write |
| Agent feed size | live_agent.py |
50 events | Max events kept in memory |
| UI refresh rate | ui.py |
5s |
gr.Timer interval |
# Run just the watcher (no UI)
python watcher.py
# Run just the UI (no live-agent)
python -c "from ui import launch_ui; launch_ui()"
# Manually trigger the live agent on a file
python -c "
from live_agent import analyze_note_change
r = analyze_note_change('notes/test.txt', open('notes/test.txt').read())
import json; print(json.dumps(r, indent=2))
"| Package | Purpose |
|---|---|
gradio |
Web UI |
watchdog |
File system monitoring |
lancedb |
Local vector database |
sentence-transformers |
BGE-small embeddings (local) |
requests |
Ollama HTTP API |
pyvis |
Knowledge graph visualization |
pandas |
Data manipulation for LanceDB |
- Multi-file diff view in Live Agent
- Spaced repetition scheduler based on vault history
- Export vault to Anki deck (
.apkg) - Support for
.mdand.pdfnotes - Live Agent webhook / desktop notification
MIT β use it, fork it, learn from it.
Built with β€οΈ for learners who take notes. Powered by local AI β your data never leaves your machine.