Live site: https://kellermaan.github.io/obsidian-agent/
Obsidian Agent is an AI assistant plugin for Obsidian. It supports normal chat workflows and an agent workflow that can perform controlled file operations in your vault.
- Chat sidebar with streaming responses.
- Multi-session conversation management.
- Context attachments from notes and editor selections.
- Provider support:
- Openai service
- Anthropic service
- Custom openai-compatible service
- Custom anthropic-compatible service
- Agent mode with tool calling for vault operations.
- Optional write confirmation for write-like actions.
- One-click revert for operations created by a completed agent response.
- Copy button and selectable message text for easy reuse.
When agent mode is enabled in the chat input area, the model can call tools to:
- List files
- Read files
- Write files
- Append to files
- Create folders
- Rename files or folders
Write-like actions can require explicit approval depending on settings.
- Open Settings > Community plugins.
- Turn off Restricted mode.
- Click Browse and search for "Obsidian Agent".
- Click Install and then Enable.
- Download the latest release from the Releases page.
- Extract the main.js, manifest.json, and styles.css files.
- Move them to your vault's plugin folder:
.obsidian/plugins/obsidian-agent/. - Reload Obsidian and enable the plugin.
- Open the chat view with the left ribbon bot icon or the command Open chat.
- Configure provider, model, and API key in Settings -> Obsidian Agent.
- Start with normal chat, then enable agent mode when you need file operations.
- Attach note or selection context before asking vault-specific questions.
Open Settings -> Obsidian Agent and configure:
- Provider: Openai service, Anthropic service, Custom openai-compatible service, or Custom anthropic-compatible service.
- API key: Provider key (optional for some local deployments).
- Base URL: Required for custom providers.
- Model: Any provider-supported model identifier.
- System prompt: Global behavior instruction.
- Temperature and max tokens.
- Require confirmation before write actions.
- Click the bot icon in the left ribbon.
- Or run the command Open chat.
- Explain selection:
- Select text in editor.
- Run the command Explain selection.
- Add current note to agent context:
- Run the command Add current note to agent context.
- File menu:
- Right click a note and select Add note to agent context.
- Editor menu:
- Select text, right click, then select Add selection to agent context.
- Create and switch between conversations from the sidebar.
- Attach multiple context items to the active conversation.
- Remove individual context items from chips.
- In agent responses, use Revert to undo all operations recorded for that response.
- Write confirmation:
- If enabled, the plugin asks for approval before write_file, append_file, create_folder, and rename_path.
- Revert support:
- Completed agent messages can store undo operations.
- Revert applies undo operations in reverse order.
- Vault scope:
- Operations are intended to target vault paths only.
- Openai service and custom openai-compatible service use a chat/completions style API.
- Anthropic service and custom anthropic-compatible service use a messages style API.
- For custom providers, set a base URL such as:
- Openai-compatible: https://your-host/v1
- Anthropic-compatible: https://your-host/v1
- The plugin appends endpoint paths automatically.
- Settings and chat history are persisted using Obsidian plugin data APIs.
- Conversation state includes messages, context attachments, and undo metadata.
- Clone the repository.
- Install dependencies:
npm install- Run development watch build:
npm run dev- Run production build:
npm run build- Run lint:
npm run lint- Update plugin version in manifest.json.
- Update versions.json to map plugin version to minAppVersion.
- Create a GitHub release tag that exactly matches the plugin version (no v prefix).
- Upload release assets:
- main.js
- manifest.json
- styles.css
- Clipboard APIs may not always be available in every environment.
- Tool-calling quality depends on model capability.
- Custom provider compatibility depends on endpoint behavior.
- This plugin can call external model APIs when configured.
- Review provider privacy policies before sending sensitive content.
- Use write confirmation when testing new models or prompts.
MIT License
