Afterglow
基于 RAG(免微调)从聊天记录唤起语气与回忆:让曾经对话的温度,延续为往后的陪伴。 | Zero-finetuning RAG to revive tone and memories from chat logs: Let the warmt
What is Afterglow?
基于 RAG(免微调)从聊天记录唤起语气与回忆:让曾经对话的温度,延续为往后的陪伴。 | Zero-finetuning RAG to revive tone and memories from chat logs: Let the warmth of past conversations continue into companionship.
Overview of Afterglow
What it is
Afterglow is a locally hosted AI companion that uses real chat histories from social media to build retrievable relationship memories, persona, and expressive style. It combines RAG (Retrieval-Augmented Generation), persona context, and an OpenAI-compatible API to let AI continue conversations in a familiar way. It does not fine-tune model weights, restore a real person, or replace real relationships. Results depend on the amount and distinctiveness of source chats and the chosen model.
Key features
- Multiple import sources: QQChatExporter, WeFlow, Douyin, Afterglow Chat, WhatsApp, Telegram, and DiscordChatExporter; supports multi-file profile aggregation - Layered hybrid retrieval: five vector paths across three text-history types, image descriptions, and Live memory; uses RRF with optional rewrite/rerank - Persona and state: includes persona, contextual style, circadian profile, Life state, optional analysis profiles, relationship memory, and response policy - Offline relationship analysis: explicit
xuwen analyzecommands for timeline, personality, and Life reports, with independent runtime-consumption switches - Proactive tendencies: separatexuwen analyze-proactivereport and read-only quality checks before manual opt-in - Memory separation: distinguishes human history, new user messages, and AI replies to limit persona contamination - Open integration: OpenAI-compatible Chat Completions and Responses APIs for external clients - Local-first storage: uses LanceDB, persona and resource caches; includes PII redaction, Bearer auth, and configurable offline model services
Use cases
- Recreating a familiar conversational style from past chat logs for personal companionship - Building a persistent AI companion that remembers relationship context and personal history - Experimenting with RAG-based persona simulation without fine-tuning - Integrating with external clients via an OpenAI-compatible API
Getting started
See the repository README for installation and quick-start instructions.
License and pricing
Licensed under AGPL-3.0. The project is open source.
Based on the project's public README and repository metadata.