explaingit

novasplace/csm

Analysis updated 2026-05-18

5TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

A memory runtime for AI coding assistants that persists knowledge across sessions through a multi-stage pipeline: journal, compaction, belief extraction, and safe promotion to durable memory.

Mindmap

mindmap
  root((CSM))
    What it does
      Persists AI memory across sessions
      Compresses conversation history
      Promotes beliefs safely
      Injects context at session start
    Pipeline stages
      Work journal
      Compaction
      Experience packets
      Belief promotion
    Safety
      Confidence thresholds
      Dry-run by default
      Contradiction detection
      Provenance tracking
    Tech Stack
      TypeScript
      PostgreSQL plus pgvector
      SQLite option
    Audience
      AI agent developers
      Coding assistant builders
Click or tap to explore — scroll the page freely

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 a Claude or GPT-based coding assistant memory that persists across separate chat sessions and projects.

USE CASE 2

Automatically compress long conversation histories so an AI agent does not run out of context window space.

USE CASE 3

Build an agent that learns from past mistakes and stores lessons so it does not repeat the same errors in future sessions.

What is it built with?

TypeScriptPostgreSQLpgvectorSQLiteNode.js

How does it compare?

novasplace/csmfarique/cursor-chat-explorerflarelog-dev/sdk
Stars555
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardeasyeasy
Complexity4/52/52/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires PostgreSQL with the pgvector extension installed and configured, or SQLite as a lighter alternative, 25-table schema must be migrated before use.

The README does not specify a license.

In plain English

When you chat with an AI assistant, the assistant forgets everything the moment the conversation ends. Every new session starts from a blank slate. Cross-Session Memory, or CSM, is a system that gives an AI coding assistant a durable memory that persists across conversations. The assistant can remember decisions made in previous sessions, lessons learned from past mistakes, architectural choices, and context about the project it is working on. The project is not simply a database of saved notes. It is a pipeline with several stages. Raw events from tool calls and conversations flow into a work journal. That journal is compressed into structured summaries. Those summaries are analyzed for patterns and turned into candidate beliefs. Candidates then pass through safety checks before they are promoted to durable memories. The final stage assembles a short context brief that the assistant reads at the start of each new session to orient itself. Each stage is optional, and the pipeline degrades gracefully if you only use the basic save and search functions. The safety design is deliberate. Nothing gets permanently stored without passing a confidence threshold and checks for duplicates and contradictions. All maintenance operations default to a dry-run mode, meaning they show what would change without actually changing anything until you confirm. Advisory blocks that the assistant reads are labeled as previews, not authoritative facts, to prevent confident-sounding but wrong memories from driving bad decisions. The system is built on PostgreSQL with the pgvector extension for semantic search, or SQLite as a lighter alternative. It exposes 27 tools across groups covering memory save and search, governance and deduplication, belief scanning and promotion, agent journaling, and checkpointing. There are 728 tests in the suite. The project is aimed at developers building or extending AI coding assistants and agents that need continuity across sessions. Installation requires Node.js and either a PostgreSQL database with pgvector enabled or SQLite. The README describes the full pipeline, all tool groups, and configuration options for database connections and threshold profiles. The project is in an early state and the README notes that breaking changes are possible.

Copy-paste prompts

Prompt 1
I want to add cross-session memory to my AI coding assistant using CSM. Walk me through connecting it to PostgreSQL with pgvector and registering the first tool calls.
Prompt 2
How does CSM's belief promotion pipeline work? Explain the confidence threshold, reinforcement count, and contradiction detection gates before a memory becomes durable.
Prompt 3
I want to use CSM with SQLite instead of PostgreSQL. What are the trade-offs and what changes in the setup configuration?
Prompt 4
The CSM advisory block is getting too long and pushing useful context out of the window. How does budget trimming work and which belief types get dropped first?

Frequently asked questions

What is csm?

A memory runtime for AI coding assistants that persists knowledge across sessions through a multi-stage pipeline: journal, compaction, belief extraction, and safe promotion to durable memory.

What language is csm written in?

Mainly TypeScript. The stack also includes TypeScript, PostgreSQL, pgvector.

What license does csm use?

The README does not specify a license.

How hard is csm to set up?

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

Who is csm for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub novasplace on gitmyhub

Verify against the repo before relying on details.