deepchat-data-import

Import and inspect DeepChat SQLite databases, provider configs, sessions, and messages.

6.3k|728|Updated Feb 14, 2025
One-click install
npx skills add https://github.com/ThinkInAIXYZ/deepchat --skill deepchat-data-import
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepchat-data-import
Source: https://github.com/ThinkInAIXYZ/deepchat/tree/main/.agents/skills/deepchat-data-import
Command: npx skills add https://github.com/ThinkInAIXYZ/deepchat --skill deepchat-data-import

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

DeepChat stores provider keys, MCP settings, sessions, and chat history in local SQLite databases that may be SQLCipher-encrypted, making it hard for third-party tools to safely read, migrate, or analyze that data without corrupting a live profile.

Core Features & Use Cases

  • Data Location & Snapshot Guidance: Locate agent.db, legacy chat.db, WAL sidecars, and database-security.json across macOS, Windows, and Linux, with rules for safe read-only snapshots.
  • Encryption Handling: Open SQLCipher-encrypted databases via Electron safeStorage unwrapping or manual password fallback, including guidance for Tauri and native importers.
  • Schema & Import Recipes: Map providers, models, sessions, structured user messages, and assistant blocks into target app formats with secret-redaction checklists.
  • Use Case: Build a migration tool that copies a user's DeepChat profile, unlocks the encrypted agent.db, and exports all sessions and messages into another chat client's format.

Quick Start

Use the deepchat-data-import skill to help me write a tool that exports my DeepChat sessions and messages from agent.db into JSON.

Frequently Asked Questions about deepchat-data-import

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import DeepChat chat history into another app?

Snapshot agent.db with its WAL sidecars, open it read-only, then query new_sessions joined with deepchat_sessions and read deepchat_messages ordered by order_seq. Hydrate user messages from structured tables and assistant messages from deepchat_assistant_blocks before exporting.

How do I open an encrypted DeepChat agent.db file?

DeepChat uses SQLCipher via better-sqlite3-multiple-ciphers with legacy=4 compatibility mode. Check database-security.json; if passwordStorage is safeStorage, unwrap the password with Electron safeStorage, otherwise ask the user for the SQLite password.

Where does DeepChat store its database files?

DeepChat stores agent.db, agent.db-wal, and agent.db-shm under the Electron userData app_db folder: ~/Library/Application Support/DeepChat on macOS, %APPDATA%\DeepChat on Windows, and ~/.config/DeepChat on Linux.

Can a Tauri app decrypt DeepChat's safeStorage password?

No, Tauri cannot call Electron safeStorage directly. Ask the user for the SQLite password and open the database with a SQLCipher-capable binding, or optionally spawn a small Electron helper to unwrap the password with user consent.

Why does my copied DeepChat database show missing recent messages?

Copying a live agent.db without its agent.db-wal and agent.db-shm sidecars loses recent rows still in the write-ahead log. Re-copy all three files together or ask the user to close DeepChat before snapshotting.

Is it safe to write directly into a live DeepChat database?

No, third-party tools should never open the active agent.db read-write. Instead produce an export file or backup package that DeepChat imports through its own code, or work only on copied databases for controlled migration tests.