Chat Data Integration
Learn how to connect your chat data to Rethink AI
title: Chat Data Integration description: Learn how to connect your chat data to Rethink AI category: chatlogIntegration order: 3
This document explains how to connect your chat data to Rethink AI for intelligent querying and analysis.
Integration Methods
Rethink AI supports two methods for accessing chat data. Both are performed locally — no data is uploaded to any server.
| Method | Use Case | Dependencies |
|---|---|---|
| Local Decryption | IM client already installed on this machine | None |
| Docker Container | Need isolated IM environment | Docker Desktop |
Local Decryption (Recommended)
Local decryption reads and decrypts chat database files directly from your device, without requiring Docker.
How It Works
The IM client stores encrypted SQLite database files locally. Rethink AI uses a native C decryption module to decrypt these databases and extract contacts, group chats, and chat history.
Configuration Steps
- Ensure the IM client is installed and logged in on your machine
- Open the Rethink AI Settings panel
- Find the Local Decryption section
- Set the chat database path:
- macOS: Usually auto-detected, located in the IM client's application data directory
- Windows: Usually under the IM data folder in your user documents directory
- Click Start Decryption Service
- Wait for decryption to complete
Supported Data Types
- Contacts: Username, nickname, alias
- Group Chats: Group name, member list
- Chat History: Message content, timestamps, senders
- Images: Supports decryption and viewing of chat images
Docker Container Method
The Docker container method runs the IM client in an isolated environment to access data.
Prerequisites
- Docker Desktop installed
- Docker service running
Configuration Steps
- Open the Rethink AI Settings panel
- Find the IM Runtime section
- Configure the following:
- Docker Image: Use the default image or specify a custom one
- VNC Port: For remote connection to the IM client interface (default 5900)
- Data Mount Path: Local mapping path for container chat data
- Click Start Container
- Connect via a VNC client and log in to the IM client
- After successful login, data will automatically sync locally
Environment Check
Before starting the container, the app automatically verifies:
- Docker service is running
- Required ports are available
- Image has been downloaded
CDC Real-Time Sync
CDC (Change Data Capture) automatically monitors chat database file changes and decrypts new messages incrementally in real time.
Enabling CDC
- Find the CDC Sync configuration in Settings
- Turn on the CDC toggle
- Configure the watch directory (usually the chat database directory)
How It Works
- Event-Driven: Uses file system watchers to detect database file changes
- Polling: Reconciliation every 60 seconds
- Incremental Decryption: Only processes changed data to save resources
- Failure Retry: Exponential backoff strategy, up to 10-minute intervals
Data Storage
All imported chat data is stored in a local SQLite database:
- Location: Inside the application data directory
- Format: SQLite database files
- Cleanup: You can delete the database files manually at any time
FAQ
What if decryption fails?
- Confirm the IM client is running and logged in
- Verify the database file path is correct
- Check application logs for detailed error information
- Make sure your client version is compatible
Docker container won't start?
- Confirm Docker Desktop is running
- Check that required ports (e.g., VNC port) are not in use
- Try manually pulling the Docker image
Data sync is delayed?
Enable CDC real-time sync to reduce delays. Without CDC, you need to manually restart the decryption service to get the latest data.
Does it support multiple accounts?
Currently, only a single IM account is supported. To switch accounts, switch in the IM client first, then restart the decryption service.
Next Steps
Once data integration is complete, read the Usage Guide to learn how to query and analyze your chat data through AI conversations.