AFan4724/clone-chat
Feed it your old chat logs, and a local AI clone learns to talk exactly like that person
clone-chat is a locally-run agent that imports a real person's chat history and learns their tone, favorite stickers, and reply rhythm to keep conversations going as that person. The agent itself decides whether to reply, how long to wait, how many messages to send, and whether to answer with text or voice, all based on evidence pulled from the imported logs. Everything runs on your own machine, so the data stays private.
What it does
- Chat exports from any messaging app are converted into a standard format; the system then extracts real message samples, tone summaries, reply delay patterns, active hours, and frequently used short phrases as behavioral statistics.
- It combines full-text search (FTS5) with locally computed semantic vector search to retrieve relevant past conversations as grounding for each reply, and builds a sticker index using only stickers the person actually sent, tagged by meaning and context.
- The agent is built with the OpenAI Agents SDK and supports switching between OpenAI-compatible model providers like DeepSeek, OpenAI, and Xiaomi's Mimo; each reply can be marked 'sounds like them' or not, feeding back into later turns.
- Beyond text, it supports voice messages both ways, delayed message delivery, handling of unread/undelivered messages, and proactive outreach, all inside a realistic chat UI with bubbles, typing indicators, and send status.
- Adding the app to an iPhone home screen with a locally installed HTTPS certificate enables push notifications on iOS, and by default the server only listens on localhost, keeping it off the public internet unless explicitly configured otherwise.
Why it matters
It's a concrete reference for anyone building a personal project to preserve or recreate how a close friend or family member talks, or for developers designing chat-data products who want to avoid sending private conversation data to a remote server. Being pure JavaScript also makes it easy for web developers to read and modify the code directly.
Terms in this repo
- FTS5 · a built-in full-text search feature in SQLite databases
- OpenAI Agents SDK · a toolkit from OpenAI for structuring an AI agent's decision-making and tool-use flow
- OpenAI-compatible · a spec that lets other companies' models be called the same way as OpenAI's API
- semantic vector search · a search method that turns sentences into number arrays to find ones with similar meaning
Repository description (English)
voice, proactive messages, long-term memory, fully private.
Open on GitHubTrending repos
- vorssaint/vorssaint-utilsOne free menu bar app replaces a dozen paid Mac utilities
- Alishahryar1/free-claude-codeA local proxy that lets coding AI agents run on 49 free or cheap model providers instead of one paid service
- freestylefly/awesome-gpt-image-2A library of 532 reverse-engineered prompts that turn GPT-Image2 into a predictable image-making tool
- block/buzzAn open-source workspace where humans and AI agents chat, code, and review in the same rooms
- NousResearch/hermes-agentNous Research's Hermes is an AI agent that gets smarter the more you use it
- virgiliojr94/book-to-skillA tool that turns technical book PDFs into on-demand reference skills for AI coding agents
- VoltAgent/awesome-agent-skillsA single hub collecting over 1000 'how-to' manuals that make AI coding assistants act like experts
- anthropics/claude-plugins-communityA shared shelf where anyone's Claude add-ons get listed for install