2026-01-23 01:54:28 +08:00
2026-01-23 01:54:28 +08:00
2026-01-23 01:33:51 +08:00
2026-01-07 22:05:20 +08:00
2025-11-26 13:57:24 +08:00
2025-11-27 23:06:48 +08:00
2025-11-26 13:57:24 +08:00
2025-11-26 13:57:24 +08:00
2026-01-13 21:37:27 +08:00
2025-11-29 20:58:19 +08:00
2025-11-26 13:57:24 +08:00
2025-11-26 13:57:24 +08:00
2026-01-21 15:27:43 +08:00
2026-01-23 01:54:28 +08:00
2026-01-21 23:21:43 +08:00
2026-01-21 15:37:31 +08:00
2025-11-26 13:57:24 +08:00
2025-11-26 13:57:24 +08:00
2025-11-26 13:57:24 +08:00

ChatLab

English | 简体中文

ChatLab is a free, open-source, and local-first application dedicated to analyzing chat records. Through an AI Agent and a flexible SQL engine, you can freely dissect, query, and even reconstruct your social data.

We refuse to upload your privacy to the cloud; instead, we bring powerful analytics directly to your computer.

Currently supported: Chat record analysis for WeChat, QQ, WhatsApp, Instagram and Discord. Upcoming support: iMessage, and LINE.

The project is still in early iteration, so there are many bugs and unfinished features. If you encounter any issues, feel free to provide feedback.

Core Features

  • 🚀 Ultimate Performance: Utilizing stream computing and multi-threaded parallel architecture, it maintains fluid interaction and response even with millions of chat records.
  • 🔒 Privacy Protection: Chat records and configurations are stored in your local database, and all analysis is performed locally (with the exception of AI features).
  • 🤖 Intelligent AI Agent: Integrated with 10+ Function Calling tools and supporting dynamic scheduling to deeply excavate interesting insights from chat records.
  • 📊 Multi-dimensional Data Visualization: Provides intuitive analysis charts for activity trends, time distribution patterns, member rankings, and more.
  • 🧩 Format Standardization: Through a powerful data abstraction layer, it bridges the format differences between various chat applications, allowing any chat records to be analyzed.

Usage Guides

Preview Interface

For more previews, please visit the official website: chatlab.fun

Preview Interface

System Architecture

Electron Main Process

  • electron/main/index.ts handles the application lifecycle, window management, and custom protocol registration.
  • electron/main/ipc/ splits IPC modules by function (Window, Chat, Merge, AI, Cache) to ensure secure and controllable data exchange.
  • electron/main/ai/ integrates multiple LLMs, featuring built-in Agent pipelines, prompt assembly, and Function Calling tool registration.

Worker and Data Pipeline

  • The workerManager in electron/main/worker/ coordinates Worker threads, while dbWorker handles message routing.
  • worker/query/* handles activity, AI search, advanced analysis, and SQL Lab queries.
  • worker/import/streamImport.ts provides stream importing.
  • The parser/ directory adopts a three-layer "sniff + parse" architecture capable of processing GB-level log files with constant memory usage.

Rendering Process

  • Vue 3 + Nuxt UI + Tailwind CSS manages the visualization pages.
  • src/pages contains business pages, while src/components/analysis and src/components/charts provide reusable components.
  • src/stores manages states like sessions, layout, and AI prompts via Pinia.
  • src/composables/useAIChat.ts encapsulates the AI conversation workflow.
  • The preload script electron/preload/index.ts exposes window.chatApi/mergeApi/aiApi/llmApi, ensuring secure isolation between the renderer and main processes.

Local Development

Setup Steps

Node.js environment requirement: v20+

# Install dependencies
pnpm install

# Start development server
pnpm run dev

If Electron encounters exceptions during startup, you can try using electron-fix:

npm install electron-fix -g
electron-fix start

Contribution Guide

Please follow these principles before submitting a Pull Request:

  • Obvious bug fixes can be submitted directly.
  • For new features, please submit an Issue for discussion first; PRs submitted without prior discussion will be closed.
  • Keep one PR focused on one task; if changes are extensive, consider splitting them into multiple independent PRs.

Privacy Policy & User Agreement

Before using this software, please read the Privacy Policy & User Agreement.

License

AGPL-3.0 License

Description
No description provided
Readme AGPL-3.0 4.3 MiB
Languages
TypeScript 54.7%
Vue 45%
CSS 0.3%