Rethink AIRethink AI

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.

MethodUse CaseDependencies
Local DecryptionIM client already installed on this machineNone
Docker ContainerNeed isolated IM environmentDocker Desktop

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

  1. Ensure the IM client is installed and logged in on your machine
  2. Open the Rethink AI Settings panel
  3. Find the Local Decryption section
  4. 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
  5. Click Start Decryption Service
  6. 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

Configuration Steps

  1. Open the Rethink AI Settings panel
  2. Find the IM Runtime section
  3. 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
  4. Click Start Container
  5. Connect via a VNC client and log in to the IM client
  6. 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

  1. Find the CDC Sync configuration in Settings
  2. Turn on the CDC toggle
  3. 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?

  1. Confirm the IM client is running and logged in
  2. Verify the database file path is correct
  3. Check application logs for detailed error information
  4. Make sure your client version is compatible

Docker container won't start?

  1. Confirm Docker Desktop is running
  2. Check that required ports (e.g., VNC port) are not in use
  3. 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.