Levente Csőke2k downloadsPrivacy-first agentic AI chat in the sidebar. The agent reads, searches, and edits your vault through visible tool calls, routed to zero-data-retention providers by default, or runs fully local with Ollama.
Experimental. APIs, settings, and behavior change often. Pin a version if you need stability.
Compatibility: Agentic Chat requires Obsidian 1.13.0 or later on desktop and mobile. The minimum rises with the Obsidian APIs the plugin uses; older app versions are not supported.
Agentic Chat is an AI chat panel in the Obsidian right sidebar. The agent reads, searches, writes, edits, renames, and moves notes, follows links, and reads or writes frontmatter through typed tools. Each tool call appears inline in the chat, so you can see what the agent does.
It runs in Obsidian on desktop and mobile and uses the pi agent packages. You can use hosted models through OpenRouter, with zero-data-retention routing on by default, or a local Ollama server that keeps requests on your machine.
User and maintainer docs: tardigrde.github.io/obsidian-agentic-chat.
Local docs commands:
npm run docs:dev
npm run docs:build
npm run docs:preview
Privacy controls are on by default.
zdr: true) and a no-logging, no-training policy (data_collection: "deny"). Fallbacks must meet both rules. See How privacy routing works.data.json stores only secret IDs and non-secret settings.With strict zero-data-retention routing, some models may have no compliant provider on OpenRouter. Choose another model, relax the privacy settings on purpose, or use Ollama.
ItemView that uses theme variables. It streams answers, shows tool calls as live step cards with elapsed time, puts reasoning tokens in a collapsible section, and renders Markdown with callouts and Mermaid diagrams.ask_user tool pauses a turn on an inline question with optional answer buttons. The turn continues with your answer./undo reverts the last vault change: write, edit, rename, frontmatter update, single-file delete, or empty-folder delete. A recursive delete of a non-empty folder cannot be reverted.Private/, *.secret.md, and **/diary/** hide notes from the agent. Matching files report as not found to every tool, so the agent cannot read, list, search, or edit them.fs./usage, /status), a next-request cost estimate, a cost alert, a spend cap that blocks or aborts at the limit, and a context-window bar. Long sessions compact older turns into a summary before overflow; /compact [instructions] runs compaction on demand.preference, fact, instruction, summary) at global or vault scope. Add, review, export, or clear them with /memory. The agent retrieves them only through search_memory./semantic-index estimates, starts, cancels, or reports the index. A full-vault build requires /semantic-index start vault --confirm-vault.import_pdf and import_document extract text from PDF, EPUB, DOCX, PPTX, and XLSX files into source artifacts with citation anchors. read_artifact and search_artifact inspect the chunks./effort sets reasoning effort./agent <name> <task>. See Subagents..agentic-plugins/ provide SKILL.md skills, next to built-in skills. The model sees only name and description until a skill is invoked. Run /skill <name> or /<name>. A body can use $ARGUMENTS or $1. /doctor audits plugin packages. See Skills./style switches the assistant style: default, brainstorm, or learning.AGENTS.md from the vault root on every turn, or CLAUDE.md / GEMINI.md if absent. Use /init [instructions] to curate the file. See Standing instructions.web_search (Tavily, Brave, or SearXNG), fetch_url, and /deep-research. While it is off, the tools are not registered and no web-access request is made. The plugin still refreshes its OpenRouter pricing cache when that cache is missing or older than three days. See Web access & research.mcp__server__tool and pass through the approval gate. No stdio transport. See MCP tools./ commands and skills plus @ note mentions, including @note#heading and @note^block. The active note is attached as a removable chip. Drag and drop or right-click a note, folder, or selection to attach it. Answers have copy and retry buttons. Click a sent message to edit and rewind. Up/Down cycles command history. The model pill allows a per-request override.All paths are vault-relative. The plugin rejects absolute paths and .. escapes. Ignored paths report as not found.
Read-only (no approval):
| Tool | What it does |
|---|---|
read |
Read a note. Use startLine/endLine or byte offset/limit for a bounded read. |
vault_inspect |
Read-only meta-tool. action=list lists a folder, search searches names and contents, active_note reads the open note, local_graph shows inbound and outbound links, and properties reads YAML frontmatter. |
Mutating (approval gate):
| Tool | What it does |
|---|---|
write |
Create or overwrite a note. |
edit |
Replace exact strings in a note. |
set_properties |
Write YAML frontmatter through Obsidian's API. |
rename |
Rename or move a note and update inbound wikilinks. |
delete |
Move a note or folder to trash. A non-empty folder needs recursive:true, which asks even in YOLO unless delete is set to allow. |
vault_inspect is the default model-facing tool for list, search, active note, graph, and frontmatter reads. The older ls, search, find, grep, get_active_note, get_backlinks, get_links, local_graph, and get_properties tools are compatibility-only and are not sent to the model by default. There is no settings toggle for them.
The agent loads one standing-instructions file from the vault root on every turn and adds it to the system prompt. Use it for the vault's purpose, key folders, conventions, and your preferences.
AGENTS.md is read first, then CLAUDE.md, then GEMINI.md. Symlink them if several agents should share one file./init [instructions] asks the agent to read the vault and the current file, then make small edits. Each edit shows a diff. write is used only to create the file. Edits use the normal approval gate and /undo.The agent can delegate a focused task to a child agent with its own context window, the role's model (or the parent's), and only the tools in its allowlist. Each child has an isolated context. It is not a different persona.
subagent once per child ({ agent, task }). Several calls in one message run concurrently, with a cap. Children never get the subagent tool, so depth is one level.Run /agent <name> <task>, or /agent to choose from a list. The model can also dispatch children on its own.
Child steps are live only. After you reopen a session, the summary text remains but the child steps cannot be replayed.
Skills use the agentskills.io SKILL.md format.
.agentic-plugins/ provide skills/<name>/SKILL.md, next to built-in skills. Plugin skills load first and win a name collision. The model sees only the name and description until a skill is invoked./skill <name> [args], or /<name> when no built-in command has that name.$ARGUMENTS or $1, $2, and so on./doctor checks each package against the Agent Plugins 1.0.0 spec and reports skills, MCP servers, and violations.Off by default. Enable Web access in settings to register two read-only tools and the /deep-research skill. The setting shows an egress warning.
web_search queries Tavily, Brave, or SearXNG and returns ranked title, URL, and snippet results. Results are wrapped as untrusted data.fetch_url fetches an HTTP(S) page and returns readable text. Scripts and markup are stripped and entities decoded. Long pages can be paged with offset and nextOffset. A best-effort SSRF guard blocks non-HTTP(S) schemes and localhost, private, and link-local hosts. A Fetch allowlist restricts destinations to matching hosts (*.example.com, example.com, or *), checked on every redirect hop. Output is wrapped in [BEGIN_UNTRUSTED_TOOL_OUTPUT ...] markers./deep-research is a built-in skill that runs parallel Explorer subagents, adds an adversarial review, then writes a sourced note with a ## Sources list.While Web access is off, the tools are not registered. When it is on, search queries and fetched URLs leave the model-provider boundary and go to your search provider and the fetched sites. The allowlist limits which hosts the tool can reach.
Off by default. Enable MCP in settings to discover tools from remote MCP servers.
plugin.json + mcp.json) for the endpoint. Packages own endpoints after creation. Choose auth, then Test connection or Authenticate & test. New installs have no servers or presets.mcp__<server-id>__<tool-name>.obsidian://agentic-chat-mcp-oauth callback on mobile when the provider supports app redirects. Providers that require localhost redirects still require Obsidian desktop sign-in or bearer/static-header auth. After sign-in, settings probes tool discovery.data.json stores only secret IDs and non-secret MCP metadata.insufficient_scope, falls back to older protocol versions, reopens an expired Streamable HTTP session once, and makes bounded Last-Event-ID resume attempts. A 202 response opens the SSE stream and waits for the result. Test connection lists tools through the runtime client; diagnostics show per-server URL, auth state, and discovery errors.read_artifact and search_artifact to inspect the result without another remote call. Artifacts are pruned by age, count, and total bytes; artifacts cited by saved sessions are kept. Image and resource payloads are summarized or omitted.MCP support covers tool calls only. Resources, prompts, roots, sampling, long-lived event consumers, and rich binary rendering are not supported.
Off by default. Enable Observability only when you want traces at an endpoint you control.
/api/public/otel/v1/traces; generic OTLP takes a full /v1/traces endpoint.data.json keeps only secret IDs and non-secret settings.metadata (default) sends turn, generation, tool, and approval spans; model and provider IDs; token usage; cost; stop reason; and error class. It does not send prompts, answers, note contents, tool args, tool results, or vault paths. Redacted text previews adds short masked prompt and answer previews. Full prompt/output content sends prompt and answer text.In line with the Obsidian Developer Policies:
The plugin is listed in the official community directory. Open Settings → Community plugins (disable Restricted mode if prompted) → Browse, search for Agentic Chat, and install and enable it. Obsidian handles updates through the community directory.
Use BRAT for pre-release builds before they reach the community directory. Install BRAT, then add tardigrde/obsidian-agentic-chat as a beta plugin. BRAT installs and updates from GitHub releases.
main.js, manifest.json, and styles.css from the latest release (or build them; see Development).<your vault>/.obsidian/plugins/agentic-chat/.OpenRouter (default, zero data retention):
moonshotai/kimi-k2.6.Ollama (local):
http://localhost:11434) and model tag.For any OpenAI-compatible gateway, set the provider to OpenAI-compatible. The Gateway preset shortcut fills common base URLs for OpenWebUI, LM Studio, vLLM, llama.cpp, Chutes, and Venice.ai. The transport stays generic, so other gateways work when you edit the Base URL and Model fields.
The settings page has three tabs: Models, Agent, and Advanced. Advanced holds web access, MCP, observability, notifications, plugins, subagents, semantic retrieval, and the ignore list.
On desktop behind a corporate proxy, set Models → Network proxy → HTTP proxy to a URL such as http://host:port. Plugin-owned OpenRouter/OpenAI-compatible chat requests, model browsing, web tools, MCP, and observability use it. The MCP and observability sections on the Advanced tab have optional overrides; leave them empty unless a server needs different routing. On mobile, keep the plugin proxy fields empty and use the device/VPN/network-level proxy path.
Then click the chat ribbon icon, or run Agentic Chat: Open chat.
/ for commands and skills or @ to attach a note. Both show an inline autocomplete list./new resets it. Ignore-listed notes and root standing-instruction files are not attached. Add more with @<note>, @<note>#<heading>, @<note>^<block-id>, + Folder (a folder listing), by dragging a note or folder from the file explorer onto the composer, or from Obsidian context menus: right-click a note, folder, or selected editor text and send it to Agentic Chat./undo reverts the agent's last vault change./model. Shift-click or Shift-Enter in the picker applies a model for the next prompt only (shown with a "next only" badge), then reverts./help, /status, /usage) render as a collapsible in-pane block.| Command | What it does |
|---|---|
/new |
Start a new conversation. |
/sessions |
Browse, search, reopen, rename, or delete past conversations. clear --confirm clears all sessions in the current scope. |
/model |
Switch model. Shift applies a next-prompt-only override. |
/effort [level] |
Set reasoning effort (off, minimal, low, medium, high, xhigh). The level persists. |
/compact [instructions] |
Summarize older turns now. Optional text guides the summary. |
/init [instructions] |
Curate the vault standing-instructions file. Optional text guides the update. |
/style [name] |
Switch output style. |
/skill [name] [args] |
Run a vault skill. |
/<skill-name> |
Run a skill directly when no built-in command has that name. |
/agent [name] [task] |
Delegate a task to a subagent. Without arguments, opens a picker. |
/undo |
Undo the last vault change the agent made. |
/status |
Show provider, model, mode, output style, session, MCP servers, and tools. |
/usage |
Show token and cost totals. |
/memory [add|review|manage|export|clear] |
Add, review, export, or clear stored long-term memories. |
/semantic-index [status|estimate|start|cancel] |
Manage scoped semantic indexing. |
/export |
Save this conversation as a Markdown note. |
/doctor |
Audit runtime health, agent plugins, and MCP configs. |
/help |
List commands. |
Composer delivery is not a slash command. Enter sends while idle. While the agent responds, Enter steers the turn (the text arrives after the current model turn finishes, or comes back to the composer if the run ends first), Shift+Enter inserts a newline, Queue holds the draft until the turn ends, and Stop then send replaces the turn.
Privacy settings are applied to every OpenRouter request through the provider routing options:
| Setting | Effect | Default |
|---|---|---|
| Require zero data retention | zdr: true: only endpoints that retain nothing |
on |
| Deny prompt logging and training | data_collection: "deny" |
on |
| Allow provider fallbacks | allow_fallbacks: true: fallbacks must obey the first two rules |
on |
If no compliant provider exists for a model, choose another model, relax a setting on purpose, or use Ollama. Ollama requests go only to the server you configure.
npm install
npm run dev # esbuild watch mode
npm run docs:dev # VitePress docs dev server
npm test # vitest
npm run typecheck # TypeScript check
npm run lint # eslint
npm run build # typecheck, production bundle, release and mobile checks
npm run docs:build # VitePress production docs build
The unit suite does not need Obsidian. The obsidian package is replaced by a minimal mock through a vitest alias, the model stream by an injected streamFn, and the session store by an in-memory adapter. AGENTS.md has architecture notes and ROADMAP.md lists planned work.
A base end-to-end suite drives the plugin in a real Obsidian instance through wdio-obsidian-service. It downloads Obsidian, copies test/e2e/vault into a throwaway sandbox, loads the plugin, and runs the specs in test/e2e/specs/. The no-token specs cover Obsidian boot, chat UI wiring, session persistence, deterministic approval/write/edit/undo flows, settings UI persistence, and data.json migration.
npm run test:e2e # builds the plugin, then boots Obsidian and runs the local e2e suite
npm run test:e2e -- --spec test/e2e/specs/smoke.e2e.ts
npm run test:e2e:dogfood
npm run test:e2e:mobile
npm run test:e2e:matrix -- --spec test/e2e/specs/smoke.e2e.ts
npm run verify:mobile
CI runs the deterministic suite under xvfb-run with a cached Obsidian runtime, then the scripted dogfood eval. Locally the suite launches Electron, so it needs a display and cached Obsidian downloads. npm run test:e2e runs one Obsidian version at a time; set OBSIDIAN_VERSIONS=earliest/earliest or another single pair for a targeted run. npm run test:e2e:matrix covers supported versions sequentially across OBSIDIAN_VERSION_MATRIX, or by default earliest/earliest,latest/latest. Unit tests are the fast loop. E2e catches integration seams such as view registration, settings tabs, persistence and migration, composer wiring, slash-command routing, and approval gates.
npm run test:e2e:dogfood generates a fresh adversarial vault under logs/dogfood-runs/<run-id>/, installs the current plugin, drives real Obsidian through WDIO, and fails if the dogfood invariant oracle or the generated report finds a regression. It uses a deterministic scripted model by default, so it needs no live model credentials.
npm run verify:mobile is part of npm run build. It blocks direct Node/Electron API use outside documented desktop fallbacks. npm run test:e2e:mobile builds the e2e bundle, enables mobile emulation, applies phone-sized device metrics, and runs a WDIO smoke test for layout regressions. Real Obsidian Mobile needs the Android/iOS checklist in MOBILE_TESTING.md.
Live model e2e specs are opt-in and skip without keys. Set AGENTIC_CHAT_API_KEY, AGENTIC_CHAT_BASE_URL, and AGENTIC_CHAT_MODEL for an OpenAI-compatible gateway (OpenRouter, OpenWebUI, or a local proxy). Behind a corporate proxy, keep NO_PROXY=localhost,127.0.0.1,::1; the WDIO config keeps chromedriver local and passes a normalized proxy to Obsidian/Electron.
When provider transport, model settings, proxy handling, or request formatting changes, run npm run verify:provider-live. Unlike the default e2e command, it requires live credentials and fails instead of accepting skipped provider specs. That gate also runs npm run eval:provider-cache-live, which sends repeated large stable prompts through the OpenAI-compatible gateway and fails unless a warm request reports provider cache-read tokens. The cache probe accepts OPENAI_COMPATIBLE_* variables or the OPENWEBUI_* variables used by the e2e spec. To load a local dotenv file without shell-sourcing secrets, pass npm run eval:provider-cache-live -- --env-file .env.
Live MCP e2e is also opt-in and refuses insecure endpoints:
AGENTIC_CHAT_E2E_MCP_URL=https://mcp.example.com/mcp \
AGENTIC_CHAT_E2E_MCP_TOOL=tool-name \
AGENTIC_CHAT_E2E_MCP_ARGS_JSON='{"input":"value"}' \
npm run test:e2e -- --spec test/e2e/specs/mcp-live.e2e.ts
For static-header servers, also set AGENTIC_CHAT_E2E_MCP_HEADER_NAME and AGENTIC_CHAT_E2E_MCP_HEADER_VALUE.
@earendil-works/pi-agent-core, @earendil-works/pi-ai), MIT.lhr0909/pi-obsidian by Simon Liang (MIT / 0BSD).MIT. See the third-party notices for bundled dependencies and adapted code.