Skip to content

Long-term memory layer for OpenClaw & MoltBook agents that learns and recalls your project context automatically.

License

Notifications You must be signed in to change notification settings

nhevers/MoltBrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

408 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Untitled design (32)

Long-term memory layer for OpenClaw, MoltBook & Claude Code that learns and recalls your project context automatically. $BRAIN CA 0x35e7942E91876Eb0c24A891128E559a744fe8B07

Install โ€ข Features โ€ข How It Works โ€ข Storage โ€ข Virtuals โ€ข OpenClaw โ€ข Config โ€ข API



โšก Quick Install

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                                                                      โ•‘
โ•‘   Step 1    /plugin marketplace add nhevers/moltbrain                โ•‘
โ•‘   Step 2    /plugin install moltbrain                                โ•‘
โ•‘                                                                      โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

That's it. MoltBrain starts working automatically.



๐Ÿง  What It Does

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                              โ”‚
โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”‚
โ”‚     โ”‚   SESSION #1    โ”‚                      โ”‚   SESSION #47   โ”‚             โ”‚
โ”‚     โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                      โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚             โ”‚
โ”‚     โ”‚                 โ”‚                      โ”‚                 โ”‚             โ”‚
โ”‚     โ”‚  "Set up auth   โ”‚                      โ”‚  "Add password  โ”‚             โ”‚
โ”‚     โ”‚   with OAuth"   โ”‚                      โ”‚   reset flow"   โ”‚             โ”‚
โ”‚     โ”‚                 โ”‚                      โ”‚                 โ”‚             โ”‚
โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚
โ”‚              โ”‚                                        โ”‚                      โ”‚
โ”‚              โ”‚  Claude discovers:                     โ”‚  Claude remembers:   โ”‚
โ”‚              โ”‚  โ€ข OAuth2 + PKCE flow                  โ”‚  โ€ข Your auth setup   โ”‚
โ”‚              โ”‚  โ€ข JWT with 1hr expiry                 โ”‚  โ€ข Token structure   โ”‚
โ”‚              โ”‚  โ€ข bcrypt cost factor 12               โ”‚  โ€ข Security choices  โ”‚
โ”‚              โ”‚                                        โ”‚                      โ”‚
โ”‚              โ–ผ                                        โ–ฒ                      โ”‚
โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚
โ”‚     โ”‚    CAPTURE     โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  โ”‚     INJECT     โ”‚               โ”‚
โ”‚     โ”‚   & LEARN      โ”‚      MEMORY          โ”‚    & RECALL    โ”‚               โ”‚
โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚
โ”‚                                                                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ


โœจ Features

+-------------------------+-------------------------+-------------------------+
|                         |                         |                         |
|   OBSERVATIONS          |   SMART SEARCH          |   WEB VIEWER            |
|   ----------------      |   ----------------      |   ----------------      |
|   Auto-captures         |   Semantic search       |   Browse history        |
|   discoveries,          |   via MCP tools         |   at localhost          |
|   decisions & code      |   finds context         |   :37777                |
|                         |                         |                         |
+-------------------------+-------------------------+-------------------------+
|                         |                         |                         |
|   ANALYTICS             |   TAGS & FILTERS        |   FAVORITES             |
|   ----------------      |   ----------------      |   ----------------      |
|   Track tokens,         |   Organize with         |   Bookmark your         |
|   sessions, and         |   custom tags &         |   most important        |
|   concept trends        |   smart filters         |   observations          |
|                         |                         |                         |
+-------------------------+-------------------------+-------------------------+
|                         |                         |                         |
|   EXPORT                |   THEMES                |   SHORTCUTS             |
|   ----------------      |   ----------------      |   ----------------      |
|   JSON, CSV, or         |   Dark & light          |   Full keyboard         |
|   Markdown with         |   mode with             |   navigation in         |
|   custom templates      |   custom themes         |   the web viewer        |
|                         |                         |                         |
+-------------------------+-------------------------+-------------------------+


๐Ÿ”ง How It Works

                         โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
                         โ•‘      CLAUDE CODE SESSION          โ•‘
                         โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                                         โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚                    โ”‚                    โ”‚
                    โ–ผ                    โ–ผ                    โ–ผ
           โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—   โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—   โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
           โ•‘  SessionStart  โ•‘   โ•‘  PostToolUse   โ•‘   โ•‘     Stop       โ•‘
           โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘   โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘   โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘
           โ•‘ Inject context โ•‘   โ•‘ Capture output โ•‘   โ•‘ Generate       โ•‘
           โ•‘ from memory    โ•‘   โ•‘ extract facts  โ•‘   โ•‘ summary        โ•‘
           โ•šโ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•   โ•šโ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•   โ•šโ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•
                   โ”‚                    โ”‚                    โ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                        โ”‚
                         โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
                         โ•‘      WORKER SERVICE         โ•‘
                         โ•‘    http://localhost:37777   โ•‘
                         โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                                        โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                         โ”‚                         โ”‚
              โ–ผ                         โ–ผ                         โ–ผ
     โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—       โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—       โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
     โ•‘    SQLite      โ•‘       โ•‘   ChromaDB     โ•‘       โ•‘  Web Viewer    โ•‘
     โ•‘   Database     โ•‘       โ•‘ Vector Search  โ•‘       โ•‘     UI         โ•‘
     โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘       โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘       โ•‘โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•‘
     โ•‘ Observations   โ•‘       โ•‘ Semantic       โ•‘       โ•‘ Timeline       โ•‘
     โ•‘ Summaries      โ•‘       โ•‘ similarity     โ•‘       โ•‘ Search         โ•‘
     โ•‘ Sessions       โ•‘       โ•‘ matching       โ•‘       โ•‘ Analytics      โ•‘
     โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•       โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•       โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•


