AI Wiki

approved

by Ilya

AI-powered compoundable knowledge base — extracts, synthesizes and maintains a wiki from raw sources. - This plugin has not been manually reviewed by Obsidian staff.

4 stars908 downloadsUpdated 6d agoApache-2.0

AI Wiki — Obsidian Plugin

Русская версия →

Automatically builds and maintains a knowledge-base wiki from your notes using an AI assistant.

Why AI Wiki:

  • Offline by default — works with Ollama or any local AI server; your notes never leave your machine
  • Grows with your notes — every Ingest adds new topics and updates existing ones automatically
  • Transparent — watch every AI step in real time in the sidebar panel
  • Two AI backends — local (Ollama / OpenAI-compatible) or Claude AI; switch any time in settings

Supported backends: Ollama / OpenAI-compatible (fully local) · Claude Agent (Anthropic cloud)


What it does

AI Wiki reads your notes and maintains a structured knowledge base (wiki) alongside them. Think of it as an assistant that reads what you write and keeps a living reference document up to date.

FeatureWhat it does
IngestReads an open note, extracts key topics (people, tools, processes, terms), creates pages or updates existing pages with guarded section patches. Oversized Markdown is processed as bounded chunks with complete evidence coverage. Tags are standardized: pages reuse the domain's existing tag vocabulary, carry their entity-type tag, and the set of thematic tag categories is bounded per domain
QueryAnswers a question using your wiki as context; results shown in the sidebar with cross-links
LintReviews wiki pages for gaps, outdated content, and broken links; shows a report in the sidebar
FixAfter Lint — send an instruction in the sidebar chat to apply corrections
InitSets up a new knowledge area (domain) with the folder structure and index files
Re-initRemoves and recreates the complete domain tree, including metadata and empty folders, then rebuilds it from sources
FormatCleans up any open markdown note (outside the wiki): headings, tables, frontmatter, image captions. Shows a preview before applying. Invariant: never adds or removes facts — only improves clarity. When the note belongs to a configured domain, tags are reused from that domain's existing tag vocabulary
ChatInteractive follow-up in the sidebar after Query or Lint
Export OKFSerialize a domain into a Google Open Knowledge Format bundle — a folder of markdown with OKF frontmatter, a generated index.md/log.md, and standard [text](link.md) links — for sharing with external AI agents and tools. Desktop only

Fix, Format, and Chat are launched from sidebar buttons, not the Command Palette. Export OKF is available both as a sidebar button and a Command Palette command.

Mobile: only Query works on mobile. Ingest, Lint, Init, Format, and Export OKF are desktop-only.

OKF frontmatter: wiki pages use Google's Open Knowledge Format — a mandatory type (the entity-type subfolder) plus description/resource/timestamp/tags/status. The knowledge graph lives in ## Related / ## External links body sections (Obsidian [[wikilinks]] on disk, rewritten to markdown links only in the OKF export).


Security

Shell execution

The Claude Agent backend starts an external process to run the Claude CLI:

  • What is executed: the absolute path you configure in Settings → "Path to Claude Code" (e.g. /home/user/iclaude.sh). The path is validated to be absolute and free of traversal sequences before each spawn.
  • Why it's required: the Claude Agent backend calls claude / iclaude.sh as a subprocess. There is no alternative to child_process.spawn for this architecture.
  • Your permissions: the subprocess inherits your OS user's permissions — the same as running Claude CLI manually in a terminal.
  • First-run consent: on first launch with Claude Agent selected, a confirmation dialog appears before anything runs. You can revoke consent by removing shellConsentGiven from the plugin's local.json.

Vault access

The plugin reads only the folders you set as sources for each domain. It does not scan your entire vault.


Quick start: Ollama (fully local)

No accounts or cloud services required — AI runs on your computer.

1. Install Ollama

Download from ollama.com and pull a model:

ollama pull llama3.2

2. Install the plugin

Copy the plugin folder into your vault:

# symlink for development
ln -s /path/to/obsidian-ai-wiki ~/.config/obsidian/Plugins/obsidian-ai-wiki

Or copy the folder to <vault>/.obsidian/plugins/obsidian-ai-wiki/ manually.

3. Enable the plugin

Obsidian → Settings → Community plugins → find "AI Wiki" → enable.

4. Configure

Settings → AI Wiki:

SettingValue
BackendNative Agent (OpenAI-compatible)
Base URLhttp://localhost:11434/v1
API Keyollama
Modelllama3.2
Temperature0.2
Input budget tokens16384
Output budget tokens4096
Semantic compressionBalanced

