Logseq API Integration for Openclaw

A comprehensive interface to programmatically interact with a local Logseq instance for automated knowledge management and graph manipulation.

juanirm
v1.0.0
Feb 2, 2026
6
4.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install logseq

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install logseq using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Logseq API Integration?

The Logseq skill provides a robust bridge to the JavaScript Plugin API of your local Logseq instance. It allows developers and power users to perform complex operations on their personal knowledge management system, including reading and writing blocks, creating pages, and executing sophisticated Datalog queries. This integration is essential for those looking to build custom workflows or automate repetitive note-taking tasks.

By leveraging Openclaw Skills, you can transform Logseq from a passive notebook into an active, programmable database. Whether you are managing tasks, syncing external data, or organizing research, this skill provides the necessary endpoints to interact with the Logseq App, Editor, and Database namespaces directly. It enables a high degree of extensibility, allowing your AI agent to interact with your thoughts and data as a structured graph.

Logseq API Integration Use Cases

  • Programmatically creating daily journal entries or project pages from external triggers.
  • Automating task management by querying for TODO and DOING markers across the entire graph.
  • Synchronizing local notes with external databases or web services using Openclaw Skills.
  • Performing batch updates to block properties or content to maintain graph consistency.
  • Navigating the Logseq UI or triggering notifications based on system-level events.

How Logseq API Integration Works

  1. The skill establishes a connection to a locally running Logseq instance through a bridge plugin or the @logseq/libs proxy.
  2. Commands are issued to specific API namespaces such as Editor for content manipulation or DB for data retrieval.
  3. For read operations, the skill fetches BlockEntity or PageEntity data structures from the local graph database.
  4. For write operations, it utilizes methods like insertBlock or createPage to modify the graph in real-time.
  5. Complex data retrieval is handled via Datalog or Datascript queries to filter and extract specific information from the graph schema.

Logseq API Integration Setup

To use this skill, ensure Logseq is running locally. You typically need a bridge plugin to expose the API via HTTP. Alternatively, for Node.js environments, install the required library:

npm install @logseq/libs

Configure the skill to point to your Logseq API endpoint (usually localhost) and ensure the API is enabled in Logseq's settings under the Plugins section. Using Openclaw Skills with Logseq requires the instance to be active and the target graph to be loaded.

Logseq API Integration Data Schema & Taxonomy

The skill interacts with two primary data entities that organize your knowledge. When processing data via Openclaw Skills, the following schema is used:

BlockEntity

  • uuid: Unique identifier for the block.
  • content: The raw text or markdown content.
  • properties: An object containing block-level metadata (prop:: value).
  • marker: Task status such as TODO, DOING, or DONE.
  • children: Nested block structures.

PageEntity

  • name: Lowercase unique name of the page.
  • originalName: The case-sensitive name as displayed.
  • journal?: Boolean indicating if the page is a journal entry.
  • journalDay: Date integer in YYYYMMDD format for journals.

Logseq API Integration Advanced Features

  • Support for complex Datalog and Datascript queries for deep data mining within your graph.
  • Integration with Logseq Git operations to automate version control commits and repository syncing.
  • Multi-agent workflow support where different Openclaw Skills can coordinate to update a shared Logseq graph.
  • Batch block insertion capabilities using insertBatchBlock for high-performance data imports.
  • Custom slash command registration and UI message handling for interactive automations within the Logseq interface.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*