Ameen28 downloadsChat with a local Ollama model or a cloud AI API (OpenAI, Claude, OpenRouter, Groq, Gemini, or any OpenAI-compatible server) from Ob
🌐 Website: ameen278.github.io/obsidian_site — features, install guide, providers, and docs.
Chat with a local Ollama model — or a cloud AI API (OpenAI, Anthropic Claude, OpenRouter, Groq, Gemini, or any OpenAI-compatible server) — inside Obsidian. The plugin adds a sidebar where you can ask questions and keep a conversation going; with the default Ollama provider nothing leaves your machine.
This README is the full guide: install, setup, and how to use every feature. Deeper how-to topics live in docs/guide/; the code is explained in docs/dev/.
Provider · model line under the message input, so you always know
which model will answer the next message — updates instantly when you
change settings.Thinking... placeholder with a soft pulse until the first token arrives.Obsidian 1.13.0 or newer.
For local chat: Ollama installed and running, with at least one chat model pulled, for example:
ollama pull qwen2.5-coder:1.5b
For cloud chat: an account and API key with the provider of your choice.
This plugin is not in the community catalog yet. Install it manually:
Build the plugin (see Development) or download a release.
Copy main.js, manifest.json, and styles.css into:
<Vault>/.obsidian/plugins/study-agent/
Reload Obsidian.
Open Settings → Community plugins and enable Study Agent.
Start Ollama:
ollama serve
Open Settings → Community plugins → Study Agent.
Keep AI provider on Ollama (local).
Set Base URL to your server address, usually
http://localhost:11434.
Click Refresh and select a model from the Model dropdown.
Leave Enable thinking off for faster, direct answers. Turn it on if you want thinking models to reason before replying.
If a saved model is not installed, the dropdown shows it as
name (not listed). Pick another model or pull it with
ollama pull <model>, then click Refresh.
Custom (OpenAI-compatible) works the same way but also asks for a Base
URL (for example http://localhost:1234/v1 for LM Studio). See
docs/guide/AiProviders.md for details, privacy
notes, and technical specifics.
Provider · model line under the input — it shows what the
next message will use (for example Gemini · gemini-2.5-flash).Thinking... until the first token; the reply then streams in token
by token. The Send button becomes Stop; clicking it cancels the reply and
keeps any text already received.Turn on Use Active File as Context (the switch under the input) and keep a Markdown note open. Its beginning — up to 20 000 characters — is attached to every request as reference material, and the assistant treats it as the primary source when answering questions about that note.
Enable thinking (Ollama only) lets thinking models reason before answering: slower, but often better for hard problems. The switch is hidden for other providers and stays in sync with the setting in the settings tab.
Pick a mode with the Skill dropdown — Study help, Revision, Summarize, or one you created. The skill applies to every message until you change it or select None, and resets when the sidebar reopens. The full walkthrough, including creating your own skills, is in docs/guide/Skills.md.
Open Settings → Community plugins → Study Agent and type into Custom instructions. The text is appended to every request after the built-in study-assistant prompt, so preferences like "always answer in bullets" apply everywhere. It is sent to your AI provider with your messages.
Hover a reply to reveal the copy icon: click it to copy the reply's raw Markdown (the partial text while streaming), or select part of a reply first to copy just that part.
| Setting | Default | Description |
|---|---|---|
| AI provider | Ollama (local) | Which backend to chat with. |
| Base URL | per provider | Server address for the selected provider. |
| API key | empty | Key for cloud providers (stored in plain text; see Privacy). |
| Model | llama3.2 (Ollama) |
Model selected from the provider's list. |
| Enable thinking | Off | Lets Ollama thinking models reason before answering. |
| Custom instructions | empty | Extra instructions appended to every request's prompt (sent to your AI provider). |
| Custom skills | none | Your own skills in the chat's Skill dropdown (built-ins are included). |
The stored format, defaults, and migration rules are explained in docs/dev/Settings.md.
npm run build and
confirm main.js, manifest.json, and styles.css are in
<Vault>/.obsidian/plugins/study-agent/, reload Obsidian, and check
Settings → Community plugins for an error message.ollama serve for local setups) and the API key and Base URL are
correct, then select Refresh. A saved model that disappeared upstream
shows as name (not listed).AQ. keys and older keys may be
blocked; create a fresh key in Google AI Studio and paste it again. Details
in docs/guide/AiProviders.md.Every message is answered under an always-on study-assistant prompt — the model knows it is working inside your Obsidian vault — plus the selected skill, your custom instructions, and the open note when the context switch is on. The request goes to your chosen provider, and the reply streams back token by token with live Markdown.
localhost, so data stays on your machine.data.json.
Anyone with access to that file can read them. There is no secure key store
in Obsidian.requestUrl) cannot be cancelled; the
streaming path is cancellable via Stop.npm install
npm run dev # rebuild on change
npm run build # type-check and production bundle
npm run lint # ESLint with Obsidian rules
The build writes main.js in the plugin folder.
GPL-3.0-or-later. You may redistribute and modify it under the terms of the GNU General Public License v3 or (at your option) any later version.