Give Your AI Agent Perfect Memory with Obsidian Headless

The video explains how to use Obsidian’s new headless client to run a persistent, encrypted markdown vault on a remote server, enabling AI agents to have perfect memory through seamless synchronization without a graphical interface. It also demonstrates setting up the client as a systemd service for continuous operation and highlights the flexibility of this approach for various AI workflows and community projects.

The video discusses the importance of running AI agents on remote servers rather than local machines, highlighting the challenge of maintaining persistent memory for these agents. Traditionally, keeping an Obsidian vault alive on a VPS required complex workarounds, such as running headless Obsidian in Docker containers, which felt cumbersome. However, with the release of Obsidian’s official headless client—a lightweight Node.js CLI tool called “ob”—the process has become much cleaner and more efficient. This tool requires Node.js 22 or newer and an active Obsidian Sync subscription, enabling seamless, encrypted synchronization of markdown files without the need for the full desktop app or a graphical interface.

The video then guides viewers through setting up the headless Obsidian client on a remote Linux server, recommending Hostinger VPS for its ease of use and affordability. After ensuring Node.js is installed, users install the client via npm, log in with their Obsidian credentials, and link a local directory to their remote vault using the provided commands. The synchronization supports live updates with a continuous sync flag, but users must be cautious about the sync mode to avoid accidental overwrites. The presenter emphasizes that the sync status command only works within the vault directory, a detail that can confuse newcomers.

A critical part of the setup involves running the sync process as a user-level systemd service to keep it active in the background, even after logging out or server reboots. The video explains how to create and configure this service, including setting the working directory, enabling automatic restarts, and managing logs. The most important step is enabling systemd linger for the user, which ensures the service continues running independently of active SSH sessions. This approach avoids permission issues by keeping the service under the normal user account rather than root, making the setup cleaner and safer.

The real advantage of this setup is that the Obsidian vault consists solely of markdown files and configuration folders, with no proprietary database or locked format. This means any script, CLI tool, or AI agent can easily read from and write to the vault using standard file operations without needing a special API. The presenter uses Hermes for agent workflows but notes that other tools like Clawed Code, Codex, and Open Claw can also interact with the vault. This flexibility allows agents to manage notes, append tasks, collect code snippets, or store meeting transcripts, turning the vault into both a source of context and a destination for new information.

Finally, the video highlights community projects like Open Second Brain, which leverage this setup to perform automated nightly updates that refine agent behavior based on stored preferences. This headless Obsidian setup is not limited to simple note-taking but supports a wide range of markdown-based workflows, making it a powerful tool for anyone building AI agent memory systems. The presenter concludes by encouraging viewers to explore the possibilities this approach unlocks and expresses excitement about the innovative uses that may emerge from it.