Skip to content

AI-Obsidian Service

Local indexing and retrieval-augmented generation for an Obsidian vault, with REST APIs and SSE progress streaming.

Active

Published 2025-11-02

Maintainers
Viktor Mikhalkin
License
Apache-2.0

Problem

An Obsidian vault is easy to browse manually but difficult to query as a local knowledge base across Markdown, PDF, and EPUB sources. This project provides a service boundary for indexing that material and using it in retrieval-augmented generation workflows.

Architecture

The service uses FastAPI for its HTTP interface, parses supported documents into chunks, creates embeddings, and stores the resulting vectors in a FAISS index. REST endpoints expose search and retrieval workflows, while server-sent events report progress for longer-running operations. Ollama provides the local language-model integration.

Current result

The repository contains the service implementation, local and Docker setup paths, REST API documentation, and commands for indexing and querying a vault.

Verification

The repository’s make check target is the project-level quality gate. Operational checks should also cover indexing representative files, querying the resulting index, and observing progress events.

Reproducibility

Use Python 3.11 and the CPU environment for a portable baseline:

git clone https://github.com/ViktorMikhalkin/ai-obsidian-service.git
cd ai-obsidian-service
make env-create-cpu
conda activate aiobs-cpu
make check
make serve-cpu

With the service running, use the documented /index/rebuild, /search, and /answer requests against a recorded sample vault. Record the selected embedding and language models when comparing results across environments.

Limitations

Retrieval quality depends on document structure, chunking, embedding selection, and the contents of the local vault. Hardware acceleration and model availability can also change performance and generated answers.