thelightframework/coherence-chat — explained in plain English
Analysis updated 2026-05-18
Try out the Coherence Framework's memory compression idea in a live chat interface.
See how much context a conversation avoids resending by checking the Savings view.
Extend the frontend with a new theme, About section, or memory-card view.
Study the backend's structured memory extraction as a reference for building your own context-saving chat app.
| thelightframework/coherence-chat | abhishek-akkal/finova | adan-shahid/ecommerce_website | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 1/5 | 3/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Python 3.10+ and an OpenRouter API key set in a .env file.
Coherence Chat is a web-based chat application that demonstrates a memory compression approach to AI conversations called the Coherence Framework. In an ordinary AI chat, the full conversation history grows with every message, making later turns more expensive and harder for the model to process. Coherence Chat tries a different approach: after each exchange, the AI condenses the most important context into small structured summaries called Memory Cards. In subsequent turns, the app sends those compact cards instead of the full prior conversation, keeping the context window lighter while preserving meaning. The interface reflects this design. Users chat normally and can open a Memory view to see what the AI has retained, and a Savings view that estimates how much context was avoided compared to a full-prose chat history. When the AI presents numbered choices, the input field temporarily switches to buttons to prevent ambiguous one-word replies. The backend is a Python application using FastAPI and uvicorn, which handles receiving messages and memory cards from the browser, making requests to an AI model provider (OpenRouter by default), streaming responses back, extracting structured memory, and returning telemetry for the savings screen. The frontend is plain HTML, JavaScript, and CSS. Python 3.10 or newer is required. The Coherence Framework context files live in a cf/ folder that the backend loads at startup. The project is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0), commercial use requires a separate license from the author.
A demo chat app that compresses long AI conversations into small 'Memory Cards' to keep context lighter and cheaper over long chats.
Mainly JavaScript. The stack also includes Python, FastAPI, uvicorn.
Free to share and adapt for non-commercial use with attribution under the same license, commercial use needs a separate paid license.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.