← Docs hub

Cursor Agent CLI adapter

Status: Production Module: llmwiki.adapters.contrib.cursor_cli Source: llmwiki/adapters/contrib/cursor_cli.py

This is not the Cursor IDE adapter. IDE Composer history uses cursor_ide (global state.vscdb).

What it reads

Cursor Agent CLI (cursor-agent) stores each chat under:

~/.cursor/chats/<workspace-hash>/<chat-uuid>/store.db

store.db is a content-addressed blob store. The adapter reconstructs conversation order from the root tree blob and keeps user prompts verbatim; system / tool-result noise is dropped for the wiki.

Store meta agentId becomes frontmatter sessionId (and a short slug) — never the filesystem stem store. Meta createdAt (unix ms) becomes the session timestamp / started date used in raw filenames.

Enable it

Runs on bare llmwiki sync when ~/.cursor/chats/ exists. Override roots in adapters.cursor_cli or run llmwiki configure-sources.

python3 -m llmwiki sync                    # includes cursor_cli when store present
python3 -m llmwiki sync --adapter cursor_cli   # this source only

Automated (headless) sessions

With filters.exclude_headless (default true), a Cursor Agent CLI session is skipped when store meta has:

Interactive top-level Agent sessions (no subagentInfo, not auto-review) stay eligible. Those nested/auto-review sessions are classified under exclude_headless, not by changing include_subagents. Set "exclude_headless": false to include them.

See Multi-agent setup — What “automated” means.

Configuration

{
  "adapters": {
    "cursor_cli": {
      "roots": ["~/.cursor/chats"]
    }
  }
}

See also

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date