Obsidian Vault Integration
Obsidian Vault Integration
The agent manages an Obsidian vault as a persistent, structured knowledge base. Family members can share notes with the agent, the agent writes daily diary entries, and both the owner and agent store reference material for long-term recall.
Architecture
The vault lives locally on the agent Mac at ~/Obsidian/. Obsidian Sync keeps it in sync with all other devices (phone, tablet, desktop) via the headless sync daemon. The agent accesses notes via native plugin tools (obsidian_read_note, obsidian_write_note, etc.) that run inside the gateway process — no exec calls, no sandbox escape, no approval prompts. The obsidian-note CLI is available as a fallback via exec.
Two Access Paths
| Path | How it works | Approval needed |
|---|---|---|
| Plugin tools (preferred) | obsidian_* tools → mcporter → mcp-obsidian MCP server | None — runs in gateway process |
| CLI fallback | obsidian-note via exec | Allowlisted (no approval for main agent) |
The plugin path is preferred because it bypasses both the exec allowlist and sandbox entirely. The CLI fallback is useful if mcporter or the MCP server is unavailable.
Use Cases
Daily Diary
The agent maintains a daily note as a running log of what happened each day:
- A 10 PM cron job creates the next day’s note from a template with “What happened today” and “Mood” sections
- Throughout the day, the agent appends entries as events occur — trip updates, interesting conversations, completed tasks, notable moments
- Daily notes are factual logs, not task lists or reminders (those live in Apple Reminders)
- Notes follow the format
YYYY-Mon-DD.mdindaily-notes/YYYY/Month/
# Read today's diaryobsidian-note daily read
# Add an entryobsidian-note daily append "Booked restaurant for Saturday — confirmed 7:30 PM at the waterfront place"Trip Journals
Trip notes live in trips/ and follow templates that mirror the Travel Hub trip structure:
| Template | Purpose |
|---|---|
trip-overview | Dates, travelers, itinerary summary |
trip-journal | Day-by-day journal entries |
trip-activities | Planned activities and reservations |
trip-restaurants | Restaurant research and reservations |
trip-packing | Packing lists |
The agent creates trip notes when a new trip is planned and populates them with details from Travel Hub, flight confirmations, and hotel reservations. During the trip, journal entries capture the day-to-day experience.
Reference Documents
Long-lived reference docs store knowledge that accumulates over time:
- Airport and airline notes — lounge reviews, timing tips, seat recommendations, organized alphabetically with strict formatting rules
- Destination guides — research and tips for specific cities or regions
- Recipes — collected recipes
- Packing lists — reusable lists for different trip types
Reference docs use a surgical editing workflow rather than blind appending — the agent reads the full document, identifies the correct insertion point (e.g., alphabetical order), and uses find-and-replace to insert content at the right location.
Shared Notes with the Agent
Family members can share information with the agent by asking it to save a note:
“Save this for reference — the gate code for the beach house is 4521#”
The agent creates or appends to the appropriate note in the vault. Later, anyone can ask the agent to recall it:
“What’s the gate code for the beach house?”
The agent searches the vault and returns the answer. This turns the Obsidian vault into a shared family knowledge base that’s accessible through natural conversation.
Vault Structure
vault-root/├── daily-notes/YYYY/Month/ Daily notes (YYYY-Mon-DD.md)├── destinations/ Destination research and guides├── flights/ Individual flight logs├── trips/ Trip planning and journals├── packing-lists/ Reusable packing lists├── recipes/ Food recipes├── reference/ Reference documents├── templates/ Note templates└── (standalone notes) Top-level reference docsCLI Reference
The obsidian-note CLI wrapper provides all vault operations:
# Readingobsidian-note read "Note Name" # Read by nameobsidian-note read --path "trips/Tokyo 2026.md" # Read by vault-relative pathobsidian-note daily read # Read today's daily note
# Writingobsidian-note append "Note Name" --content "text" # Append to endobsidian-note prepend "Note Name" --content "text" # Prepend after frontmatterobsidian-note daily append "text to add" # Append to today's daily note
# Editing (surgical insert)obsidian-note replace "Note Name" --old "find" --new "replace"
# Creatingobsidian-note create "New Note" --folder trips --content "# Title"obsidian-note daily # Create today's daily note
# Searchingobsidian-note search "query" # Search note contentobsidian-note list # List vault rootobsidian-note list trips # List folderEditing Best Practices
For structured documents with specific ordering (alphabetical sections, formatted tables), always use the read-identify-replace-verify workflow:
- Read the full note to understand its structure
- Identify the exact text around where the edit should go
- Replace to insert at the right location (using
--oldto match the boundary text and--newto include the new content plus the original boundary) - Verify by re-reading the area to confirm correct placement
This prevents content from ending up in the wrong section or breaking document structure.
Security
- Main agent only — Both the
obsidian_*plugin tools and theobsidian-noteCLI are available only to the main agent. Plugin tools are gated bytools.alsoAllowin the agent config. - Destructive tools excluded —
delete_note,move_note, andmove_fileare intentionally not exposed in the plugin. The agent can read, write, search, and manage metadata but cannot delete or relocate notes. - Restricted agents cannot read or write vault content directly
- If a family member asks the restricted agent to save a note, it relays the request to the main agent via
sessions_send
Setup
Prerequisites
- Obsidian installed on the agent Mac (
brew install --cask obsidian) - Obsidian Headless for sync (
npm install -g obsidian-headless) - Active Obsidian Sync subscription
Install
- Install the CLI tools:
Terminal window brew install obsidian-cli # Vault operationsnpm install -g obsidian-headless # Headless sync daemon - Deploy the wrapper script:
Terminal window ln -sf ~/GitHub/Lobster/scripts/local-bin/obsidian-note ~/.local/bin/obsidian-notechmod +x ~/.local/bin/obsidian-note - Link the skill:
Terminal window ln -sf ~/GitHub/Lobster/openclaw-skills/obsidian ~/.openclaw/skills/obsidian - Add
obsidian-noteto the main agent’s exec allowlist inexec-approvals.json - Restart the gateway:
openclaw gateway restart
Headless Sync Setup
Obsidian Headless keeps the vault synced without running the full Obsidian GUI. This replaces the previous iCloud Drive sync approach.
-
Log in to your Obsidian account:
Terminal window ob login -
List remote vaults to find the vault name:
Terminal window ob sync-list-remote -
Configure sync for the local vault:
Terminal window cd ~/Obsidian/YourVaultob sync-setup --vault "Your Vault Name" -
Test a one-time sync:
Terminal window ob sync -
Install the LaunchAgent for continuous sync:
Terminal window cp ~/GitHub/Lobster/config/com.lobster.obsidian-sync.plist ~/Library/LaunchAgents/launchctl load ~/Library/LaunchAgents/com.lobster.obsidian-sync.plist -
Verify it’s running:
Terminal window launchctl list | grep obsidiantail /tmp/obsidian-sync.log
The LaunchAgent runs ob sync --continuous with KeepAlive: true, so it restarts automatically after crashes or reboots. Logs go to /tmp/obsidian-sync.log.
Important: Do not run the Obsidian desktop app and headless sync simultaneously on the same machine — this causes conflicts. The headless daemon replaces the desktop app for sync purposes on the agent Mac.
Daily Note Cron
Set up a cron job to create the next day’s note at 10 PM:
{ "name": "daily-note", "schedule": "0 22 * * *", "agent": "main-agent", "message": "Create tomorrow's daily note using the daily note template"}Troubleshooting
Note not found
The obsidian-note read command searches by note title (the filename without .md). If the note has special characters, try using --path with the vault-relative path instead.
Replace fails (old text not found)
The --old text must match exactly, including whitespace, newlines, and markdown formatting. Read the note first and copy the exact text to match.
Daily note already exists
The cron job is designed to be idempotent — if today’s note already exists, it won’t overwrite it. Manual creation with obsidian-note daily also checks for existence first.