How Clawdbot’s New Three‑Layer Dynamic Memory Turns a Static AI into a Self‑Updating Assistant
Clawdbot (now Moltbot) upgrades its memory from a static file‑based store to a three‑layer dynamic knowledge graph that automatically extracts facts, aggregates weekly summaries, and preserves history, enabling the AI to stay current with a user’s life without manual edits.
Background and Motivation
Clawdbot reached 100k users and became so popular that it was forced to rename itself Moltbot. While most AI assistants forget past interactions, the original Clawdbot retained memory but only as a static, manually maintained store. This static nature caused inconsistencies when a user’s life changed (e.g., a former boss was still remembered as a current manager).
Three‑Layer Dynamic Memory Architecture
The upgrade introduces a three‑layer system that transforms flat files into a living knowledge graph.
Automatic Fact Extraction : Every ~30 minutes a cheap sub‑agent scans recent conversations and stores persistent facts (cost a few cents per day).
Entity‑Based Storage : Facts are stored per entity (people, companies, projects) instead of a single monolithic file.
Weekly Consolidation : A Sunday cron rewrites summaries, removes outdated context, and marks superseded facts as historical.
Replace‑instead‑Delete : When a fact changes, the old record is marked as superseded, preserving a full history.
The result is a self‑updating understanding of the user, with context always fresh and no manual editing required.
Layer 1 – Knowledge Graph (/life/areas/)
Each meaningful entity gets its own folder. Example structure:
/life/areas/
├── people/
│ ├── sarah/ # former boss
│ │ ├── summary.md
│ │ └── items.json
│ ├── maria/ # business partner
│ └── emma/ # family member
├── companies/
│ ├── acme-corp/ # previous employer
│ ├── newco/ # current employer
│ └── skynet/ # avoid giving cron permissionsFacts are stored as atomic JSON objects (items.json) with timestamps:
{
"id": "sarah-003",
"fact": "difficult manager, micromanages",
"timestamp": "2025-06-15",
"status": "active"
}When reality changes, the old fact is superseded rather than deleted:
{
"id": "sarah-003",
"status": "superseded",
"supersededBy": "sarah-007"
},
{
"id": "sarah-007",
"fact": "no longer working together – left Acme Corp",
"timestamp": "2026-01-15",
"status": "active"
}This preserves a complete evolution of relationships over time.
Layer 2 – Daily Notes (memory/YYYY‑MM‑DD.md)
Raw chronological logs are written each day. Example:
# 2026-01-27
- 10:30am: shopping
- 2:00pm: doctor check‑up
- Decision: use emoji categories for calendar eventsThese "when" records are continuously appended; later, the fact extractor pulls relevant items into Layer 1.
Layer 3 – Implicit Knowledge (MEMORY.md)
Aggregated preferences, work style, and lessons learned are stored here:
## My Work Style
- Sprint‑type worker – high intensity bursts, then rest
- Contact preference: phone > SMS > email
- Early riser, prefers short messages
## Lessons Learned
- Don't create cron jobs for one‑off remindersThese are not world facts but personal facts that the assistant uses to tailor responses.
Compounding Benefits (Flywheel Effect)
Each conversation triggers cheap fact extraction, which grows the knowledge graph; weekly consolidation produces a clean snapshot; the next conversation benefits from richer context, leading to better replies and more dialogue—a self‑reinforcing loop.
Week 1: basic preferences
Month 1: daily habits and key people
6 months: projects, milestones, relationships
1 year: a model richer than most people's understanding of their own lives
All data remains human‑readable, searchable, and continuously updated.
Why This Beats Alternatives
Vector DB / RAG – black‑box, you cannot inspect what the AI knows.
Monolithic context file – not scalable, becomes stale, expensive to load.
Base Clawdbot – solid foundation but static.
Three‑layer Clawdbot – readable files, automatic maintenance, compounding intelligence.
Implementation Guide
1. Create Folder Structure
mkdir -p ~/life/areas/people
mkdir -p ~/life/areas/companies
mkdir -p ~/clawd/memory2. Add to AGENTS.md
## Memory – Three Layers
### Layer 1: Knowledge Graph (`/life/areas/`)
- `people/` – person entities
- `companies/` – company entities
Retrieval hierarchy:
1. summary.md — quick context
2. items.json — atomic facts
Rules:
- Save facts immediately to items.json
- Weekly rewrite summary.md from active facts
- Never delete – replace with superseded version3. Add to HEARTBEAT.md
## Fact Extraction
On each heartbeat:
1. Check new conversations
2. Run cheap sub‑agent to extract persistent facts
3. Write to relevant entity items.json
4. Record lastExtractedTimestamp
Focus: relationships, status changes, milestones
Skip: idle chat, temporary info4. Weekly Consolidation Cron (Sunday)
## Weekly Memory Review
For each entity with new facts:
1. Load summary.md
2. Load active items.json
3. Rewrite summary.md for current state
4. Mark contradictory facts as superseded5. Atomic Fact Schema
{
"id": "entity-001",
"fact": "actual fact",
"category": "relationship|milestone|status|preference",
"timestamp": "YYYY-MM-DD",
"source": "conversation",
"status": "active|superseded",
"supersededBy": "entity-002"
}Supermemory Integration
Clawdbot’s reliance on external tools for memory caused failures because the model was not trained to invoke them reliably. Integrating Supermemory provides:
24/7 automatic recall
Manual search, forget, and fetch commands
Convenient /remember and /recall commands
Installation link (kept as a technical reference): https://supermemory.ai/docs/integrations/clawdbot
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
