Skills & Plugins Productivity Skills

OpenClaw + Obsidian: Connect Your Knowledge Base to AI Agents

Your Obsidian vault holds years of thinking — notes, research, frameworks, ideas. Connect it to OpenClaw and your agents can read that knowledge, add to it, and surface connections you missed. Here's the full setup and the workflows that make your vault an active second brain.

RN
R. Nakamura
Developer Advocate
Mar 2, 2025 13 min read 8.6k views
Updated Mar 2, 2025
Key Takeaways
  • Connection uses the Obsidian Local REST API community plugin — install it, enable it, copy the API key into OpenClaw skill config
  • All vault access happens on localhost — your notes never leave your machine during read/write operations
  • The search_vault action performs full-text, tag, and frontmatter property search across the entire vault
  • Agents can create new notes with wikilinks to related existing notes — building your graph automatically
  • Flat folder structure with consistent frontmatter properties dramatically speeds up agent retrieval

Most people use Obsidian passively — they write notes and occasionally search them. Connect it to OpenClaw and the vault becomes active. Your agent reads context before answering. It files research automatically. It surfaces a note from six months ago that's directly relevant to what you asked today. The vault stops being an archive and starts being a live collaborator.

Why Obsidian Works as an Agent Knowledge Base

Obsidian stores everything as plain Markdown files on your local filesystem. No database, no proprietary format — just files. This makes it uniquely agent-friendly: reading a note is just reading a text file, creating a note is just writing one. The graph view and backlinks are a layer on top of the same Markdown files.

The practical advantage over cloud knowledge bases like Notion is that Obsidian stays local. Sensitive research, client notes, personal frameworks — none of it has to touch an external server during the read/write operations. The agent processes content through your configured LLM provider, but the vault operations themselves are local. As of early 2025, this makes Obsidian the preferred knowledge base for security-conscious builders using OpenClaw.

💡
Use Obsidian as Agent Long-Term Memory

Configure your agent to write a summary note after every significant conversation or task completion. Over time, the vault builds a chronological record of what the agent has done, learned, and concluded — searchable long-term memory that persists across sessions without any external database.

Installing the Obsidian Local REST API Plugin

The connection between OpenClaw and Obsidian runs through the Obsidian Local REST API community plugin by Adam Coddington. This plugin spins up a local HTTP server inside Obsidian that exposes your vault through a REST API.

  1. Open Obsidian → Settings → Community Plugins → Browse
  2. Search for "Local REST API" and install it
  3. Enable the plugin and open its settings
  4. Copy the API Key from the plugin settings panel
  5. Note the server port — default is 27123 for HTTP, 27124 for HTTPS

The plugin must be running (Obsidian must be open) for OpenClaw to access the vault. This means the integration works on a machine where Obsidian stays open in the background — typically a personal desktop or a dedicated local machine.

⚠️
Obsidian Must Be Open

The Local REST API plugin only serves requests while Obsidian is running. If you close Obsidian, the OpenClaw Obsidian skill will fail with a connection error. Build agent workflows that check vault availability first, or schedule vault-dependent tasks only during working hours when Obsidian is reliably open.

OpenClaw Skill Configuration

Add the Obsidian skill to your agent config. The required fields are the API key and the server URL.

skills:
  - name: obsidian
    api_key: "${OBSIDIAN_API_KEY}"
    host: "http://localhost:27123"
    vault_path: "/Users/yourname/Documents/MyVault"
    default_folder: "Inbox"

The vault_path is optional but recommended — it helps the agent construct absolute file paths when creating notes. The default_folder sets where new notes land when no folder is specified. Set it to an inbox-style folder so new agent-created notes get reviewed before being filed permanently.

Vault Structure Best Practices for Agent Access

Agents navigate your vault through the API, which means structure affects retrieval speed and accuracy. Here's what consistently works well versus what causes problems.

Practice Why It Helps
Consistent frontmatter on every noteAgents filter by property — type, status, date, topic. Without frontmatter, only full-text search works.
Flat folder structure (2 levels max)Deeply nested paths slow path construction and confuse folder-based retrieval queries.
Tags on every noteTag-based search is fast and precise — agents retrieve a specific cluster of notes in one query.
One concept per noteLong monolithic notes return too much text. Shorter atomic notes give the agent precise, relevant chunks.

