[Guide][5 steps] Exporting chats & prompts from Cursor

  1. Go to workspaceStorage. (On Windows, cd %APPDATA%\Cursor\User\workspaceStorage)
  2. You will see a list of folders whose names are md5 hashes. Open each of them.
  3. datasette state.vscdb
  4. Visit “http://localhost:8001/state?” in a browser and enter this query:

SELECT
rowid,
[key],
value
FROM
ItemTable
WHERE
[key] IN (‘aiService.prompts’, ‘workbench.panel.aichat.view.aichat.chatdata’)

  1. Parse the json based on your use case.
9 Likes

Thank you so much for this workaround! Hopefully the Cursor team can make this into a “button” in the near future.

3 Likes

And on Mac? i cant find it

Edit: Found it!

/Users/YOUR_USERNAME/Library/Application Support/Cursor/User/workspaceStorage

1 Like

Anyone found the path for linux?

Edit: Found it!

/home/YOUR_USERNAME/.config/Cursor/User/workspaceStorage

2 Likes

Is there a simple way to import to the db file on another computer/folder?

1 Like

I’ve made a cursor chat browser for both chat and composer messages (using cursor :).
check it out below. It has already helped me a lot. You can download the logs as md, pdf or html.

Feel free to contribute with improvements and provide feedback. Not tested it on other environments than WSL2 on windows.

5 Likes

duuude! thank you so much!

this is a goldmine! essentially all of my preferences for working with AI and a huge amount of my best internal documentation is hidden away inside my cursor chats

3 Likes

PR for a “download all” (written 100% by cursor composer agent, although for some reason i’m having trouble exporting the chat to show how i did it.)

@thomas-pedersen

1 Like

Seems like in ver0.43,chat history in “Composer” tab is not explicit in state.vscdb。I can still find all my prompts in “aiService.prompts” row in state.vscdb,but cannot find cursor‘s answer。
I also checked other data in state.vscdb, what I got in row composer.composerData is like:

{
    "allComposers": [
        {
            "type": "head",
            "composerId": "c87f56e4-e72a-45f1-8a08-6c7fd3f03e05",
            "createdAt": 1732619305658,
            "forceMode": "edit",
            "lastUpdatedAt": 1732697065798,
            "name": "Dropdown Menu Selection Troubleshooting"
        }
    ],
    "selectedComposerId": "c87f56e4-e72a-45f1-8a08-6c7fd3f03e05",
    "selectedChatId": "42c95a5e-7118-4a45-b08c-def2c56583e0",
    "hasMigratedChatData": true,
    "hasMigratedUseAutoContext": true,
    "hasMigratedComposerData": true
}

Does anyone know where or how we can approch to the explicit composer logs in Cursor??

2 Likes

This looks awsome, would you mind linking to it from your LN profile?
It would increase exposure to this very useful tool AND give confidence to folks who want to use it.

@thomas-pedersen

This looks really cool.

I tested it but couldn’t make it work with the composer history in “agent” mode.

I am on Mac.

Do anyone know if this works for composer sessions in agent mode ?

We just built a native extension that exports all Chats and Composer logs from Cursor. So you don’t have to follow the steps above to get at your chat history: SpecStory (Cursor Extension) - Visual Studio Marketplace

We also noticed what @daisy-cao’s pointed out, and made sure this extension works with the schema change in Cursor Version: 0.43.6

Love what @raw.works wrote above:

this is a goldmine! essentially all of my preferences for working with AI and a huge amount of my best internal documentation is hidden away inside my cursor chats

This is exactly what we’re trying to do! Wrote more about this in our launch post: Built a Cursor Extension to save and share chat and composer history

3 Likes

Only seems to support composer chats, not normal chats, I just did a long chat with the @repo and wanted to export its recommendations into o1 pro, and it didn’t come up in your list of chats :frowning: