explaingit

alsgur9865-sketch/second-brain-engine

Analysis updated 2026-05-18

10PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A personal knowledge engine where AI tools like Claude Code write notes and you browse them as a visual graph. Supports semantic search, local-AI question answering, and automatic duplicate cleanup.

Mindmap

mindmap
  root((second-brain-engine))
    What it does
      Store Markdown notes
      Semantic search by meaning
      Visual graph browser
    AI Integration
      MCP agent memory
      Claude Code recall
      RAG question answering
    Note Management
      Duplicate detection
      Auto merge and relink
      Relation edge labeling
    Tech Stack
      Python FastAPI
      Chroma vector DB
      Ollama local LLM
      Pluggable embeddings
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Let Claude Code or Cursor automatically save project decisions and recall them in future sessions

USE CASE 2

Build a personal knowledge graph from Markdown notes with visual browsing in the browser

USE CASE 3

Ask questions about your own notes and get answers backed only by what you have written, with no hallucination

USE CASE 4

Automatically detect and merge duplicate notes in an existing Obsidian-style vault

What is it built with?

PythonFastAPIChromaOllamaMCP

How does it compare?

alsgur9865-sketch/second-brain-enginecompumaxx/gba-video-studiojjohnson5253/brickbuilderai
Stars101010
LanguagePythonPythonPython
Setup difficultymoderatehardmoderate
Complexity3/54/54/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Ollama running locally and a one-time ~2 GB embedding model download before the engine can index notes.

No license information is stated in the README.

In plain English

Second Brain Engine is a personal knowledge system that stores notes as Markdown files and lets you search them by meaning rather than exact keywords. It is designed to work alongside AI coding tools: an agent like Claude Code or Cursor can automatically save facts, decisions, and reminders into the system while you work, and you can later recall them through a visual graph in your browser. The core idea is that the agent writes and the human reads. When Claude Code is connected, it can call remember to save a note and recall to search for related ones. On the human side, opening localhost:8000 shows a browser graph where notes appear as colored nodes connected by links. Green edges show direct note-to-note links. Gray edges show notes that are semantically similar even without an explicit link. You can click any node to read its content. The search works on meaning, not keywords. Asking how many days to get a refund will surface notes about return policies even if they never use those exact words. A separate ask endpoint goes further: it searches your notes and passes the results to a local AI model, which then answers your question using only what is in your notes. If the answer is not there, it says so rather than guessing. The engine keeps notes clean over time. It detects near-duplicate notes by comparing their meanings, merges them on request, and rewires any internal links that pointed to the old version. When you edit a note, any relationship labels connecting it to other notes are automatically re-evaluated so outdated tags do not pile up. Setup requires Python, Ollama for a local embedding model, and cloning the repo. The first embedding model download is about 2 gigabytes. You can swap the embedding backend for OpenAI or other services with a single environment variable. The system also includes a sample note vault to try before setting up your own.

Copy-paste prompts

Prompt 1
How do I connect second-brain-engine as MCP memory for Claude Code so it auto-saves and recalls facts from my sessions?
Prompt 2
I want to replace the default bge-m3 embeddings with OpenAI. How do I set the environment variable and trigger an index rebuild?
Prompt 3
How do I use the /ask endpoint in second-brain-engine to answer questions strictly from my notes without any hallucination?
Prompt 4
How does the graph view distinguish between wiki-link edges and semantic similarity edges in second-brain-engine?

Frequently asked questions

What is second-brain-engine?

A personal knowledge engine where AI tools like Claude Code write notes and you browse them as a visual graph. Supports semantic search, local-AI question answering, and automatic duplicate cleanup.

What language is second-brain-engine written in?

Mainly Python. The stack also includes Python, FastAPI, Chroma.

What license does second-brain-engine use?

No license information is stated in the README.

How hard is second-brain-engine to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is second-brain-engine for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub alsgur9865-sketch on gitmyhub

Verify against the repo before relying on details.