โš™๏ธ Configuration

Settings stored in ~/.moltbrain/settings.json:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚             SETTING                  โ”‚ DEFAULT โ”‚        DESCRIPTION         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_WORKER_PORT                โ”‚  37777  โ”‚ Worker service port        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_CONTEXT_OBSERVATIONS       โ”‚   50    โ”‚ Max observations to inject โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_PROVIDER                   โ”‚ claude  โ”‚ AI provider for summaries  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_PRUNE_DAYS                 โ”‚    0    โ”‚ Auto-prune (0 = disabled)  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_THEME                      โ”‚ system  โ”‚ UI theme (dark/light/sys)  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ MOLTBRAIN_LOG_LEVEL                  โ”‚  info   โ”‚ Logging verbosity level    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜


๐Ÿ’ป CLI Commands

moltbrain stats          # Show memory statistics
moltbrain export         # Export to markdown  
moltbrain tag <id> <t>   # Tag an observation
moltbrain prune          # Manual cleanup
moltbrain search <q>     # Search observations


๐Ÿ“ Project Structure

moltbrain/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“Š benchmarks/         Performance tests
โ”œโ”€โ”€ ๐ŸŽจ contrib/            Community modes & themes
โ”œโ”€โ”€ ๐Ÿ“š docs/               Documentation
โ”œโ”€โ”€ ๐Ÿ“– examples/           Usage examples & guides
โ”‚
โ”œโ”€โ”€ ๐Ÿ”Œ extension/
โ”‚   โ”œโ”€โ”€ profiles/          Observation modes
โ”‚   โ”œโ”€โ”€ runtime/           Worker scripts
โ”‚   โ”œโ”€โ”€ themes/            UI themes (dark/light)
โ”‚   โ”œโ”€โ”€ snippets/          Code snippets
โ”‚   โ””โ”€โ”€ templates/         Summary templates
โ”‚
โ”œโ”€โ”€ ๐ŸŒ locales/            i18n (en, es, fr)
โ”œโ”€โ”€ ๐Ÿ—„๏ธ migrations/         Database migrations
โ”œโ”€โ”€ ๐Ÿ“‹ schemas/            JSON validation schemas
โ”œโ”€โ”€ ๐Ÿ› ๏ธ scripts/            Build & utility scripts
โ”‚
โ”œโ”€โ”€ ๐Ÿ’ป src/
โ”‚   โ”œโ”€โ”€ analytics/         Token & session tracking
โ”‚   โ”œโ”€โ”€ cache/             Query & context caching
โ”‚   โ”œโ”€โ”€ core/              Core engine
โ”‚   โ”œโ”€โ”€ export/            JSON/CSV/MD exporters
โ”‚   โ”œโ”€โ”€ favorites/         Bookmark system
โ”‚   โ”œโ”€โ”€ filters/           Date/type/project filters
โ”‚   โ”œโ”€โ”€ formatters/        Output formatters
โ”‚   โ”œโ”€โ”€ mcp/               MCP server for OpenClaw & MoltBook
โ”‚   โ”œโ”€โ”€ shortcuts/         Keyboard shortcuts
โ”‚   โ”œโ”€โ”€ themes/            Theme system
โ”‚   โ””โ”€โ”€ validators/        Input validation
โ”‚
โ”œโ”€โ”€ ๐Ÿฆž integrations/
โ”‚   โ””โ”€โ”€ clawd/             Clawd extension & skill
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ templates/          Export templates
โ”œโ”€โ”€ ๐Ÿงช tests/              Test suites
โ””โ”€โ”€ ๐Ÿ”ง tools/              CLI utilities


๐Ÿ”Œ API

The worker exposes a REST API at http://localhost:37777:

# Health check
curl http://localhost:37777/health

# Search observations
curl "http://localhost:37777/api/search?q=authentication"

# Get timeline
curl "http://localhost:37777/api/timeline?project=my-app&days=7"

# Export data
curl "http://localhost:37777/api/export?format=json" > backup.json

# Get statistics
curl "http://localhost:37777/api/stats"


๐Ÿ—„๏ธ Storage Dapp

Persistent, Postgres-backed storage for agents and apps. Live at app.moltbrain.dev/storage.

