Project Files
docs / 02_ARCHITECTURE.md
The OmniMind plugin is designed as a standalone Node.js extension that runs inside the LM Studio runtime environment. It acts as an integration layer between the LM Studio chat interface, the local filesystem, and an embedded vector database. Crucially, it uses LangGraph.js to orchestrate structured, reliable agentic workflows.
graph TD UI[LM Studio Chat UI] <-→|Chat Input / Streamed Output| Plugin(OmniMind Extension) subgraph OmniMind Extension Runtime [LM Studio Extension Runtime] Plugin <-→ Orchestrator[LangGraph State Machine] subgraph LangGraph Nodes Orchestrator -→ QueryRewriter(Query Rewriter) Orchestrator -→ Retriever(Vector Retriever) Orchestrator -→ Grader(Document Grader) Orchestrator -→ Synthesizer(Final Synthesizer / Note Writer) end Retriever <-→ LanceDB[(Embedded LanceDB)] Plugin <-→ ObsidianParser[Obsidian Sync Engine] Plugin <-→ ZoteroParser[Zotero Sync Engine] end ObsidianParser <-→|Watch & Parse .md| ObsidianVault[(Obsidian Vault)] ZoteroParser <-→|Read zotero.sqlite & PDFs| ZoteroStorage[(Zotero Local DB)] Orchestrator -→|Calls Local Models for Inference| LLM_Chat[LM Studio /v1/chat] Retriever -→|Generate Embeddings| LLM_Embed[LM Studio /v1/embeddings]
@lmstudio/sdk (For registering the plugin and communicating with the chat UI)@langchain/langgraph (To construct deterministic state machines that make small local models perform reliably)@lancedb/lancedb (Serverless, embedded vector store running inside the plugin directory)better-sqlite3 (For read-only queries against Zotero's zotero.sqlite database)chokidar (To provide real-time updates when the user modifies Obsidian notes)pdf-parse (For extracting raw text from Zotero PDF attachments)Registers settings fields inside LM Studio for:
obsidian_vault_pathzotero_db_path (Path to the zotero.sqlite file)zotero_storage_path (Path to the Zotero PDF attachments directory)Responsible for digesting files into vector embeddings.
Stores records locally with the schema:
id: stringvector: Float32Array (768 dimensions)source: 'obsidian' | 'zotero'path: string (File path or citation key)text: string (The raw text of the chunk)links_to: string[] (Array of wikilinks found in this chunk, for graph awareness)Replaces simple zero-shot tools with a structured graph. The graph maintains an internal State (e.g., messages, retrieved_documents, current_query).
get_note_content if a specific wikilink is requested..md note to Obsidian.