5. Create a knowledge area (domain)

A domain is a pair: "source folder → wiki folder". The AI reads files from the source folder and writes wiki pages to the wiki folder.

Open the AI Wiki sidebar panel (ribbon icon or Command Palette → "Open panel"), then:

  1. Click the Init button in the "Create" section
  2. Enter a domain name (e.g. work)
  3. Add source folder paths — the folders containing notes you want to turn into wiki
  4. Click Run — the plugin creates the wiki folder and starts building pages

6. First Ingest

  1. Open any note in Obsidian
  2. In the sidebar, select your domain from the dropdown
  3. Click the Ingest button
  4. Watch progress in the sidebar — new wiki pages appear in the domain folder

Quick start: Claude Agent

For users with Claude Code CLI installed.

1. Requirements

  • Installed iclaude.sh / iclaude / claude (Claude Code CLI)

2. Install and enable the plugin

Same as steps 2–3 of the Ollama section above.

3. Configure

Settings → AI Wiki:

SettingValue
BackendClaude Agent
Path to Claude Code/home/user/Documents/Project/iclaude/iclaude.sh
Modelsonnet
Timeouts (seconds)300/300/900/3600/600

4. First Ingest

Same as step 6 of the Ollama section above.


Sidebar panel

The sidebar is the main interface for AI Wiki. Open it via the ribbon (🧠 icon) or Command Palette → "Open panel".

Sections

Create — click Init to set up a new knowledge domain (name, wiki folder, source paths).

Fill / Maintain — manage and populate an existing domain:

  • Domain selector — choose which domain to work with
  • refresh the domain list
  • 📁+ manage source folders (add or remove)
  • full re-init: remove and recreate the complete domain tree, then rebuild from sources
  • 📜 open the domain log file
  • 🗒 open the domain index file
  • Ingest — process the currently open note
  • Lint — review wiki quality and find gaps
  • Format — clean up the currently open note's formatting

Query — type a question and click Ask. The answer appears in the sidebar with wiki cross-links. Use the Chat section below the result to refine or follow up.

Model progress and Re-init

Each model request uses one human-readable sidebar lifecycle: Preparing request → Request sent to model → Waiting for model response → Model is producing a response → Validating response → Applying result → Completed (or a terminal retry, failure, or cancellation). Reasoning remains available in its expandable block. Call sites, transport details, attempts, budgets, and provider data stay in agent.jsonl, not sidebar labels. The waiting timer shows UI elapsed time; it is not a provider heartbeat and does not extend the idle deadline. Agent-log reasoning is retained in ordered bounded records up to 4 MiB per operation; excess text is replaced by a metadata-only truncation marker.

For Native Agent, a replacement transport attempt starts a fresh human lifecycle at Preparing request. The sidebar does not show retry counters or HTTP details. agent.jsonl records metadata-only transport_retry_scheduled, transport_retry_recovered, and transport_retry_exhausted events with the logical request ID, lifecycle ID, status/classification, delay, attempt bound, and timeout values; request bodies, response content, authorization headers, and API keys are never retry diagnostics.

Background structured work—Init bootstrap, evidence map/reduce, Ingest synthesis, and bounded Lint batches—uses atomic non-stream responses. Interactive Chat, the Query answer, and Format use SSE so reasoning or answer text can appear as it arrives.

Full Re-init validates bootstrap output and source snapshots before mutation, then removes the entire !Wiki/<domain> tree exactly once: pages, metadata, indexes, logs, temporary content, nested type folders, and obsolete empty directories. It recreates fresh metadata and index state before ingest. A deletion or concurrent-write conflict aborts source ingest; the transaction restores the prior snapshot when safe and never overwrites a concurrently recreated domain tree.


Commands (Command Palette)

CommandAction
AI Wiki: Open panelShow the sidebar panel
AI Wiki: Ingest active fileIngest the currently open note (desktop only)
AI Wiki: QueryAsk a question via a dialog box
AI Wiki: Lint domainCheck wiki quality (desktop only)
AI Wiki: Init domainRe-run init for an existing domain (desktop only)
AI Wiki: Export OKF bundleExport the selected domain as an OKF bundle (desktop only)
AI Wiki: Cancel operationStop the current operation

Settings reference

General (both backends)

SettingDescriptionDefault
User promptAdded to the system prompt of every operationempty
Timeouts (seconds)ingest/query/lint/init/format, slash-separated300/300/900/3600/600
LLM idle timeoutMaximum silence between meaningful native model events; 0 disables the executor idle deadline300 s
Retry countBackend-specific: native additional attempts per request; Claude guarded idle retries per operation3
History limitMax operations in sidebar history20
Agent log (JSONL)Log agent events to plugin-local agent.jsonl (desktop only)off