Sound familiar? Atomic notes aren't just good PKM practice — they're good agent context practice. A note that covers exactly one concept gives the agent a clean signal to work with. A 3,000-word document covering eight topics gives the agent noise.

Agent-Driven Note Creation and Linking

The most powerful capability in this integration isn't reading notes — it's writing them with proper links. Here's the workflow for automatic graph-building.

We'll get to the exact config in a moment — but first you need to understand why this step is what most people skip. When agents create notes without linking them to existing notes, you end up with an orphaned-note problem: new content that sits disconnected from everything else in the vault, invisible in graph view, missed in backlink searches.

The correct workflow:

  1. Agent receives input (email, conversation, research request)
  2. Agent calls search_vault with key terms from the input
  3. Agent reviews returned notes for relevance
  4. Agent creates the new note with [[wikilinks]] to related notes embedded in the body
  5. Agent appends a backlink reference to the most relevant existing note
# Example note frontmatter the agent writes
---
type: research
topic: vector-databases
status: draft
date: 2025-03-02
tags: [ai, databases, retrieval]
related: [[RAG Architecture]], [[Embedding Models]]
---

## Key Findings

Connected to [[OpenClaw Memory Architecture]] because...

The wikilinks appear in Obsidian's graph immediately. The vault grows as a connected graph, not a flat pile of files.

Common Mistakes That Break the Integration

  • Building workflows that require Obsidian to always be open — the plugin only runs when Obsidian is active. Build fallback handling or restrict vault workflows to scheduled times when Obsidian is reliably running.
  • Not standardizing frontmatter keys — agents filter by frontmatter property names. If some notes use "topic" and others use "subject", property filters return incomplete results.
  • Creating notes in deeply nested folders — agents construct folder paths from config. Paths more than two levels deep cause path-construction errors. Keep structure flat.
  • Sending raw vault content to LLMs without size limits — a large note or a search returning 50 notes can exceed context limits. Always limit search results and truncate note content before passing to the agent.
  • Not using the HTTPS port when available — the Local REST API plugin supports HTTPS on port 27124. Use it even for localhost connections to avoid cleartext API key transmission.

Frequently Asked Questions

How does OpenClaw connect to my Obsidian vault?

OpenClaw connects through the Obsidian Local REST API community plugin. Install it in Obsidian, enable it, copy the API key, and configure the skill with the key and local server URL. The agent then has full read and write access to your vault.

Can OpenClaw agents create new notes in my Obsidian vault?

Yes. The create_note action writes a new markdown file to any vault folder. You specify the filename, content, frontmatter properties, and tags. The note appears in Obsidian immediately after creation with no manual step required.

Is my Obsidian vault data sent to the cloud?

Vault read and write operations run on localhost — data doesn't leave your machine during those steps. When the agent processes vault content, that content goes to your configured LLM provider. Be deliberate about which vault content you expose to agent workflows.

Can the agent search across all notes in my vault?

Yes. The search_vault action performs full-text search and returns matching excerpts with file paths. You can also search by tag, folder, or frontmatter property for more targeted retrieval before generating agent responses.

What vault structure works best with OpenClaw agents?

A flat folder structure with consistent frontmatter properties works best. Agents navigate by folder path and search by tag or property — deeply nested hierarchies slow retrieval. Use tags generously and standardize frontmatter keys across your entire vault.

Can OpenClaw automatically link new notes to related existing notes?

Yes, with a two-step workflow. First the agent searches the vault for related notes, then creates the new note with wikilinks to those notes in the body. This builds your graph connection automatically with each new agent-created entry.

RN
R. Nakamura
Developer Advocate

R. Nakamura builds developer tooling integrations for OpenClaw and has connected Obsidian vaults to AI agent workflows for researchers, writers, and software engineers. Has personally maintained a 4,000-note Obsidian vault as the primary knowledge base for a production OpenClaw deployment since early 2025.

Knowledge Base Integration Guides

Weekly OpenClaw skill guides and automation workflows, free.