Share your OpenClaw workspace with Obsidian Sync
Sync your OpenClaw agent's workspace to Obsidian, then hand it tasks in a shared todo.md and read its JSON and HTML files, in about 30 minutes.

What you need
Obsidian Headless is in open beta. Never run it and the Obsidian app's Sync on the same machine, or files can conflict.
Step 1: Back up the workspace
3 minSync copies every change both ways, so start from a saved copy you can roll back to.
- On the agent machine, open a terminal in the workspace. It's
~/.openclaw/workspaceby default. - Move any API keys, tokens or passwords out of the folder first. OpenClaw's docs say they don't belong there.
- Run the commands below to save the folder in a private git repo.
Run thiscd ~/.openclaw/workspace git init git add . git commit -m "Before Obsidian Sync"
You should see a commit that lists files such as
AGENTS.md,SOUL.mdandmemory/.Git says there's nothing to commit?
The folder is already a repo with no new changes, which is fine. Run
git logto check that a recent commit is there.Obsidian Sync skips hidden folders such as
.git, so your history stays on this machine.- On the agent machine, open a terminal in the workspace. It's
Step 2: Sync the workspace from the agent machine
7 minObsidian Headless syncs a folder without the desktop app, which suits a server that runs an agent.
- Install Obsidian Headless, then log in with your Obsidian account.
- Create an end-to-end encrypted remote vault and link the workspace to it.
- Add the
unsupportedfile type, which covers files such as JSON and HTML, then start continuous sync.
Run this on the agent machinenpm install -g obsidian-headless ob login ob sync-create-remote --name "OpenClaw workspace" --encryption e2ee ob sync-setup --vault "OpenClaw workspace" --path ~/.openclaw/workspace --device-name agent ob sync-config --path ~/.openclaw/workspace --file-types image,audio,video,pdf,unsupported ob sync --path ~/.openclaw/workspace --continuous
You should see the first upload finish, then sync keep running and watching for changes.
Sync stops when you close the terminal?
Run
ob sync --continuousin a session that survives logout, such astmux, or set it up as a system service.You'll choose an encryption password. Keep it in a password manager, never in a file inside the vault.
Step 3: Open the vault on your computer
5 minYour computer becomes the second device, so you see the agent's files as they change.
- In Obsidian, create a new, empty vault. Connecting a vault that already has notes merges them.
- In Settings > General, log in. Then in Settings > Core plugins, turn on Sync.
- In Settings > Sync, click Choose next to Pick remote vault, then Connect on OpenClaw workspace. Enter its password.
- Before you start syncing, turn on Sync all other types under Selective sync.
You should see
AGENTS.md,SOUL.mdand thememoryfolder in the file list, and Synced in the status bar.JSON or HTML files are missing?
Turn on Sync all other types in Settings > Sync, then restart Obsidian. Sync settings are set on each device.
Step 4: Write USER.md and a shared to-do list
6 minOpenClaw reads
USER.mdevery session, and one shared list keeps every handoff in a single place.- In Obsidian, open
USER.mdat the top of the vault, or create it. Add short rules like the ones below. - Keep it under 4,000 characters. That's all OpenClaw loads from it each session.
- Create
todo.mdwith three headings:## For the agent,## For meand## Done. - In
AGENTS.md, add the line: Check todo.md at the start of every session.
Your USER.md<!-- observed: [YYYY-MM-DD] | status: active --> - Prefer short updates with the result first. <!-- observed: [YYYY-MM-DD] | status: active --> - Always write examples for [YOUR CUSTOMERS], who buy [WHAT YOU SELL]. <!-- observed: [YYYY-MM-DD] | status: active --> - Never post or send anything outside the workspace without asking me.
You should see both files in the vault, and Synced in the status bar a few seconds after you save.
The agent ignores a rule you changed?
Keep one active rule per preference. Mark the old entry
supersededand edit the rule in place, instead of adding a second one.- In Obsidian, open
Step 5: Add viewers for JSON and HTML files
3 minAgents often leave data files and dashboards, and Obsidian can't open those without help.
- In Settings > Community plugins, turn off Restricted mode, then click Browse.
- Search for Data Files Editor, click Install, then Enable. It opens
.json,.txtand.xmlfiles. - Do the same for HTML Reader, which shows
.htmlfiles as pages.
You should see a JSON file opening as editable text, and an HTML dashboard showing as a page.
JSON files still won't open?
Only one plugin can own the
.jsonextension. Turn off any other JSON plugin, such as JSON Editor, and restart Obsidian.For HTML from a source you don't trust, switch HTML Reader to Text Mode, its safest setting.
Step 6: Hand off tasks on a schedule
5 minA recurring job makes the agent check your list, so you don't have to message it for every task.
- On the agent machine, run the command below. It checks
todo.mdevery 30 minutes between 08:00 and 22:00. - In Obsidian, add a task under
## For the agent, such as a weekly analytics summary. - Wait until the status bar says Synced, then leave the task to the agent.
Run this on the agent machineopenclaw automations add \ --name "Todo check" \ --every 30m \ --session isolated \ --message "Open todo.md. Do each unchecked task under For the agent, then tick it and add a one-line result. If none are open, reply NO_REPLY." \ --active-hours-start 08:00 \ --active-hours-end 22:00 \ --active-hours-timezone user
You should see the task ticked in
todo.mdwithin the hour, with the agent's result under it.Nothing changes after an hour?
Run
openclaw automations listto check the job and its next run. To test it now, runopenclaw automations runwith the job's ID.- On the agent machine, run the command below. It checks
You get
A shared Obsidian vault where you and your OpenClaw agent edit the same files and pass work through `todo.md`
Try next
Did this guide work for you?
Thanks. It helps us fix the steps.