Domains

List of created domains with Edit / Delete buttons. Domain map is stored in !Wiki/_config/_domain.json.

Backend selector

SettingDescriptionDefault
Backendclaude-agent or native-agent (desktop). Mobile is forced to native-agentnative-agent

Claude Agent

SettingDescriptionDefault
Path to Claude CodeFull absolute path to iclaude.sh / iclaude / claude
ModelPreset (opus/sonnet/haiku) or explicit ID (claude-sonnet-4-6). Shown when per-operation is offclaude default
Input budget tokensMaximum estimated size of the packed prompt. This is configured explicitly; the plugin does not discover the model's context window16384
Semantic compressionPrompt-density profile (Maximum/Balanced/Minimum) with operation-specific preservation rulesBalanced
Allowed toolsComma-separated list passed to --tools. Empty = no restrictionRead,Edit,Write,Glob,Grep
Per-operation modelsWhen on, configure model, input budget, compression, and effort per operation (ingest/query/lint/init/format). Format has an input budget but no semantic-compression controloff
Per-operation: ModelModel for the specific operation

Claude output limits are owned by the external Claude CLI configuration. AI Wiki bounds and packs Claude input, but does not send or expose a plugin-owned Claude output budget. Claude keeps its existing guarded operation-level idle retry behavior; it does not use Native Agent's request executor, HTTP status matrix, or connection-timeout transport.

Native Agent

SettingDescriptionDefault
Base URLOpenAI-compatible endpoint. Ollama: http://localhost:11434/v1http://localhost:11434/v1
API keyollama for Ollama; sk-... for OpenAIollama
Connection timeoutDesktop DNS/TCP/TLS establishment only; it does not cap response headers, body, or generation15 s
Input budget tokensMaximum estimated size of the packed prompt. This is configured explicitly; the plugin does not discover the model's context window16384
Output budget tokensResponse cap sent through the existing maxTokens/API max_tokens setting4096
Semantic compressionPrompt-density profile (Maximum/Balanced/Minimum) with operation-specific preservation rulesBalanced
ModelModel name (llama3.2, mistral, gpt-4o, …). Shown when per-operation is offllama3.2
Thinking budget tokensSeparate native model reasoning allowance; 0 or empty disables it. It does not increase the input budgetoff
Temperature0.01.0. Low values (0.10.3) give more precise, factual answers0.2
Per-operation modelsWhen on, configure model, input/output budgets, compression, thinking budget, and temperature per operation. Format keeps numeric budgets but has no semantic-compression controloff
Output repair retriesRetries for invalid JSON or invalid framed output after Zod validation (0–3). Higher = more reliable on weaker models1

Native transient request recovery

Native Agent retries only the current identical OpenAI-compatible request, up to the configured number of additional attempts. It never replays Init, Re-init, Ingest, a source read, WipeDomain, completed evidence, or page/index application. Eligible failures are connection errors/timeouts and HTTP 408, 409, 429, and 5xx. Provider x-should-retry: true can opt in another transient response; x-should-retry: false always opts out. HTTP 400, 401, 403, 404, and 422, context-limit and schema failures, cancellation, permanent TLS/certificate errors, and application/index/embedding failures are not transport-retried.

Persisted retry diagnostics accept only connection, connection-timeout, allowlisted temporary-transport, retryable-HTTP, and explicit provider-override classifications. Transport classifications carry no HTTP status; HTTP classifications must carry a consistent valid status, and recovered/exhausted diagnostics must match the scheduled failure they close.

Retry stops after nonblank reasoning or content, or when the additional-attempt bound is exhausted. Connection timeout (15 seconds), model idle timeout (300 seconds), and retry count (3) are independent top-level settings; existing persisted values are preserved. A healthy response may take longer than 15 seconds because that value applies only to desktop connection establishment. On Mobile, Native Agent keeps the host-provided transport, so an exact DNS/TCP/TLS-only timeout cannot be guaranteed; request retry and model-idle handling remain separate from that limitation.

Vision

SettingDescriptionDefault
Enable image analysisAnalyze supported images and PDF pages during Formatoff
Semantic compressionVision-specific override; preserves OCR, objects, relationships, layout, page identity, and uncertaintyUse global
Vision modelMultimodal model used for image analysis
Vision CheckNative Agent only: sends one real, tiny 1×1 inline PNG request with a short prompt and a 16-token output cap. Reports success/failure without changing settings or vault files. Claude Agent exposes no Check

