DEV Community

Dineshwar Doddapaneni
Dineshwar Doddapaneni

Posted on

SecondBrain AI

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

My close friend is a relentless learner who documents everything—from technical courses and side-project logs to articles and even personal cooking secrets. Over the years, their digital footprint has become enormous. When they actually need to recall a specific piece of information, like a command syntax or the exact proportions for a family recipe, it gets buried across messy markdown files, local PDFs, and scattered notes.

To solve this, I built SecondBrain-Local: an entirely offline, private, and autonomous AI retrieval assistant. It automatically ingests their personal notes, PDFs, Word documents, and presentations into a local vector store via a background agent. It uses a vision-language model to read tables and images in the documents, and a text model to answer questions. They can now chat with their own knowledge base instantly without sending a single byte of data to external cloud APIs.

Demo

https://github.com/dinesh9-ai/Hacktoberfest2026_withAI/tree/main/Week_1/Demo

Code

https://github.com/dinesh9-ai/Hacktoberfest2026_withAI/tree/main/Week_1/Code

How I Built It

SecondBrain-Local is engineered from the ground up to run air-gapped on standard hardware with zero internet dependency, utilizing powerful open-weight models:

  1. Local LLM Runtime: Powered by Ollama running llama3.1:8b for prompt completion and reasoning, and glm-ocr to parse complex tables and images.
  2. Orchestration & Indexing: Built using LangChain to parse heterogeneous file formats (Markdown, PDF, Text, PPTX, Docx) and chunk documents efficiently.
  3. Vector Database: Utilizes ChromaDB coupled with nomic-embed-text for local embedding storage and fast similarity search over unstructured knowledge.
  4. Workflow Automation: A Python watchdog script acts as an autonomous agent, automatically watching local directories and updating the vector embeddings seamlessly whenever my friend adds new materials.

Why Does Open Innovation Matter?

Open innovation and open-weight models made this project possible in ways a closed API never could:

  1. Absolute Privacy: My friend stores sensitive personal notes, private thoughts, and confidential project ideas. Running open-weight models locally ensures that personal data never leaves their machine and is never sent to third-party servers.
  2. Zero Cost & Infinite Reliability: Because there are no per-token API fees or cloud dependencies, my friend can query their second brain endlessly without worrying about rate limits, internet outages, or subscription costs.
  3. Multi-Modal Agility at the Edge: Combining a specialized vision model (glm-ocr) with a robust reasoning model (llama3.1) completely offline demonstrates the power of composable open-source frameworks to tackle complex, messy real-world files like scanned PDFs.

My Agent Session

I used an AI coding assistant to help architect the background watchdog loop and debug the PyMuPDF image extraction logic so it would correctly format the image bytes for the local GLM-OCR model. Iterating with an agent helped me quickly switch from a standard text-only RAG to a multi-modal pipeline without getting bogged down in PDF byte-stream errors.

Top comments (0)