+-----------------------------------------------------------------------------+
|                                                                             |
|   BLOB STORAGE      Content-addressed JSON blobs via SHA-256                |
|   ----------         Store and retrieve data by hash. $0.01 per request.   |
|                                                                             |
|   MEMORY SLOTS      Named key-value slots for agent state                  |
|   ----------         Allocate, write, read. Persistent across sessions.    |
|                                                                             |
|   AGENT VAULT       Per-wallet scoping with label badges                   |
|   ----------         Connect the same wallet your agents use.              |
|                      Browse, view, and delete what they stored.            |
|                                                                             |
+-----------------------------------------------------------------------------+

All endpoints are paid via x402 micropayments ($0.01 USDC on Base). Data is scoped per wallet, backed by Postgres, and survives redeploys.

Agents can tag stored data with a label (e.g. "openclaw_session", "virtuals_agent") so the vault shows what stored each item.

# Store a blob
curl -X POST https://app.moltbrain.dev/api/x402/store \
  -H "X-PAYMENT: <x402_header>" \
  -d '{"data": {"key": "value"}, "label": "my_agent"}'

# List your blobs
curl https://app.moltbrain.dev/api/x402/list/blobs \
  -H "X-PAYMENT: <x402_header>"

# Full catalog
curl https://app.moltbrain.dev/api/x402/catalog


๐ŸŽฎ Virtuals Protocol Integration

GAME SDK plugin that gives any Virtuals Protocol AI agent persistent memory and storage via MoltBrain.

npm install @moltbrain/game-plugin
import { GameAgent } from "@virtuals-protocol/game";
import { MoltBrainPlugin } from "@moltbrain/game-plugin";

const moltbrain = new MoltBrainPlugin({
  privateKey: process.env.AGENT_PRIVATE_KEY!, // wallet with USDC on Base
});

const agent = new GameAgent(process.env.GAME_API_KEY!, {
  name: "My Agent",
  goal: "Remember everything across sessions",
  description: "An agent with persistent memory via MoltBrain",
  workers: [moltbrain.getWorker()],
});

await agent.init();
await agent.step({ verbose: true });

9 functions available: moltbrain_chat, moltbrain_search, moltbrain_store, moltbrain_retrieve, moltbrain_allocate_slot, moltbrain_write_slot, moltbrain_read_slot, moltbrain_stats, moltbrain_capacity.

Everything the agent stores shows up in the vault dapp at app.moltbrain.dev/storage. Connect the same wallet to browse it.

See the full plugin repo: github.com/nhevers/Moltbrain-virtuals



๐Ÿฆž OpenClaw Integration

Works with OpenClaw (116k+ stars) - the popular personal AI assistant!

+-----------------------------------------------------------------------------+
|                                                                             |
|   EXTENSION        Add to OpenClaw's extensions/ folder                     |
|   ----------       Full lifecycle hooks integration                         |
|                                                                             |
|   SKILL            Install as an OpenClaw skill                              |
|   ----------       recall_context, search_memories, save_memory tools       |
|                                                                             |
|   MCP SERVER       Protocol-based integration                               |
|   ----------       Works with any MCP-compatible client                     |
|                                                                             |
+-----------------------------------------------------------------------------+

Quick setup:

# As OpenClaw extension
cd ~/.openclaw/extensions
git clone https://github.com/nhevers/moltbrain.git moltbrain
cd moltbrain/integrations/openclaw
npm install && npm run build

# Enable the plugin (required for bundled installations)
pnpm openclaw plugins enable moltbrain

# Or via MCP
npm run mcp:start

Note: If installing as a bundled extension (in OpenClaw's extensions/ directory), you must explicitly enable it: pnpm openclaw plugins enable moltbrain

See integrations/openclaw/README.md for full setup guide.



๐Ÿ“š MoltBook Integration

Works with MoltBook - the social network for AI agents! Share memories, learn from other agents, and build collective knowledge.

Quick setup:

# Install MoltBook MCP integration
npm install --save @moltbrain/moltbook-mcp

# Configure in your MoltBrain settings
{
  "MOLTBRAIN_MOLTBOOK_ENABLED": true,
  "MOLTBRAIN_MOLTBOOK_API_URL": "https://moltbook.com"
}

See integrations/moltbook/README.md for full setup guide.



๐Ÿ’ป Claude Code Integration

Works with Claude Code via the plugin marketplace:

/plugin marketplace add nhevers/moltbrain
/plugin install moltbrain


๐Ÿ“‹ Requirements

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                                      โ•‘
โ•‘   โ€ข  Node.js 18+  or  Bun 1.0+      โ•‘
โ•‘   โ€ข  OpenClaw, MoltBook, or Claude Code โ•‘
โ•‘                                      โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•


๐Ÿ“„ License

AGPL-3.0



โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

Built with care for the OpenClaw, MoltBook & Claude Code community

App โ€ข Storage Dapp โ€ข Virtuals Plugin โ€ข x402 Protocol

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

About

Long-term memory layer for OpenClaw & MoltBook agents that learns and recalls your project context automatically.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors