Chat with multiple LLMs (Claude, GPT, Gemini) in your vault. Mobile-first design with RAG-powered vault search and secure API key management.
Works on all platforms — iPhone / iPad / Mac / Windows / Android.
- Chat UI — Real-time streaming with Markdown rendering
- Multi-provider support — Switch between 6 LLM providers from the header selector
- RAG (Vault Search) — TF-IDF full-text search indexes your vault for context-aware conversations
- Embedding Search — Semantic search using Embedding API (OpenAI / Gemini / Ollama) with hybrid ranking (RRF)
- Note context — Attach vault notes as context for LLM conversations (with token count display)
- Vault file read/write — LLM can read and propose edits to vault files via tool use or text tags
- Quick actions — Summarize, translate, proofread, explain, or expand selected text from the editor context menu
- Conversation history — Auto-save, browse, resume, and delete past conversations
- System prompt presets — 6 built-in presets (polite Japanese assistant, technical writer, translator, etc.)
- Secure API key management — SecretStorage API / WebCrypto encryption (2 levels)
- Responsive design — Optimized for smartphone, tablet, and desktop
| Provider | Example Models | API Key | Streaming | Notes |
|---|---|---|---|---|
| OpenAI | GPT-5, GPT-5.2 | Required | Yes | |
| Anthropic | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 | Required | Chunked | Uses requestUrl() due to CORS |
| Google Gemini | Gemini 2.5 Flash/Pro | Required | Yes | |
| OpenRouter | Claude, GPT, Llama, DeepSeek, etc. | Required | Yes | Unified access to multiple provider models |
| Ollama | Llama 3.3, Gemma 3, Qwen 3 | Not required | Yes | Desktop only, local execution |
| Custom | User-specified | Optional | Yes | Connect to any OpenAI-compatible API |
- Obsidian v1.11.4 or later
- API key for your chosen provider (except Ollama)
- For Ollama: Ollama installed on your desktop
New to LLM APIs? See the Getting Started Guide for step-by-step setup instructions. Google Gemini offers a free tier — no credit card required.
- Open Obsidian Settings
- Go to Community plugins > Browse
- Search for "LLM Assistant"
- Click Install
- Install and enable BRAT from Community plugins
- Open Command Palette (
Ctrl/Cmd + P) and run "BRAT: Add a beta plugin for testing" - Enter the repository URL:
m0370/obsidian-llm-assistant - The plugin will be automatically downloaded and installed
- Download the following 3 files from GitHub Releases:
main.jsstyles.cssmanifest.json
- Create folder
.obsidian/plugins/llm-assistant/in your vault - Place the 3 downloaded files in this folder
- Restart or reload Obsidian
- Enable "LLM Assistant" in Settings > Community plugins
- After enabling the plugin, click the ribbon icon (chat bubble) in the left sidebar, or run "LLM Assistant: Open Chat Panel" from the Command Palette
- The chat panel opens in the right side pane
- Open settings (gear icon in chat header, or Obsidian Settings > LLM Assistant)
- Enter the API key for your chosen provider
- Click "Test" to verify the API key
- Select a provider and model from the header dropdown
- Type your message in the text area at the bottom
- Press
Enteror the send button to send (Shift + Enterfor new line) - The assistant's response streams in real-time with Markdown rendering
- Click the pen icon to start a new chat (current conversation is auto-saved)
RAG automatically indexes your vault and injects relevant notes as context when you chat.
- Enable RAG in Settings > Advanced Settings (RAG / Embedding)
- Click Build Index to create the search index
- The index is cached and only changed files are re-indexed on restart
- When you send a message, the plugin automatically searches your vault and includes relevant context in the prompt
Settings:
- Top-K results: Number of search results to include (1-20)
- Minimum score: Relevance threshold (0.0-1.0)
- Chunk strategy: Section / Paragraph / Fixed token size
- Max tokens per chunk: 128-2048
- Exclude folders: Comma-separated folder paths to exclude from indexing
Embedding search adds semantic understanding on top of TF-IDF text search, enabling the LLM to find conceptually related notes even when different words are used.
- Enable RAG first, then enable Embedding Search in the same settings section
- Choose an Embedding provider (OpenAI / Google Gemini / Ollama)
- Click Build Embedding Index to generate vectors
- Search results now combine text matching and semantic similarity via Reciprocal Rank Fusion (RRF)
Embedding providers:
| Provider | Model | Dimensions | Cost |
|---|---|---|---|
| OpenAI | text-embedding-3-small | 1536 | $0.02 / 1M tokens |
| OpenAI | text-embedding-3-large | 3072 | $0.13 / 1M tokens |
| Google Gemini | gemini-embedding-001 | 3072 | Free tier available (100 RPM) |
| Ollama | nomic-embed-text | 1024 | Free (local) |
Options:
- Compact mode: Reduces dimensions by ~66% to save memory and storage (recommended for mobile and large vaults)
- Background auto-embedding: Automatically generate embeddings during idle time
- Cost estimate: Displayed before building the index
Attach vault notes as context for LLM conversations:
- Paperclip button — Attach the currently active note
- Folder button — Pick a file from the file picker
Attached notes appear in the context bar with token counts. Remove individually with the x button.
Select text in the editor and right-click (or long-press on mobile) to access:
| Action | Description |
|---|---|
| LLM: Summarize | Summarize selected text concisely |
| LLM: Translate to English | Translate to English |
| LLM: Translate to Japanese | Translate to Japanese |
| LLM: Proofread | Check grammar and suggest corrections |
| LLM: Explain | Explain in an easy-to-understand way |
| LLM: Expand | Elaborate on the selected text |
- Click the history icon in the header menu to view past conversations
- Click a conversation to resume it
- Delete unwanted conversations with the x button
- Conversations are auto-saved when you send a message
| Command | Description |
|---|---|
| Open Chat Panel | Open the chat interface |
| Build RAG Index | Manually rebuild the full-text search index |
| Build Embedding Index | Manually rebuild the embedding vector index |
Select a preset from the dropdown in settings:
| Preset | Purpose |
|---|---|
| Default | No preset |
| Polite Japanese Assistant | Responds politely in Japanese |
| Technical Writer | Technical documentation support |
| Creative Writer | Creative writing assistance |
| Translator | Professional translation with nuance preservation |
| Code Reviewer | Code quality and security review |
| Category | Setting | Description |
|---|---|---|
| LLM | Provider | Select the LLM provider |
| Model | Select the model | |
| Security | API key storage | SecretStorage (recommended) / WebCrypto encryption |
| Master password | Shown only for WebCrypto. Kept in memory for session only | |
| API Keys | Per-provider API keys | With test and delete buttons |
| Custom Endpoint | Endpoint URL | URL of an OpenAI-compatible API |
| Model ID | Model identifier to use | |
| Display | Font size | Small / Medium / Large |
| Streaming mode | Real-time response display (on/off) | |
| Temperature | Generation creativity (0.0-1.0) | |
| Preset | System prompt template selection | |
| System prompt | Default instruction to LLM (free text) | |
| RAG | Enable RAG | Toggle vault search indexing |
| Top-K / Score threshold | Search result count and relevance filter | |
| Chunk strategy / Max tokens | How vault files are split for indexing | |
| Exclude folders | Folders to skip during indexing | |
| Embedding | Enable Embedding Search | Toggle semantic vector search |
| Embedding provider / model | Choose embedding API and model | |
| Compact mode | Reduce dimensions for memory savings | |
| Background auto-embedding | Auto-generate embeddings during idle |
API key storage has 2 levels:
| Level | Method | Description |
|---|---|---|
| Recommended | SecretStorage API | Uses OS-level secure storage (macOS Keychain, etc.). Requires Obsidian v1.11.4+ |
| Alternative | WebCrypto encryption | PBKDF2 (100k iterations) + AES-256-GCM encryption. Requires master password (session-only) |
If you previously installed the plugin under the ID obsidian-llm-assistant (via BRAT or manually), you need to rename the plugin folder:
- Close Obsidian
- Rename
.obsidian/plugins/obsidian-llm-assistant/to.obsidian/plugins/llm-assistant/ - Reopen Obsidian
Your conversation history and settings will be preserved.
# Install dependencies
npm install
# Build
npm run build
# Development mode (file watching)
npm run dev
# Run tests
npm test
# Mobile compatibility check
npm run check-mobileObsidian上でLLM(大規模言語モデル)を活用し、ノート執筆支援やVault内ファイルの理解を行うプラグインです。RAGによるVault検索とEmbeddingセマンティック検索で、関連するノートを自動的にコンテキストとして活用できます。
モバイルファースト設計 — iPhone / iPad / Mac / Windows / Android の全プラットフォームで動作します。
既存のObsidian向けLLMプラグインの多くは、機能過多でUIが煩雑になり、プロンプト入力画面や出力結果の表示スペースが狭いという課題がありました。また、iPhoneやiPadでは動作しないプラグインも少なくありません。
LLM Assistantは以下の方針で設計されています:
- 広い入出力スペースを確保したシンプルなチャットUI
- 全プラットフォーム(iPhone/iPad/Mac/Windows/Android)での動作保証
- 複数のLLMプロバイダーに対応(APIキーがあればすぐに使える)
- API鍵の安全な保管(SecretStorage / WebCrypto暗号化)
- RAG + Embeddingによるスマートなノート検索
- チャットUI — ストリーミング対応のリアルタイム表示、Markdownレンダリング
- マルチプロバイダー対応 — 6種類のLLMプロバイダーをヘッダーのセレクタで切り替え
- RAG(Vault検索) — TF-IDF全文検索でVaultをインデックス化し、関連ノートを自動的にコンテキストとして注入
- Embedding検索 — Embedding APIによるセマンティック検索。ハイブリッドランキング(RRF)でTF-IDFと統合
- ノート添付コンテキスト — Vault内のノートをコンテキストとしてLLMに送信(トークンカウント表示付き)
- Vaultファイルの読み込み・編集 — LLMがTool UseまたはテキストタグでVaultファイルを読み取り、編集を提案
- クイックアクション — エディタの右クリックメニューから選択テキストを要約・翻訳・校正・解説・展開
- 会話履歴 — 会話の自動保存・一覧表示・再開・削除
- システムプロンプトプリセット — 丁寧な日本語アシスタント、テクニカルライター、翻訳者など6種類
- セキュアなAPI鍵管理 — SecretStorage API / WebCrypto暗号化の2段階から選択
- レスポンシブデザイン — スマートフォン・タブレット・デスクトップそれぞれに最適化
| プロバイダー | モデル例 | APIキー | ストリーミング | 備考 |
|---|---|---|---|---|
| OpenAI | GPT-5, GPT-5.2 | 必要 | 対応 | |
| Anthropic | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 | 必要 | 段階描画 | CORS非対応のためrequestUrl()使用 |
| Google Gemini | Gemini 2.5 Flash/Pro | 必要 | 対応 | |
| OpenRouter | Claude, GPT, Llama, DeepSeek等 | 必要 | 対応 | 複数プロバイダーのモデルを統合アクセス |
| Ollama | Llama 3.3, Gemma 3, Qwen 3 等 | 不要 | 対応 | デスクトップ専用、ローカル実行 |
| カスタム | ユーザー指定 | 任意 | 対応 | OpenAI互換APIの任意URLに接続 |
- Obsidian v1.11.4 以上
- 各プロバイダーのAPIキー(Ollamaを除く)
- Ollamaを使用する場合は、デスクトップ環境にOllamaがインストールされていること
LLMのAPIを使うのがはじめての方へ: はじめてのセットアップガイド にステップごとの手順をまとめています。Google Gemini なら無料枠でお試しできます(クレジットカード不要)。
- Obsidianの 設定 を開く
- コミュニティプラグイン > 閲覧 をクリック
- 「LLM Assistant」を検索
- インストール をクリック
BRAT(Beta Reviewer's Auto-update Tool) を使えば、コミュニティプラグインに未登録のプラグインもインストールできます。
- Obsidianのコミュニティプラグインから BRAT をインストール・有効化
- コマンドパレット(
Ctrl/Cmd + P)を開き、「BRAT: Add a beta plugin for testing」を実行 - リポジトリURL
m0370/obsidian-llm-assistantを入力 - 自動的にプラグインがダウンロード・インストールされます
- GitHub Releases から最新リリースの以下3ファイルをダウンロード:
main.jsstyles.cssmanifest.json
- Vaultの
.obsidian/plugins/llm-assistant/フォルダを作成 - ダウンロードした3ファイルをこのフォルダに配置
- Obsidianを再起動(またはリロード)
- 設定 > コミュニティプラグイン で「LLM Assistant」を有効化
- 設定 > コミュニティプラグイン を開く
- 「LLM Assistant」の右にあるトグルをオフにして無効化
- プラグイン名をクリックして詳細を開き、アンインストール をクリック
.obsidian/plugins/llm-assistant/ フォルダを削除し、Obsidianを再起動してください。
会話履歴データは
.obsidian/plugins/llm-assistant/conversations/に保存されています。プラグイン削除時に一緒に削除されます。
以前 obsidian-llm-assistant というIDでプラグインをインストールしていた場合(BRAT経由や手動インストール)、プラグインフォルダのリネームが必要です:
- Obsidianを終了
.obsidian/plugins/obsidian-llm-assistant/を.obsidian/plugins/llm-assistant/にリネーム- Obsidianを再起動
会話履歴と設定はそのまま引き継がれます。
- プラグインを有効化後、左サイドバーのリボンアイコン(吹き出しマーク)をクリック、またはコマンドパレットから「LLM Assistant: チャットパネルを開く」を実行
- 右サイドパネルにチャット画面が表示されます
- 設定画面を開く(チャットヘッダーの歯車ボタン、またはObsidian設定 > LLM Assistant)
- 使用したいプロバイダーのAPIキーを入力
- 「テスト」ボタンでAPIキーの有効性を確認
- チャットヘッダーのドロップダウンでプロバイダーとモデルを選択
- 画面下部のテキストエリアにメッセージを入力
Enterキーまたは送信ボタンで送信(Shift + Enterで改行)- アシスタントの応答がストリーミング表示されます(Markdown形式でレンダリング)
- ペンアイコンで新規チャットを開始(現在の会話は自動保存されます)
RAGを有効にすると、チャット時にVault内の関連ノートが自動的にコンテキストとして注入されます。
- 設定 > 詳細設定(RAG / Embedding)でRAGを有効化
- インデックス構築ボタンをクリック
- インデックスはキャッシュされ、次回起動時は変更されたファイルのみ再インデックスされます
- メッセージ送信時、プラグインが自動的にVaultを検索し、関連コンテキストをプロンプトに含めます
設定項目:
- 検索結果数: コンテキストに含める件数(1-20)
- スコア閾値: 関連性の最低スコア(0.0-1.0)
- チャンク分割戦略: セクション / パラグラフ / 固定トークン数
- チャンク最大トークン数: 128-2048
- 除外フォルダ: インデックスから除外するフォルダ(カンマ区切り)
Embedding検索は、TF-IDFテキスト検索に加えてセマンティックな理解を追加します。異なる言葉が使われていても、概念的に関連するノートを見つけることができます。
- まずRAGを有効化し、同じ設定セクション内でEmbedding検索を有効化
- Embeddingプロバイダーを選択(OpenAI / Google Gemini / Ollama)
- Embeddingインデックス構築ボタンをクリックしてベクトルを生成
- 検索結果はテキストマッチングとセマンティック類似度をReciprocal Rank Fusion(RRF)で統合
Embeddingプロバイダー:
| プロバイダー | モデル | 次元数 | コスト |
|---|---|---|---|
| OpenAI | text-embedding-3-small | 1536 | $0.02 / 100万トークン |
| OpenAI | text-embedding-3-large | 3072 | $0.13 / 100万トークン |
| Google Gemini | gemini-embedding-001 | 3072 | 無料枠あり(100リクエスト/分) |
| Ollama | nomic-embed-text | 1024 | 無料(ローカル実行) |
オプション:
- 省メモリモード: 次元数を約66%削減してメモリとストレージを節約(モバイルや大規模Vaultで推奨)
- バックグラウンド自動Embedding: アイドル時にEmbeddingを自動生成
- コスト見積もり: インデックス構築前に表示
Vault内のノートをコンテキストとしてLLMに送信できます。
- クリップボタン — 現在アクティブなノートを添付
- フォルダボタン — ファイルピッカーからノートを選択して添付
添付されたノートはコンテキストバーに表示され、トークン数も確認できます。xボタンで個別に削除できます。
エディタでテキストを選択し、右クリック(モバイルでは長押し)メニューから以下のアクションを実行できます:
| アクション | 説明 |
|---|---|
| LLM: 要約する | 選択テキストを簡潔に要約 |
| LLM: 英語に翻訳 | 英語に翻訳 |
| LLM: 日本語に翻訳 | 日本語に翻訳 |
| LLM: 校正する | 文法・表現を校正し修正点を説明 |
| LLM: 解説する | わかりやすく解説 |
| LLM: 詳しく書く | テキストをより詳しく展開 |
選択テキストがプロンプトに追加され、チャットパネルに送信されます。
- ヘッダーメニューの履歴アイコンで会話履歴一覧を表示
- 過去の会話をクリックして再開
- xボタンで不要な会話を削除
- 新しいメッセージを送信すると自動的に保存されます
| コマンド | 説明 |
|---|---|
| チャットパネルを開く | チャットインターフェースを開く |
| RAGインデックスを構築 | 全文検索インデックスを手動で再構築 |
| Embeddingインデックスを構築 | Embeddingベクトルインデックスを手動で再構築 |
設定画面の「プリセット」ドロップダウンから、用途に応じたシステムプロンプトを選択できます:
| プリセット名 | 用途 |
|---|---|
| デフォルト | プリセットなし |
| 丁寧な日本語アシスタント | 日本語で丁寧に回答 |
| テクニカルライター | 技術文書の執筆支援 |
| クリエイティブライター | 創造的な文章作成支援 |
| 翻訳者 | プロの翻訳(ニュアンス保持) |
| コードレビュアー | コード品質・セキュリティレビュー |
プリセットを選択するとシステムプロンプト欄に自動入力されます。カスタマイズも可能です。
| カテゴリ | 設定項目 | 説明 |
|---|---|---|
| LLM | プロバイダー | 使用するLLMプロバイダーを選択 |
| モデル | 使用するモデルを選択 | |
| セキュリティ | API鍵の保存方式 | SecretStorage(推奨)/ WebCrypto暗号化 |
| マスターパスワード | WebCrypto選択時のみ表示。セッション中のみ保持 | |
| APIキー | 各プロバイダーのAPIキー | テスト・削除ボタン付き |
| カスタムエンドポイント | エンドポイントURL | OpenAI互換APIのURL |
| モデルID | 使用するモデルの識別子 | |
| 表示 | フォントサイズ | 小 / 中 / 大 |
| ストリーミングモード | レスポンスのリアルタイム表示(オン/オフ) | |
| Temperature | 生成の創造性(0.0〜1.0) | |
| プリセット | システムプロンプトのテンプレート選択 | |
| システムプロンプト | LLMへのデフォルト指示(自由記述) | |
| RAG | RAGを有効化 | Vault検索のインデックスを有効化 |
| 検索結果数 / スコア閾値 | 検索件数と関連性フィルタ | |
| チャンク戦略 / 最大トークン | ファイルの分割方法 | |
| 除外フォルダ | インデックスから除外するフォルダ | |
| Embedding | Embedding検索を有効化 | セマンティックベクトル検索の有効化 |
| プロバイダー / モデル | Embedding APIとモデルの選択 | |
| 省メモリモード | 次元数を削減してメモリを節約 | |
| バックグラウンド自動Embedding | アイドル時にEmbeddingを自動生成 |
API鍵の保管方法は2段階から選択できます:
| レベル | 方式 | 説明 |
|---|---|---|
| 推奨 | SecretStorage API | OSレベルのセキュアストレージ(macOS Keychain等)を利用。Obsidian v1.11.4以上で利用可能 |
| 代替 | WebCrypto暗号化 | PBKDF2(10万回反復)+ AES-256-GCMで暗号化。マスターパスワードが必要(セッション中のみ保持) |
# 依存関係のインストール
npm install
# ビルド
npm run build
# 開発モード(ファイル監視)
npm run dev
# テスト
npm test
# モバイル互換性チェック
npm run check-mobile