- Pipeline stages
- 20
- Layers of synthesis
- 3
- Lines of Python
- 11k+
NestBrain is a project by Ahmed El Euch, who worked on it as sole developer, built with Python, PyQt6, NVIDIA NIM, DeepSeek, NotebookLM, Zotero API, NetworkX, Playwright, PyInstaller, Docker.
Demo · 1:38A walkthrough of NestBrain: choosing a Zotero collection, running the research pipeline, reading the note it writes and exploring the brain map of the vault.

What was built
- 01
Designed a 20-stage research pipeline that syncs Zotero collections, ingests new sources into Google NotebookLM and drives an iterative question-and-answer loop to research each topic in depth.
- 02
Built three layers of synthesis: an LLM plans a taxonomy of research questions and writes a master note; an extraction pass keeps only entities above 0.75 confidence and creates or merges a note for each; a propagation pass embeds the new note, finds its five nearest neighbours, has a reranker audit each link and annotates the related notes.
- 03
Wrote an LLM vault classifier with retries and keyword fallbacks that files every note into a folder taxonomy, with semantic deduplication and inline [[wikilinks]], so the vault stays organised as it grows.
- 04
Built a PyQt6 desktop app with an interactive brain map of the vault (NetworkX graph, notes coloured by category) and background worker threads, so long pipeline runs never freeze the interface.
- 05
Made every run auditable and incremental: a registry tracks which sources were already processed, and each run leaves a JSON archive, filing and seeding logs and an embedding index.
- 06
Shipped it as a one-click Windows installer (PyInstaller and Inno Setup, with a bundled Chromium for NotebookLM sign-in) and an optional Docker image, backed by 58 unit tests.
Problem
A literature review means reading dozens of papers, writing notes on each, and keeping track by hand of how the ideas connect. Reference managers such as Zotero store the sources, but the understanding, and the links between topics, stay in the researcher's head.
Solution
NestBrain automates the whole path from source to knowledge. For each Zotero collection it provisions a NotebookLM notebook, uploads only the new sources, and lets an LLM plan the research questions, ask them, follow up on weak answers and synthesise a structured master note. It then extracts the key concepts, seeds or merges a note for each, files everything into a taxonomy and links related notes across the vault, using NVIDIA NIM models for reasoning, embeddings and reranking.
Results
A working Windows desktop app, distributed as an installer, that turns a reading list into a filed, cross-linked Markdown vault and shows it as a navigable brain map. Every decision the pipeline makes (filing, merging, linking) is logged, so its output can be checked rather than trusted blindly.
Case study
How a collection becomes knowledge
Layer 1: research. NestBrain reads the collection's titles and abstracts and asks an LLM for a taxonomy of research questions. It puts each one to NotebookLM, which answers from the uploaded sources, detects low-signal answers, asks follow-ups and adds coverage questions until the topic is covered. The answers are synthesised into a master note with a fixed structure: academic synthesis, conceptual deep dive, actionable knowledge, connections, critical evaluation and a glossary.
Layer 2: concepts. An extraction pass pulls out the concepts, people and organisations the note relies on, keeping only those above 0.75 confidence. Each one is checked against the existing vault for a semantic duplicate: a match is merged into the existing note, anything new gets its own note, filed by the classifier. The master note's mentions are then woven into [[wikilinks]].
Layer 3: propagation. The finished note is embedded and compared with the whole vault. The five closest notes go to a reranking model, and only the links it confirms are written back into the related notes, so new knowledge reaches old notes without drowning them in weak connections.
Engineering choices
- Incremental by design. A registry remembers each collection's notebook and processed sources, so a re-run only ingests what is new.
- Resilient to the model. The question planner, synthesiser, extractor and classifier each have a structured fallback, and a failure is recorded as a warning rather than stopping the run.
- A responsive desktop app. Pipeline runs, Zotero syncs and graph builds each run on their own worker thread and report progress back to the interface.
- Distribution. Packaged with PyInstaller and Inno Setup, with Chromium bundled so NotebookLM sign-in works on a machine with no Python installed.