zhang3349 downloadsChat with OpenAI, Claude, DeepSeek or any OpenAI-compatible model in a sidebar and let it read, search, create and edit your notes, with a diff preview and undo for every change.
An AI agent for your Obsidian vault.
Chat with OpenAI, Claude, DeepSeek or any OpenAI-compatible model in an Obsidian sidebar, and let it act as an agent that reads, searches, creates and edits your notes — with a diff preview and one-click undo for every change.
Many providers: OpenAI (Responses API, including reasoning models), Anthropic Claude, DeepSeek, Google Gemini (OpenAI-compatible endpoint), Moonshot/Kimi, Qwen (DashScope), Zhipu GLM, SiliconFlow, OpenRouter, local Ollama, and any OpenAI-compatible endpoint. Configure several and switch from the panel header.
Agent tools the model can call:
| Tool | What it does |
|---|---|
get_current_note |
Read the active note and the current selection |
read_note / list_files / search_notes |
Read, browse and full-text search the vault |
edit_note |
Exact find-and-replace edits (preferred way to change notes) |
write_note / create_note / append_to_note |
Rewrite, create, or append (optionally under a heading) |
move_note / delete_note / create_folder |
Move/rename (links are updated), delete (respects your trash setting), create folders |
list_commands / run_command |
List and run Obsidian commands |
list_plugins / set_plugin_enabled |
List core and community plugins; enable or disable them |
get_settings / update_settings / open_settings |
Read and change Obsidian and plugin settings; open a settings tab |
get_system_info / open_app / open_with_default_app / run_shell_command |
Desktop only, off by default: launch local apps, open files / URLs with the default app, run shell commands (AppleScript via osascript on macOS) |
Attachments: use 📎 (files) or 📁 (folder) under the input box, paste, or drag and drop. Images are sent to the model directly (needs a vision model). PDFs (via Obsidian's built-in pdf.js), Word / PowerPoint / Excel files (.docx, .pptx, .xlsx) and plain-text files are converted to text locally. read_note can also read PDFs and Office files that are already in your vault.
Control Obsidian (setting 允许控制 Obsidian, on by default): the agent can run commands, enable or disable plugins, and read and change Obsidian and plugin settings. Changes follow the permission mode and can be undone from the chat; secret-looking fields are masked before settings are shown to the model; the agent cannot control this plugin itself.
Control local software (setting 允许控制本地软件, off by default, desktop only): the agent can launch apps, open files and URLs, and run shell commands. In manual mode every action shows the exact command and runs only after you confirm it. Commands run with your user permissions.
Multiple conversations: only + 新对话 in the tab bar creates a new conversation; whatever you type always goes to the selected tab. Conversations run in parallel; you can switch away while one is working and it keeps going in the background. Each tab shows its state (running, finished, error, stopped), and you get a notice when a background conversation finishes.
Queued follow-ups: while a conversation is running, messages you send to it are queued (shown above the input, each can be withdrawn) and delivered to the agent as soon as the current step finishes, so you can add instructions without stopping the task. Clicking 发送 on a queued message stops the current task and runs that message right away as a new request. If the task is stopped, undelivered messages go back into the input box.
Automatic retry: rate limits (HTTP 429), overloaded or failing servers (5xx) and network errors are retried automatically, waiting as long as the server asks (up to 10 retries, at most 60 s each). The status bar shows the countdown, and Stop cancels the wait. Quota or billing errors are reported immediately.
Context compression (setting 自动压缩上下文的阈值, default 80k tokens, 0 turns it off): long conversations are compacted automatically to keep each request small and avoid rate limits. Above half the threshold, older tool results and attachments are shortened and old images and reasoning data are dropped; above the threshold, older messages are summarized by the model while recent messages and the latest tool results stay verbatim. A divider in the chat shows when this happened.
Sub-agents (setting 允许派出子代理, on by default): the agent can split a large task into independent sub-tasks and hand them to up to 6 sub-agents that run in parallel, then combine their reports. Each sub-agent's progress and tool calls appear live in the chat, with their own Undo buttons.
Live status: while a task runs, a status bar above the input shows the current step, elapsed time and number of tool calls with an animated progress line; when it ends it shows whether it finished, failed or was stopped.
Permission modes (dropdown at the bottom of the chat panel, or in settings): 手动确认 (manual) asks before every action; 按授权执行 (grant) runs the action types you have authorized and asks for the rest; 自动执行 (auto) runs everything without asking. Clicking 始终允许此类操作 in a confirmation dialog authorizes that action type (notes, moves, deletes, Obsidian commands, plugins, settings, opening apps, shell commands) and switches to grant mode. Authorizations can be revoked in settings.
Safe by default: manual mode is the default, every write shows a diff, and every change has an Undo button in the chat.
The active note and selected text are passed as context (toggle with one click).
Right-click selected text → Send to AI Agent.
Shows the model name actually returned by the API and token usage under each reply.
Panel can sit in the right sidebar (split with the outline), the left sidebar, or the editor area.
Settings are searchable from Obsidian's settings search (Obsidian 1.13+). Each provider has its own settings page; providers without an API key are flagged.
The current UI is in Simplified Chinese.
requestUrl. Depending on your configuration this can be api.openai.com, api.anthropic.com, api.deepseek.com, generativelanguage.googleapis.com, api.moonshot.cn, dashscope.aliyuncs.com, open.bigmodel.cn, api.siliconflow.cn, openrouter.ai, a local Ollama server (localhost:11434), or any custom URL you enter. It is needed to send your messages to the model and receive its replies.data.json, so they are not synced or published with your vault; on another device, enter the key once more. Keys saved by earlier versions are moved there automatically. On older Obsidian versions keys fall back to plain text in data.json; exclude that file if you sync or publish your vault.Install AI Note Agent from the community directory, or use Settings → Community plugins → Browse in Obsidian. Confirm the plugin ID is ai-note-agent. Newly published entries can take time to appear in the in-app catalog; if it is not available yet, use the release files below.
Manual install: download main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/ai-note-agent/, then enable the plugin.
notewright to ai-note-agentThis is a new community plugin entry, starting at version 1.0.0, that continues the functionality of the original project. The old entry uses ID notewright and ends at version 1.2.2; its version numbers are separate from this project. Install the new plugin to move to ai-note-agent; settings do not transfer automatically:
<vault>/.obsidian/plugins/notewright/, including data.json, and disable the old plugin.ai-note-agent, leaving it disabled for now.data.json to <vault>/.obsidian/plugins/ai-note-agent/data.json. If that destination already has settings you want to keep, back it up before replacing it.Existing API key references in data.json keep working with the same Obsidian secret storage on the same device. Newly stored keys use the ai-note-agent- prefix. On another device, enter the keys again.
If your vault uses a custom configuration folder, replace .obsidian in these paths with that folder.
The model must support tool (function) calling.
npm install
npm run dev # watch mode
npm run build # type-check + production build
npm run lint # Obsidian's official ESLint rules
Releases are built by GitHub Actions: bump the version with npm version patch|minor|major, push the tag, and publish the draft release that the workflow creates.
The initial release and community submission are tracked in the 1.0.0 release checklist. GitHub release tags must match manifest.json exactly, for example 1.0.0 without a v prefix.
zhang33 · [email protected] · part of OpenCenter
AI Note Agent:在 Obsidian 侧边栏里和大模型对话,并让它像 Agent 一样直接读取、搜索、新建和修改你的笔记。每次修改都有差异预览和一键撤销。
.docx、.pptx、.xlsx)和文本文件在本地转换为文字。read_note 也能读取仓库里的 PDF 和 Office 文件。osascript 执行 AppleScript)。手动模式下每次操作都会先弹窗显示具体命令,确认后才执行;命令以你的用户权限运行。data.json,也不会随仓库同步或公开;换设备使用需重新填写一次。旧版本保存的 Key 会自动迁移。更早的 Obsidian 版本仍以明文保存在 data.json,同步或公开仓库时请排除该文件。这是使用 ai-note-agent ID 的新插件条目,版本从 1.0.0 开始,延续原项目的功能。旧条目使用 notewright ID,最后正式发布版本为 1.2.2;两个项目的版本号独立。新条目已在社区目录发布。在 Obsidian「设置 → 第三方插件 → 浏览」中安装,并确认 ID 为 ai-note-agent。新条目同步到应用内列表可能有延迟;暂时搜不到时,可通过本仓库的 Release 手动安装。旧版用户需要安装新插件,设置不会自动转移:
<仓库>/.obsidian/plugins/notewright/(包括 data.json),并停用旧插件。ai-note-agent 的新版,暂不启用。data.json 复制到 <仓库>/.obsidian/plugins/ai-note-agent/data.json;如果目标文件已有需要保留的设置,先备份再替换。复制的设置中已有的密钥引用,在同一设备的同一 Obsidian 密钥存储中继续有效;新增密钥使用 ai-note-agent- 前缀。换设备仍需重新填写密钥。使用自定义配置目录时,请将上述路径中的 .obsidian 替换为实际目录。
npm install
npm run dev
npm run build
npm run lint
作者:zhang33([email protected]),OpenCenter 开源项目。
代码结构:src/main.ts 插件入口;src/view.ts 聊天面板;src/agent.ts Agent 循环与子 Agent;src/compact.ts 上下文压缩;src/llm.ts 各家接口封装;src/tools.ts 笔记工具与撤销;src/permissions.ts 权限模式与授权;src/diff.ts 差异对比;src/settings.ts 设置页。