Read-only observability; leak, injection, and behavior analysis over collected data; no writes to the network. Local-first analysis and static dashboard.
Python 3.10+
| Concept | Description |
|---|---|
| Read-only collector | Fetches posts, feed, submolts, comments via watchdog agent; rate-limited (90 req/min) |
| Leak/injection/behavior analyzers | Detects credential patterns, prompt-injection content, and agent behavior drift |
| Static dashboard | HTML dashboard with tables and graphs; no server required |
| Local-first | Analysis runs locally over SQLite; data stored locally after fetch |
- Problem: Moltbook agent networks generate content that may leak credentials, exhibit injection patterns, or drift from expected behavior. Manual review doesn't scale; active probes would contaminate the network.
- Solution: Read-only watchdog agent collects posts, feed, submolts, and comments from the Moltbook API. Analyzers (leak, injection, behavior, linguistic) run locally over stored data. Static dashboard and daily reports surface findings without ever posting to the network.
- Impact: Detects credential leaks and injection patterns before they spread; grounded-ratio and linguistic monitors surface drift; all analysis is local and read-only.
flowchart LR
subgraph external [Moltbook API]
API[GET posts, feed, submolts, comments]
end
subgraph watchtower [Watchtower]
Collector[run_collector.py]
Analyzers[run_analyzers.py]
Dashboard[generate_dashboard_html.py]
Report[report_summary.py]
Collector --> Analyzers
Analyzers --> Dashboard
Analyzers --> Report
end
API -->|Read-only| Collector
Collector -->|SQLite| Analyzers
- Read-only collector — Fetches posts, feed, submolts, comments via watchdog agent; rate-limited (90 req/min)
- Leak analyzer — Detects credential patterns (API keys, passwords, tokens)
- Injection analyzer — Detects prompt-injection–style content
- Behavior analyzer — Tracks agent behavior patterns
- Linguistic analyzer — Monitors grounded ratios and language drift
- Static dashboard — HTML dashboard with tables and graphs (no server)
- Daily reports — Optional markdown summaries for cron
- Optional alerting — Signal, Slack, or email on critical findings
Python 3.10+, requests, python-dotenv, SQLite.
Collector fetches from the Moltbook API; analysis runs locally over SQLite. Dashboard is static HTML. Data is stored locally after fetch. Aligns with local-first principles. Community: LoFi, Local-First News.
AI security: When using AI (e.g. for analysis or automation), see D:\local-first\AI_SECURITY.md for MVP checklist.
git clone <your-fork-url> # Replace with your fork URL or the upstream repo if public
cd moltbook-watchtower
cp .env.example .env
# Edit .env: set MOLTBOOK_API_KEY (register watchdog at https://www.moltbook.com/skill.md)
pip install -r requirements.txt
# Collect from live API
python scripts/run_collector.py
# Run analyzers
python scripts/run_analyzers.py
# Generate dashboard
python scripts/generate_dashboard_html.py
# Open exports/dashboard.html in browserSee docs/SETUP.md for API key registration and full go-live steps.
- Setup and go live
- Security — API key handling, storage, logging
- Runbooks — Daily cron, API failure, rate limit, add analyzer, Signal alerting
- Moltbook API audit
Same command as CI (.github/workflows/tests.yml):
pip install -r requirements.txt
python -m playwright install chromium # once per machine; CI does this automatically
python -m pytest tests/ -v --tb=short(pytest tests/ -v is equivalent if pytest is on your PATH.)
Dashboard GUI smoke only: python -m pytest tests/e2e/ -m e2e -v (see docs/audit/gui-2026-03-26.md).
Unit, integration, and Playwright e2e tests (59 total including one browser smoke test).
MIT (see LICENSE).
Built by a programmer who ships. See portfolio-harness/docs/AUTHOR.md if viewing from sibling workspace.