explaingit

tara93-1/azoth_mem

Analysis updated 2026-05-18

13HTMLAudience · developerComplexity · 4/5Setup · moderate

TLDR

A layered, decaying memory system for AI companion characters, storing recent chat plus semantically searchable long-term memories.

Mindmap

mindmap
  root((AZOTH_mem))
    What it does
      Layered AI memory
      Decays over time
      Semantic recall
    Tech stack
      Node.js
      Express
      SQLite
      Embedding model
    Use cases
      AI companion roleplay
      Multi-character memory
      Obsidian integration
    Audience
      AI app developers
      Roleplay tool builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give an AI companion or roleplay character memory that persists and fades realistically over time.

USE CASE 2

Search past conversation memories by meaning instead of exact keywords.

USE CASE 3

Run multiple characters or devices, each with its own isolated memory space.

USE CASE 4

Pin important facts so they always appear in the AI's prompt context.

What is it built with?

Node.jsExpressSQLitesql.jsbge-small-zh-v1.5

How does it compare?

tara93-1/azoth_memchingjh/ghostirenerachel/a4cv
Stars131313
LanguageHTMLHTMLHTML
Setup difficultymoderateeasyeasy
Complexity4/51/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires running a Node.js backend plus a local embedding model.

In plain English

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.

Copy-paste prompts

Prompt 1
Explain how the short-term and long-term memory layers in AZOTH_mem work together.
Prompt 2
Walk me through the heat and half-life formula this project uses to decay memory importance.
Prompt 3
How would I connect an Obsidian vault to this memory system via MCP?
Prompt 4
Show me how a memory entry's pinned, resolved, and archive-only properties interact.

Frequently asked questions

What is azoth_mem?

A layered, decaying memory system for AI companion characters, storing recent chat plus semantically searchable long-term memories.

What language is azoth_mem written in?

Mainly HTML. The stack also includes Node.js, Express, SQLite.

How hard is azoth_mem to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is azoth_mem for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.