Analysis updated 2026-05-18
Give an AI companion or roleplay character memory that persists and fades realistically over time.
Search past conversation memories by meaning instead of exact keywords.
Run multiple characters or devices, each with its own isolated memory space.
Pin important facts so they always appear in the AI's prompt context.
| tara93-1/azoth_mem | chingjh/ghost | irenerachel/a4cv | |
|---|---|---|---|
| Stars | 13 | 13 | 13 |
| Language | HTML | HTML | HTML |
| Setup difficulty | moderate | easy | easy |
| Complexity | 4/5 | 1/5 | 1/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires running a Node.js backend plus a local embedding model.
AZOTH_mem is a memory system designed for AI companion characters, built by a developer working in Chinese. Instead of giving an AI character a flat list of conversation history, this system gives each character a layered memory that grows, fades, and can be retrieved in different ways depending on how relevant or recent a memory is. The system splits memory into two layers. The first is a short-term working memory layer (called longTermMemory in the code) that lives in the browser and holds the most recent conversation points, injected directly into each prompt. The second is a long-term memory layer (memory_index) that lives on a backend server, stores memories as 384-dimensional vectors using a local Chinese embedding model, and is searched by meaning rather than keyword. Only the memories most relevant to what is being discussed get pulled into the conversation. Each memory entry has four independent properties that track its state: whether it is pinned (always present in prompts), whether it is resolved (the thing it refers to is finished), whether it is archive-only (hidden unless specifically searched for), and how important it is overall. These properties are independent, so a memory can be both resolved and still marked as highly important. Memory importance also decays over time using a heat formula. A memory starts with a temperature based on how significant the event was, and that temperature drops by half at regular intervals. However, each time the memory is genuinely recalled in conversation, its half-life extends. The system tracks the difference between a memory being present in a prompt and a memory being truly recalled, only extending the half-life for the latter. The technical stack is Node.js with Express on the backend, SQLite running in memory via sql.js, and a local embedding model (bge-small-zh-v1.5) for vector search. An Obsidian note vault can be connected via MCP as a document evidence layer. The project is designed for AI roleplay and creative writing contexts where users maintain multiple characters or devices, each with their own isolated memory space.
A layered, decaying memory system for AI companion characters, storing recent chat plus semantically searchable long-term memories.
Mainly HTML. The stack also includes Node.js, Express, SQLite.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.