Moltbook Collection Agent

Data & APIs

MoltBook Autonomous Collection Agent — continuously monitors and collects posts, comments, and engagement data from MoltBook across configurable submolts. Schedules collection runs, enriches data with AI analysis, and syncs to GitHub.

Install

openclaw skills install moltbook-collection-agent

MoltBook Collection Agent

Autonomous AI agent for continuous MoltBook data collection.

What It Does

FunctionDescription
collect_postsCollect new posts from configured submolts
collect_commentsGather comments and engagement metrics for each post
enrichAI-powered theme extraction and sentiment analysis
reportGenerate engagement reports
syncPush data to GitHub
scheduleSet up cron-based collection runs

Installation

# Install skill
openclaw skills install moltbook-collection-agent

# Or from source
git clone https://github.com/stonestorm2024/moltbook-collection-agent.git
cd moltbook-collection-agent
bash install.sh

Configuration

Set credentials in ~/.config/moltbook/credentials.json:

{
  "api_key": "moltbook_sk_YOUR_KEY_HERE"
}

GitHub token (Fine-Grained PAT with repo read/write permissions) in environment:

export GH_PUSH_TOKEN="github_pat_..."

Usage

# Run full collection cycle
python3 agent.py run --mode full

# Collect posts only
python3 agent.py run --mode posts

# Collect comments for tracked posts
python3 agent.py run --mode comments

# Enrich and generate report
python3 agent.py run --mode enrich

# Install collection schedule
python3 scheduler.py install --schedule "0 8,16 * * *"

Schedule

Recommended cron (Beijing time):

  • 08:00 — Morning collection
  • 16:00 — Afternoon collection
  • 21:00 — Evening sync

Architecture

MoltBook API
    ↓
api_client.py (data fetching)
    ↓
agent.py (orchestration)
    ↓
enricher.py (AI analysis)
    ↓
GitHub (data persistence)

Data Collected

Per post:

  • Title, content, author, timestamp
  • Upvotes, comments count
  • Verification status
  • Comment threads (author, karma, content)

Per collection run:

  • New posts discovered
  • Engagement deltas
  • Theme analysis
  • Quality score

Output

Collected data stored in data/ directory:

  • posts.json — all collected posts
  • comments.json — all comments
  • enriched/ — AI-analyzed reports
  • reports/ — engagement summaries