Transform your Obsidian vault into an intelligent knowledge graph using AI-powered entity and relationship extraction.
git clone https://github.com/kineviz/Obsidian-knowledgemap.git
cd Obsidian-knowledgemap
# Install dependencies
uv sync
# Setup configuration
cp config_example.yaml config.yaml
cp .env.example .env
# Edit your settings
nano config.yaml # Set vault path and other settings
nano .env # Add your OpenAI API key# Start monitoring - builds database automatically if needed
cd cli
uv run step4_monitor.py
# Start classification server on port 8000
uv run classification_server.pyThe system provides a REST API for accessing your knowledge graph:
# Query the graph (POST to /kuzudb/{database_name})
curl -X POST "http://localhost:7001/kuzudb/kuzu_db" \
-H "Content-Type: application/json" \
-d '{"query": "MATCH (n) RETURN n LIMIT 10"}'
# Get schema
curl -X POST "http://localhost:7001/kuzudb/kuzu_db" \
-H "Content-Type: application/json" \
-d '{"query": "CALL SCHEMA"}'
# Upload a markdown file
curl -X POST "http://localhost:7001/save-markdown" \
-H "Content-Type: application/json" \
-d '{"filename": "My Note.md", "content": "# My Note\n\nThis is a test note with some content."}'- POST
/kuzudb/{name}- Execute Cypher queries{"query": "MATCH (n) RETURN n LIMIT 10"} - GET
/health- Health check - GET
/debug/crashes- Debug information
- POST
/save-markdown- Upload markdown files to your vault{ "filename": "My Note.md", "content": "# My Note\n\nContent here..." }
The system uses two simple configuration files:
vault:
path: "/path/to/your/obsidian/vault"
llm:
provider: "cloud" # or "ollama"
cloud:
openai:
model: "gpt-4o-mini"
server:
port: 7001OPENAI_API_KEY=your-openai-api-key-here# Check configuration
uv run cli/manage_config.py status
# Validate setup
uv run cli/manage_config.py validate- Scans your Obsidian vault for markdown files
- Extracts entities (people, companies, concepts) using AI
- Finds relationships between entities
- Builds a knowledge graph database
- Monitors for changes and updates automatically
- Provides REST API for GraphXR integration
- AI-Powered: Uses OpenAI GPT models for entity extraction
- Real-time: Monitors vault changes and updates automatically
- REST API: Connect to GraphXR or other visualization tools
- Entity Resolution: Handle aliases and name changes
- Metadata Support: Process Obsidian frontmatter and tags
We use folder paths to organize different types of notes. The entity_type is derived from the path when entities are created in the database.
| Path Pattern | Entity Type | Notes |
|---|---|---|
**/Persons/**/*.md |
Person | Note title should match person name |
**/Companies/**/*.md |
Company | Note title should match company name |
**/VC/**/*.md |
VC | Note title should match VC name |
**/Persons/VC/*.md |
Person + VC | Entities that are both Person and VC |
**/Companies/VC/*.md |
Company + VC | Entities that are both Company and VC |
- Use nested subfolders to keep information organized (e.g.,
Persons/Engineering/,Companies/Startups/) - Match note titles to entity names for proper entity resolution
- Organize supporting content (events, web research, etc.) under their respective folders
vault/
βββ Persons/
β βββ Engineering/
β β βββ John Doe.md
β βββ VC/
β βββ Jane Smith.md # Both Person and VC
βββ Companies/
β βββ Startups/
β β βββ Acme Corp.md
β βββ VC/
β βββ Sequoia Capital.md # Both Company and VC
βββ VC/
β βββ Andreessen Horowitz.md
βββ Events/
β βββ TechCrunch Disrupt 2024.md
βββ Research/
βββ AI Trends Q4 2024.md
βββ cli/ # Command-line tools
β βββ step3_build.py # Build knowledge graph
β βββ step4_monitor.py # Monitor for changes
β βββ kuzu_server.py # REST API server
βββ config.yaml # Configuration file
βββ .env # API keys
βββ config_example.yaml # Configuration template
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- GraphXR - 3D graph visualization platform
- Kuzu Database - Graph database engine
- Obsidian - Knowledge management tool