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:
subagentInfopresent (nested Task / subagent runs, including second-model children), orapprovalModeequal toauto-review(non-interactive auto-review runs)
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"]
}
}
}