Bounded processing and storage

These controls cover different parts of a call: Input budget tokens bound the prepared request, Output budget tokens cap the generated response, and Thinking budget tokens separately allow native-model reasoning when the provider supports it. Native Agent owns all three controls; Claude input is governed by AI Wiki while Claude output remains CLI-owned.

The input budget governs the complete prepared request, including system/schema instructions—not just note text. When content does not fit, AI Wiki packs complete context units and uses operation-specific batching or splitting instead of silently truncating required content. Provider context errors can trigger a smaller repack. The configured budget remains explicit; AI Wiki does not automatically discover a model's context window.

Ingest splits oversized Markdown at stable section, paragraph, line-window, and fenced-code boundaries. Bounded map calls produce source-anchored evidence; reduction calls preserve coverage before synthesis. New pages are complete documents. Existing pages receive page/section-hash-guarded add, append, or replace patches, so untouched sections are preserved and stale content is not overwritten.

index.jsonl is structured storage: page records hold retrieval metadata, while chunk records hold embedding metadata and vectors. Serialized vectors and raw index records never enter model prompts; prompt builders project only the selected evidence, Markdown sections, and allowlisted metadata they need. Unchanged chunk embeddings are reused when their embedding-text hash, model, and dimensions still match.

Small sources keep the short path. Oversized sources, pages, histories, notes, or PDFs can require extra bounded model calls, increasing latency and provider cost in exchange for complete processing within the configured input budget. Vision Check is also a real provider request and may incur a small charge.

Destructive Re-init acceptance must use a private copied vault, never the working vault. The protected replay root must be a recent /tmp/ai-wiki-bounded-ingest-replay.* directory with an owner-only .replay-provenance marker that records the resolved source and replay root. Install the build into its run copy, visibly confirm that vault path in Obsidian, and only then perform the human Re-init checkpoint. The read-only replay auditor rejects duplicate wipe/source/page/index effects, invalid retry lifecycles, timeout drift, retry after content, and recovery that does not continue to the next step. A recovered transport response may enter a correlated structured-repair lifecycle before successful validation/application/completion. Page mutations count only after the matching successful tool_result; metadata-only index checkpoints correlate both index reconciliation stages to the active source and selected domain.

Proxy (native-agent only)

SettingDescriptionDefault
Use proxyRoute native-agent traffic through HTTP/HTTPS proxy. Not supported on mobileoff
Proxy URLhttp://proxy.example.com:8080 or https://…
UsernameOptional, for basic-auth proxies
PasswordOptional, stored locally in local.json
No-proxy hostsCSV; supports exact host and *.suffix. Example: localhost,127.0.0.1,*.internal

Graph

SettingDescriptionDefault
BFS depthQuery: hops from seed pages when collecting context. 0 = seeds only1
Hub thresholdLint: pages with more outgoing links than this are flagged as hubs20

Developer (desktop only)

SettingDescriptionDefault
Dev modeEnable dev logger and evaluator after each operationoff
Evaluator modelModel used by the evaluator (same backend)

Sync

local.json (inside the plugin folder) stores machine-specific settings: the path to Claude CLI, API key, and selected backend. Exclude local.json from sync when using Obsidian Sync / git / Syncthing — otherwise settings will be overwritten on other machines.

The domain map (!Wiki/_config/_domain.json) lives inside the vault and syncs normally with your notes.


Performance reference

Real-world measurements from a homelab inference server running deepseek-v4-flash:cloud via Native Agent (OpenAI-compatible endpoint). Numbers show what to expect at roughly 100–130 output tokens/second — a mid-range local or self-hosted GPU.

OperationTypical durationLLM callsInput tokens (avg/call)Output tokens (avg/call)Speed (tok/s)
Query4–14 s1~6 800~470~100
Ingest (1 note)~25 s2~4 300~1 200~109
Init (6–24 source files)6–27 min20–35 per session~5 700~2 600~122
Lint (large domain)~60 min69~14 300~6 500~128

Init and Lint scale with the number of source files and wiki pages. A domain with 6 files takes ~6 min; 24 files — ~27 min. Lint scanned a large domain (69 LLM calls) in about 60 min.

What affects speed

  • Model — smaller/quantized models are faster; larger models produce better wiki quality
  • Inference server — a local GPU is fastest; cloud APIs add network latency
  • Domain size — Init and Lint time grows linearly with the number of files
  • Oversized inputs — bounded map/reduce, batching, and segmentation add calls to preserve complete coverage

Documentation

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.