Skip to main content

Personal knowledge graph system for Obsidian vaults with hybrid search

Project description

Mnemo — Personal Knowledge Graph for Obsidian

PyPI version License: MIT Python 3.10+

Turn your Obsidian vault into a queryable knowledge graph with hybrid search (vector + graph traversal).

Features

  • Automatic Graph Building — Parses [[wikilinks]], YAML frontmatter, and tags from your Obsidian vault into a NetworkX knowledge graph
  • Hybrid Search — Combines vector similarity search with graph-based multi-hop traversal
  • Ontology Classification — Auto-classifies entities (Person, Concept, Project, Tool, Insight, etc.)
  • Knowledge Collectors — Web clipping, trust evaluation, and automated knowledge pipeline
  • REST API — FastAPI server for programmatic access
  • Obsidian Plugin — Companion plugin for in-vault queries (see obsidian-plugin/)
  • CLI Interface — Full-featured command-line tool for graph operations

Quick Start

Installation

# Core (graph + CLI)
pip install mnemo-secondbrain

# With API server
pip install mnemo-secondbrain[api]

# With sentence-transformers embeddings
pip install mnemo-secondbrain[sbert]

# Everything
pip install mnemo-secondbrain[all]

Configuration

Create a config.yaml (see config.example.yaml):

vault_path: ~/Documents/MyVault
embedding:
  provider: sbert          # or "openai", "ollama"
  model: all-MiniLM-L6-v2

Or use environment variables:

Variable Description Example
MNEMO_VAULT_PATH Path to your Obsidian vault ~/Documents/MyVault
OPENAI_API_KEY OpenAI API key (if using OpenAI embeddings) sk-...

CLI Usage

# Build the knowledge graph from your vault
mnemo build

# Search your knowledge graph
mnemo search "machine learning fundamentals"

# Show graph statistics
mnemo stats

# Export graph
mnemo export --format graphml

API Server

# Start the API server (requires mnemo-secondbrain[api])
mnemo serve --host 0.0.0.0 --port 8000

Endpoints:

Method Path Description
GET /api/search Hybrid search
GET /api/graph/stats Graph statistics
GET /api/graph/node/{id} Get node details
GET /api/graph/neighbors/{id} Get node neighbors

Obsidian Plugin

The companion Obsidian plugin lives in obsidian-plugin/. See its README for installation instructions. It connects to the Mnemo API server for in-vault search and graph visualization.

Architecture

Obsidian Vault (Markdown + YAML + [[links]])
        ↓  parse
   NetworkX Graph (in-memory)
        ↓  embed
   Vector Index + Graph Index
        ↓  query
   Hybrid Search (vector + graph traversal)
        ↓  rerank
   Results with context

Development

git clone https://github.com/jini92/MAISECONDBRAIN.git
cd MAISECONDBRAIN
pip install -e ".[dev,all]"
pytest

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemo_secondbrain-0.2.0.tar.gz (101.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnemo_secondbrain-0.2.0-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file mnemo_secondbrain-0.2.0.tar.gz.

File metadata

  • Download URL: mnemo_secondbrain-0.2.0.tar.gz
  • Upload date:
  • Size: 101.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for mnemo_secondbrain-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d43b237d61757a137d7192efde7fa340515f1245a9101883f133fad8e7d9af51
MD5 28975a784caa6f10ee169447d1cf8b6a
BLAKE2b-256 dbb689acf0b726efa742a3a1bb7dd07573ead8ea571635b90e67810cbf98473a

See more details on using hashes here.

File details

Details for the file mnemo_secondbrain-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mnemo_secondbrain-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62387338b499427f9e21d67915fab56953355380d2c70c388451ce5bf086a335
MD5 56db8d53b2135573d8832e16597df9ee
BLAKE2b-256 49bf640e2318780c811de2f01699135f2dcc90737dfa9161f44748c19a6259bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page