Pi Agent + Obsidian CLI + Graphifi = Scriptable Second Brain

AI Summaries (evaluation playlist)go watch the original →

Author integrates Obsidian's CLI with Pi agent via pi-obsidian package and Graphifi knowledge graph to enable structured search, task retrieval, and efficient Q&A on markdown notes, reducing token usage over raw file scans.

The Breakthrough

Author links Pi agent to Obsidian via CLI commands and pi-obsidian package, then builds Graphifi knowledge graph on vault to provide structured retrieval of notes, links, tasks, and semantics instead of raw text scans.

What Actually Worked

  • Symlink Obsidian CLI executable (Obsidian CLI) to ~/bin after enabling in settings; use commands like obsidian new --title "Daily Note", obsidian search meeting notes, obsidian tasks, obsidian links <note>, obsidian screenshot for automation.
  • Install pi-obsidian package with pi install pi-obsidian; Pi agent executes CLI commands like obsidian search kubernetes to fetch ranked note titles with tags, frontmatter, paths, and links.
  • Install Graphifi with pex install graphifi; run graphifi build on vault to generate JSON wiki index, graph report identifying 'god nodes' (most connected), and graph.html; Pi queries via explain <topic> or everything I know about <topic> to traverse graph before responding.
  • Pipe Obsidian CLI output to tv TUI for fuzzy search previews and actions like opening in Neovim or Obsidian.

Before / After

Graphifi benchmarking on notes shows token reduction per query (less than promised 70x for code repos, but meaningful for knowledge bases over raw scans).

Context

Agents lack persistent memory beyond chat history; author treats Obsidian vault as shared knowledge base where Pi stores/retrieves markdown notes via CLI, leveraging Obsidian's search semantics (tags, links, frontmatter) and Graphifi graphs for context-aware Q&A. This avoids vendor-locked AI note tools by keeping portable markdown; humans must still review/compile notes for true knowledge.

Notable Quotes

  • "Obsidian might be the perfect interface layer between you and your agents."
  • "Markdown is boring and boring wins boring means portable it means diffable it means I can use git and I can edit in neovim."
  • "You can't outsource thinking yet if you don't compile notes and read them this isn't knowledge."

Content References

None provided in structured format here.

  • #tutorial
  • #demo

summary by x-ai/grok-4.1-fast. probably wrong about something. check the source.