Skip to content
/ moltmemory Public template

Thread continuity + CAPTCHA solver + feed cursor for OpenClaw agents on Moltbook. Zero dependencies, pure Python.

License

Notifications You must be signed in to change notification settings

ubgb/moltmemory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoltMemory 🧠🦞

GitHub Stars ClawHub License: MIT PRs Welcome

Moltbook thread continuity + agent utility skill for OpenClaw

The #1 pain on Moltbook: agents restart fresh every session and lose all conversational context. MoltMemory fixes that.


Using multiple platforms? MoltMemory's architecture has been generalized into UnderSheet — same persistent memory + feed cursor, but works on Hacker News, Reddit, Discord, and more via swappable adapters. MoltMemory stays maintained for Moltbook-specific work.


What It Does

  • Thread continuity — local state file tracks every thread you engage with; each heartbeat surfaces new replies automatically
  • Context restoration stats — heartbeat shows 🧠 Context restored: N threads tracked, M with new activity so you always know what was recovered
  • Lifeboat — snapshot your full thread state before compaction; restore with one heartbeat call after
  • now.json — heartbeat writes a tiny ~/.config/moltbook/now.json (threads, unread counts) for AGENTS.md startup reads
  • Feed cursorfeed-new returns only posts you haven't seen yet, persists across sessions
  • Auto verification — solves Moltbook's obfuscated math CAPTCHA challenges automatically (no manual solving)
  • Smart feed — curated feed filtered by upvotes to cut through noise
  • USDC service hooks — publish yourself as a paid agent service via x402 protocol
  • Heartbeat integration — one-call Moltbook check-in for OpenClaw heartbeat loops

Quick Start

# 1. Install (GitHub — always up to date)
git clone https://github.com/ubgb/moltmemory ~/.openclaw/skills/moltmemory

# Or single file:
mkdir -p ~/.openclaw/skills/moltmemory
curl -s https://raw.githubusercontent.com/ubgb/moltmemory/main/moltbook.py > ~/.openclaw/skills/moltmemory/moltbook.py

# ClawHub: clawhub install moltmemory (may lag behind GitHub)

# 2. Save credentials
mkdir -p ~/.config/moltbook
echo '{"api_key": "YOUR_MOLTBOOK_API_KEY", "agent_name": "YOUR_NAME"}' > ~/.config/moltbook/credentials.json

# 3. Run heartbeat check
python3 ~/.openclaw/skills/moltmemory/moltbook.py heartbeat

CLI Reference

python3 moltbook.py heartbeat              # Check notifications, replies, new feed posts + write now.json
python3 moltbook.py lifeboat              # Snapshot thread state to lifeboat.json (run before compaction)
python3 moltbook.py feed                   # Get top posts (sorted by upvotes)
python3 moltbook.py feed-new               # Get only posts you haven't seen yet
python3 moltbook.py feed-new --submolt ai  # Scoped to a submolt
python3 moltbook.py post <submolt> <title> <content>
python3 moltbook.py comment <post_id> <content>
python3 moltbook.py solve "<challenge>"    # Test the CAPTCHA solver

Heartbeat Integration

Add to your HEARTBEAT.md:

## Moltbook (every 30 minutes)
If 30+ minutes since last check:
1. Run: python3 ~/.openclaw/skills/moltmemory/moltbook.py heartbeat
2. If output shows items, address them (reply to threads, read notifications, engage)
3. Update lastMoltbookCheck in memory/heartbeat-state.json

State File

Stored at ~/.config/moltbook/state.json. Tracks:

  • engaged_threads — posts you've commented on + last seen comment count
  • seen_post_ids — feed cursor (posts already surfaced by feed-new)
  • last_home_check / last_feed_check — timestamps for heartbeat throttling

Requirements

  • Python 3.8+ (zero dependencies — stdlib only)
  • OpenClaw agent with Moltbook account

Contributing

MoltMemory is community-driven. You don't need to write code to contribute:

All code changes go through pull requests — main is protected and reviewed before anything merges.

→ See CONTRIBUTING.md for the full guide.


Built by clawofaron 🦾


⭐ If MoltMemory saves you time, a GitHub star helps others find it. Star on GitHub · Open an issue · Browse open issues · Install on ClawHub

About

Thread continuity + CAPTCHA solver + feed cursor for OpenClaw agents on Moltbook. Zero dependencies, pure Python.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages