Ar9av/obsidian-wiki

Framework for AI agents to build and maintain a digital brain through Obsidian wiki

3,392

stars

293

commits

Python

primary language

Sep 11, 2026

updated

agent-skills
brain
knowledge-base
knowledge-graph
llm-tools
memory
obsidian
obsidian-brain
wiki

README

obsidian-wiki

A digital brain you grow with your AI agent.

It remembers what you figure out, connects it to what you already know,
and answers when you ask.

PyPI Ask DeepWiki PRs Welcome X Discord

obsidian-wiki

English | 繁體中文


You solve a hard problem on a Tuesday. Three months later, in a different repo, you solve it again from scratch — because the answer lived in a chat log you'll never find.

This fixes that. Point it at a folder, tell your agent what to remember, and it compiles what you learn into interconnected markdown you own. The pattern comes from Andrej Karpathy's LLM Wiki gist: compile knowledge once and keep it current, instead of asking an LLM the same questions forever or re-running RAG every time.

Your second brain. Your AI agent is how you grow it.

Every skill here is a markdown file that any agent — Claude Code, Cursor, Codex, Windsurf, Gemini CLI, and a dozen more — reads and runs. No runtime, no API keys, no vendor.

60 seconds

pip install obsidian-wiki
obsidian-wiki setup --vault ~/brain

Using uv or pipx? uv tool install obsidian-wiki and pipx install obsidian-wiki work the same way. (Not uvx — see Installation.)

Then open any project in your agent and say "set up my wiki".

Prefer not to touch a terminal? Give your agent this and it'll do the whole thing:

https://github.com/Ar9av/obsidian-wiki — set up my wiki

Other paths — git clone, Skills CLI, multiple vaults → Installation

What you actually do

Feed it. Anything text-shaped: docs, PDFs, chat exports, meeting transcripts, screenshots, URLs.

/wiki-ingest ~/research
/wiki-update                        # distill the repo you're standing in (code-graph aware)
/wiki-capture                       # save this conversation
/wiki-history-ingest claude         # mine everything you've ever asked Claude

Ask it. Answers come back with [[wikilink]] citations, not vibes.

/wiki-query what do I know about rate limiting?
/wiki-narrate MCP security          # a cited briefing on a topic
/wiki-digest week                   # what did I learn this week?

Find that session you can't name.

obsidian-wiki sessions-build
obsidian-wiki sessions-query "the auth bug with the weird retry loop"

Keep it honest. The vault gets messy on its own; these clean it.

/wiki-lint            # broken links, orphans, contradictions
/wiki-dedup           # "RSC" and "React Server Components" are one page now
/cross-linker         # weave new pages into the graph
/wiki-status          # what's ingested, what's pending, where the hubs are

All 39 skills → Skills Reference

See it

Open the vault in Obsidian and hit the graph view (Cmd/Ctrl+P → "Open graph view"). Say "color my graph" and it tints nodes by tag, category, or visibility.

obsidian-wiki graph view

Or export the whole graph to graph.json, GraphML (Gephi/yEd), Neo4j Cypher, Postgres SQL, or a self-contained interactive graph.html.

Why this and not a notes folder

  • It compiles, it doesn't accumulate. New knowledge merges into existing pages. Contradictions get flagged. Nothing gets duplicated.
  • It only reads what changed. A manifest tracks every source ingested, so the second run processes the delta — not your whole library again.
  • You can tell knowledge from guessing. Every claim is tagged extracted, ^[inferred], or ^[ambiguous], and lint flags pages drifting into speculation.
  • Queries stay cheap as it grows. Titles, tags, and summaries get read before page bodies. 20 pages or 2000, roughly the same cost.
  • It's yours. Plain markdown in a folder. Push it to a private repo, open it in Obsidian, grep it, delete it. No service, no lock-in, nothing leaves your machine.
  • Works where you already work. One .skills/ directory, symlinked into every agent you use.

More → Architecture

Does it actually help?

Structural questions — "how is X connected to Y", "which pages hold my vault together", "what breaks if I delete this" — are the ones a plain agent is worst at. It has to grep every file and reconstruct the link graph by hand, every single time.

Same model, same vault, same questions. The only difference is whether obsidian-wiki was installed:

Plain agentWith obsidian-wiki
Time to answer81s19s — 4.4× faster
Correct answers44%83%
Tool calls used9.94.6
API cost$0.202$0.208 — unchanged
QuestionPlain agentWith obsidian-wiki
"How is X connected to Y?"122s18s
"What topic clusters do I have?"117s21s
"Which pages hold my vault together?"61s12s
"What breaks if I delete X?"26s24s

The accuracy gap is not a rounding error. Asked to trace a connection, the plain agent routed through index.md — which links to every page, so it "found" a short path that means nothing. It made the same mistake in both runs, and named index as one of the most important pages in the vault. The graph the skills query excludes bookkeeping files, so that answer isn't reachable.

Method, and what this doesn't prove

Claude Sonnet, headless, on a real 38-page vault. Questions were asked in plain English with no definition of the graph supplied — the plain agent had Read/Grep/Glob/Bash and had to work it out, which it did competently (it wrote its own centrality implementation rather than guessing). 4 questions × 2 conditions × 2 repetitions, run serially so nothing competed for CPU.

Ground truth came from networkx, not from this project's own code: betweenness matches to 3.5e-18 across every node, and all 630 shortest-path pairs agree.

It's a small study — n=2 per cell on one 38-page vault — so treat the exact percentages as indicative. The wall-clock gaps (3–6×) are much larger than the run-to-run spread; the accuracy figures rest on fewer samples. One run in the "with" column failed outright: the model ignored the CLI, grepped by hand, and got it wrong.

Full data, per-run logs and the scaling measurements are in PR #175.

Documentation

Installationpip, clone, agent-driven setup, multiple vaults
Skills ReferenceAll 39 skills and their slash commands
Agent CompatibilityThe full matrix + per-agent manual setup
CLI ReferenceEvery obsidian-wiki subcommand
ConfigurationConfig vars, QMD semantic search, _raw/ staging, GitHub sync
ArchitectureThe four ingest stages, vault structure, what we added to Karpathy's pattern
Session BrainTopic graph over your agent session history
Browser ExtensionCapture pages into the vault, and fill web forms from it
DeploymentRun a vault as a Dockerized memory service agents reach over HTTP/MCP
ContributingAdding skills, keeping the READMEs in sync

Contributing

This is early. The skills work, but there's room to make the brain smarter — better cross-referencing, sharper deduplication, bigger vaults, new ingest sources. If you have a workflow that could be a skill, PRs are welcome.

License

MIT

Contributors

Ar9av

203 commits

mike840609

41 commits

Medenor

15 commits

yulin0629

5 commits

Ar9av/obsidian-wiki

Framework for AI agents to build and maintain a digital brain through Obsidian wiki

3,392

stars

293

commits

Python

primary language

Sep 11, 2026

updated

agent-skills
brain
knowledge-base
knowledge-graph
llm-tools
memory
obsidian
obsidian-brain
wiki

README

obsidian-wiki

A digital brain you grow with your AI agent.

It remembers what you figure out, connects it to what you already know,
and answers when you ask.

PyPI Ask DeepWiki PRs Welcome X Discord

obsidian-wiki

English | 繁體中文


You solve a hard problem on a Tuesday. Three months later, in a different repo, you solve it again from scratch — because the answer lived in a chat log you'll never find.

This fixes that. Point it at a folder, tell your agent what to remember, and it compiles what you learn into interconnected markdown you own. The pattern comes from Andrej Karpathy's LLM Wiki gist: compile knowledge once and keep it current, instead of asking an LLM the same questions forever or re-running RAG every time.

Your second brain. Your AI agent is how you grow it.

Every skill here is a markdown file that any agent — Claude Code, Cursor, Codex, Windsurf, Gemini CLI, and a dozen more — reads and runs. No runtime, no API keys, no vendor.

60 seconds

pip install obsidian-wiki
obsidian-wiki setup --vault ~/brain

Using uv or pipx? uv tool install obsidian-wiki and pipx install obsidian-wiki work the same way. (Not uvx — see Installation.)

Then open any project in your agent and say "set up my wiki".

Prefer not to touch a terminal? Give your agent this and it'll do the whole thing:

https://github.com/Ar9av/obsidian-wiki — set up my wiki

Other paths — git clone, Skills CLI, multiple vaults → Installation

What you actually do

Feed it. Anything text-shaped: docs, PDFs, chat exports, meeting transcripts, screenshots, URLs.

/wiki-ingest ~/research
/wiki-update                        # distill the repo you're standing in (code-graph aware)
/wiki-capture                       # save this conversation
/wiki-history-ingest claude         # mine everything you've ever asked Claude

Ask it. Answers come back with [[wikilink]] citations, not vibes.

/wiki-query what do I know about rate limiting?
/wiki-narrate MCP security          # a cited briefing on a topic
/wiki-digest week                   # what did I learn this week?

Find that session you can't name.

