yinfei55 downloadsChat with your vault, get inline AI completions, and compile your notes into a searchable knowledge base.
English · 简体中文
Baizer is an AI knowledge workbench for Obsidian. Named after Bai Ze, the mythic beast that knew the nature of all things, it turns your vault into an AI-native pipeline: information flows in, gets understood, becomes durable memory, and is fed back into everything you write next.

Baizer is not a chatbot bolted onto Obsidian. It is a single loop where every stage — Capture → Process → Remember → Consume — is driven by the same AI runtime, so knowledge compounds instead of piling up.
Capture Process Remember Consume
───────── ───────── ────────── ─────────
web pages ──▶ chat + tools ──▶ Hindsight ──▶ recall on
videos selection edits memory (facts/ every turn
search Guardian writing experience/ knowledge
your notes Knowledge Wiki observation) citations
compilation file-back
▲ │
└────────────────── closes the loop ────────────────────┘
AI handles ingestion, not just download.
save_webpage fetches a page, runs Readability to isolate the body, and converts it to clean Markdown with YAML frontmatter (created, source, author, tags), with extra handling for site-specific layouts.web_search pulls fresh results from the web (DuckDuckGo) when the answer isn't in the vault yet, returned as cited Markdown links.Everything you capture (and everything you already have) is worked on by the agent loop.
Processing produces more than answers; it produces things worth keeping. Baizer's Hindsight memory captures them automatically.
world (durable facts about you and your domain), experience (what worked or failed on past tasks), and observation (lighter signals).positive (reinforce) or negative (rendered as "avoid this" to constrain future generations), learned from your 👍/👎 feedback.file_back_knowledge), so a good answer becomes a reusable source.The loop closes here. Stored knowledge and memory are injected into the next piece of work, everywhere generation happens.
query_knowledge retrieves compiled wiki articles; answers that cite them append explicit [[wikilink]] sources.Three surfaces sit on top of the pipeline:
Baizer speaks Obsidian's own language throughout: notes, wikilinks, frontmatter, backlinks, canvases, bases, plugins, selections, and explicit write permissions.
The system is layered: UI entry points → ModelService (facade) → pi runtime → Skills/Tools, with Knowledge and Memory as side subsystems. All LLM inference runs through a single runtime built on the @earendil-works/pi-agent-core agent harness.
Going deeper:
CLAUDE.mdis the fullest module-by-module map, anddocs/architecture/covers the runtime, skills, permissions, and settings page in detail.CONTEXT.mddefines the domain vocabulary. Start there before a first contribution.
main.ts — plugin bootstrap: wires subsystems, registers commands, the ShellView, CodeMirror extensions, vault/editor events, and Guardian debounce/single-flight/escalation.src/services/model-service.ts — the single entry to all LLM work: chat/chatStream drive the stateful agent loop, generate does stateless one-shot generation. Holds the tool/skill registries, memory, session store, steering, audit log, and workspace-edit service.src/runtime/runtime-factory.ts → src/runtime/pi/harness-chat-runtime.ts — createChatRuntime() returns a HarnessChatRuntime that drives the pi AgentHarness.src/runtime/base-chat-runtime.ts — the preparation layer: prompt assembly (memory recall + time + context + skill list + generation plan), skill resolution, and continuation handling.src/runtime/pi/pi-native-model.ts — maps a ProviderConfig to a pi-ai model + stream/complete functions and injects the API key.src/runtime/pi/vault-session-fs.ts + session projector — JSONL session persistence in the vault with auto-compaction and branch/retry projection.src/skills/tool-registry.ts — atomic tools, always exposed to the model in full.src/skills/skill-registry.ts — skills are behavior instructions (not execution); built-in SKILL.md files are materialized to a hidden vault dir, listed in the prompt, and pulled on demand via read_skill (progressive disclosure).src/skills/builtin/ — vault-ops, web-search, web-clipper, knowledge, plugin-ctrl, obsidian-markdown, json-canvas, obsidian-bases. plugin-ctrl auto-generates skills for other installed plugins.src/permissions/permission-service.ts — pure-function permission decisions driven only by settings.src/knowledge/runtime.ts — lifecycle facade: commands, watchers, ontology discovery, query/file-back executors.compiler.ts (Map-Reduce compilation), indexer.ts + metadata-index.ts (searchable index + .base file), ontology-service.ts (schema discovery), query.ts, file-back.ts, linter.ts, status-service.ts, watcher.ts.src/memory/memory-manager.ts — facade over Hindsight.hindsight-store.ts / hindsight-retriever.ts / hindsight-consolidator.ts — store, semantic recall, and periodic consolidation of memory records.src/ui/shell-view.ts — Workbench view, tabs, history, context chips, streaming UI, workspace-edit bar.src/ui/chat-controller.ts — slash commands, approval handling, streaming coordination, 👍/👎 feedback.src/ui/ghost-text.ts / guardian-completion.ts / guardian-gutter.ts — Guardian inline suggestions and editor state.src/ui/selection-ai/ + selection-menu.ts — selection-triggered AI actions with a floating panel.read_note, create_note, update_note, append_to_note, delete_note, rename_note, list_notes, search_vault, open_file (plus generic read_file/create_file/update_file).read_skill (always registered; pulls a skill's full instructions on demand).query_knowledge, file_back_knowledge.save_webpage (web pages plus YouTube / Bilibili transcripts), web_search (DuckDuckGo).allowPluginControl): list_plugins, get_plugin_commands, get_plugin_settings, execute_plugin_command.json-canvas and obsidian-bases builtin skills for .canvas / .base output.Built-in local commands:
/clear — clear session history and start a fresh persistent session/memory [overview|observations|search <query>|forget <field|all>] — view, search, or forget Hindsight memory (/profile, /forget kept as aliases)/tools — list available tools/help — command help/new <title> — create a note/edit <instruction> — AI-edit the selected text/open <file> — open a file by name/file-back <message-id> — archive a previous answer into the Knowledge Wiki/wiki:compile [path] / /wiki:index / /wiki:lint — compile / open index / health checkSkill-backed commands: /save <url> (web-clipper), /wiki:query (knowledge). Type @ for file autocomplete and / for command autocomplete.
vaultWriteScope — write boundary (read-only, current-note, configured-folders, all-vault)vaultWriteAllowedFolders — folder allowlist for configured-foldersallowFileCreation / allowFileModification — gate creation vs. update/append/rename/deleteallowPluginControl — gates plugin inspection and command executionconfirmExecutions — turns write and plugin actions into approval requests.obsidian writes are always blocked, even when the write scope is broad. With confirmation on, Baizer renders approval cards and replays approved actions with an explicit approval flag; editor-side writes use the same preview-first model and are recorded in the local audit log.
Baizer sends your note content to the AI provider you configure. That is how every feature here works — there is no local-only mode.
data.json inside
your vault's .obsidian folder — the standard Obsidian plugin mechanism.Review your provider's data-usage policy before pointing Baizer at sensitive notes. Full trust-boundary details are in SECURITY.md.
Baizer keeps operational data inside the vault:
.obsidian/baizer/ — conversation history, the operation audit log, and materialized/generated skills..obsidian/baizer-sessions/ — per-conversation session transcripts (JSONL), including branch history..obsidian/baizer-memory/ — Hindsight memory, profiles, session summaries, observations..obsidian/baizer-commands/ — your own slash-command templates; drop a .md file here to add a command..obsidian/baizer-tmp/ — scratch files for the agent runtime.Knowledge Wiki/ (default) — compiled knowledge output. This one is a normal, visible vault folder.Provider capabilities (image input, custom base URL, etc.) are declared in code, so available features can differ by backend. Settings changes (provider/model/key/context window/thinking level) take effect on the next turn because the model handle is rebuilt each call.
npm install
npm test # custom tsx harness via test/run-tests.ts
npm run build
npm run dev
main.js, manifest.json, and styles.css into .obsidian/plugins/baizer/.Baizer runs on both desktop and mobile (iOS / Android) Obsidian — the manifest declares isDesktopOnly: false, and the code avoids Node-only APIs so the same build works everywhere. The Workbench, Guardian, selection actions, Knowledge Wiki, and memory all work on mobile; only OS-level differences (available hotkeys, file pickers) vary by device.
Mod+J — open BaizerMod+Shift+G — Guardian manual triggerMIT