obsidian-wiki sessions-build
obsidian-wiki sessions-query "the auth bug with the weird retry loop"

Keep it honest. The vault gets messy on its own; these clean it.

/wiki-lint            # broken links, orphans, contradictions
/wiki-dedup           # "RSC" and "React Server Components" are one page now
/cross-linker         # weave new pages into the graph
/wiki-status          # what's ingested, what's pending, where the hubs are

All 39 skills → Skills Reference

See it

Open the vault in Obsidian and hit the graph view (Cmd/Ctrl+P → "Open graph view"). Say "color my graph" and it tints nodes by tag, category, or visibility.

obsidian-wiki graph view

Or export the whole graph to graph.json, GraphML (Gephi/yEd), Neo4j Cypher, Postgres SQL, or a self-contained interactive graph.html.

Why this and not a notes folder

  • It compiles, it doesn't accumulate. New knowledge merges into existing pages. Contradictions get flagged. Nothing gets duplicated.
  • It only reads what changed. A manifest tracks every source ingested, so the second run processes the delta — not your whole library again.
  • You can tell knowledge from guessing. Every claim is tagged extracted, ^[inferred], or ^[ambiguous], and lint flags pages drifting into speculation.
  • Queries stay cheap as it grows. Titles, tags, and summaries get read before page bodies. 20 pages or 2000, roughly the same cost.
  • It's yours. Plain markdown in a folder. Push it to a private repo, open it in Obsidian, grep it, delete it. No service, no lock-in, nothing leaves your machine.
  • Works where you already work. One .skills/ directory, symlinked into every agent you use.

More → Architecture

Does it actually help?

Structural questions — "how is X connected to Y", "which pages hold my vault together", "what breaks if I delete this" — are the ones a plain agent is worst at. It has to grep every file and reconstruct the link graph by hand, every single time.

Same model, same vault, same questions. The only difference is whether obsidian-wiki was installed:

Plain agentWith obsidian-wiki
Time to answer81s19s — 4.4× faster
Correct answers44%83%
Tool calls used9.94.6
API cost$0.202$0.208 — unchanged
QuestionPlain agentWith obsidian-wiki
"How is X connected to Y?"122s18s
"What topic clusters do I have?"117s21s
"Which pages hold my vault together?"61s12s
"What breaks if I delete X?"26s24s

The accuracy gap is not a rounding error. Asked to trace a connection, the plain agent routed through index.md — which links to every page, so it "found" a short path that means nothing. It made the same mistake in both runs, and named index as one of the most important pages in the vault. The graph the skills query excludes bookkeeping files, so that answer isn't reachable.

Method, and what this doesn't prove

Claude Sonnet, headless, on a real 38-page vault. Questions were asked in plain English with no definition of the graph supplied — the plain agent had Read/Grep/Glob/Bash and had to work it out, which it did competently (it wrote its own centrality implementation rather than guessing). 4 questions × 2 conditions × 2 repetitions, run serially so nothing competed for CPU.

Ground truth came from networkx, not from this project's own code: betweenness matches to 3.5e-18 across every node, and all 630 shortest-path pairs agree.

It's a small study — n=2 per cell on one 38-page vault — so treat the exact percentages as indicative. The wall-clock gaps (3–6×) are much larger than the run-to-run spread; the accuracy figures rest on fewer samples. One run in the "with" column failed outright: the model ignored the CLI, grepped by hand, and got it wrong.

Full data, per-run logs and the scaling measurements are in PR #175.

Documentation

Installationpip, clone, agent-driven setup, multiple vaults
Skills ReferenceAll 39 skills and their slash commands
Agent CompatibilityThe full matrix + per-agent manual setup
CLI ReferenceEvery obsidian-wiki subcommand
ConfigurationConfig vars, QMD semantic search, _raw/ staging, GitHub sync
ArchitectureThe four ingest stages, vault structure, what we added to Karpathy's pattern
Session BrainTopic graph over your agent session history
Browser ExtensionCapture pages into the vault, and fill web forms from it
DeploymentRun a vault as a Dockerized memory service agents reach over HTTP/MCP
ContributingAdding skills, keeping the READMEs in sync

Contributing

This is early. The skills work, but there's room to make the brain smarter — better cross-referencing, sharper deduplication, bigger vaults, new ingest sources. If you have a workflow that could be a skill, PRs are welcome.

License

MIT

Contributors

Ar9av

203 commits

mike840609

41 commits

Medenor

15 commits

yulin0629

5 commits

Languages

Python

85.5%

HTML

5.5%

Shell

5.2%

JavaScript

3.0%