Skip to main content

Verification challenge solver for Moltbook.com — degarbles lobster math and auto-verifies agent posts

Project description

moltbook-verify

Verification challenge solver for Moltbook.com — the social platform for AI agents.

Why This Exists

Moltbook uses garbled "lobster math" challenges to verify posts and comments. The challenges look like this:

A] lO-bS tErS^ cLaW ]fOrCe| iN~ wAtEr, tHe^ lObStEr muLtIpLiEs dOmInAnCe um,
tHe fIrSt cLaW iS tWeNtY tHrEe NeWtOnS aNd ThE sEcOnD cLaW iS fIvE nEwToNs

This doesn't stop humans. Any person can read through the garbling and solve "23 times 5 = 115" in seconds.

It stops smaller LLMs and open-source bots. A 3B parameter model running locally — the kind most OpenClaw agents use — chokes on this. The random punctuation, case alternation, repeated characters, and split number words break tokenization. The model sees noise where a human sees "twenty three." Simple regex fails because the numbers are spelled out as garbled words, not digits. Even capable 7B models get tripped up when "multiplies" arrives as muLtIpLiEs split across fragments.

The result: agents running smaller open-source models get their posts stuck in "pending" limbo, or worse, submit wrong answers and get suspended. After 10 failed verifications, Moltbook suspends your agent for days.

This library is the degarbler. It handles the text cleaning, number extraction, operation detection, and answer formatting so any agent — regardless of what LLM it runs — can pass verification.

Install

pip install moltbook-verify

Quick Start

from moltbook_verify import solve_challenge, verify_content

# Solve a raw challenge string
answer = solve_challenge(
    "A] Lo^bSt-Er ClAw| F oRcE Is ThIrTy tW o NeW ToNs Um AnD InCrEaSeS By TwElVe"
)
print(answer)  # "44.00"

# Full verification flow after posting
import requests

API = "https://www.moltbook.com/api/v1"
API_KEY = "moltbook_sk_your_key_here"

# Post a comment
resp = requests.post(
    f"{API}/posts/{post_id}/comments",
    headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
    json={"content": "Great post!"},
)
data = resp.json()

# Auto-verify if challenge returned
verification = data.get("comment", {}).get("verification", {})
if verification:
    success = verify_content(API_KEY, verification)
    print("Verified!" if success else "Failed — do NOT retry")

What It Handles

Challenge Type Raw Input What the Solver Sees
Garbled text ThIrTy tW o thirty two → 32
Split words t w e n t y twenty → 20
Repeated chars thhhhreeee three → 3
Random punctuation Lo^bSt-Er lobster
Explicit operators 32 + 12 addition → 44.00
Word operators muLtIpLiEs By multiplication
Rate x time 23 meters per second for five seconds 23 * 5 → 115.00
Compound numbers twenty three 23
Subtraction keywords loses fifteen newtons subtraction

The Degarbling Pipeline

  1. Detect explicit operators — scan raw text for +, *, /, - between digits
  2. Strip punctuation — remove all non-alphanumeric characters
  3. Collapse repeatsthhhhreeeethree
  4. Word corrections — dictionary of 40+ common garble patterns (threthree, fvefive)
  5. Rejoin fragments — reassemble number words split across spaces (thi rtythirty)
  6. Extract numbers — both digit literals and spelled-out number words, including compounds (twenty three → 23)
  7. Detect operation — keyword matching for add/subtract/multiply/divide, rate*time patterns
  8. Format answer — always "X.XX" with two decimal places

Important: One-Shot Only

Never retry a failed verification. Moltbook tracks failed attempts per account. After 10 failures, your agent gets suspended for days. We've seen week-long suspensions from this.

verify_content() makes exactly one attempt. If it fails, it returns False and stops. This is by design.

If solve_challenge() returns None (can't parse the challenge), it's better to leave the post in pending than to guess and burn a strike.

API Reference

solve_challenge(challenge: str) -> str | None

Solve a garbled challenge. Returns answer as "X.XX" string or None if unsolvable.

verify_content(api_key, verification, api_url=...) -> bool

Submit a solved challenge to Moltbook. Returns True if verified, False otherwise. One-shot — never retries.

degarble(challenge: str) -> tuple[str, str | None]

Clean garbled text. Returns (cleaned_text, explicit_operator). The operator is one of 'add', 'subtract', 'multiply', 'divide', or None.

extract_numbers(challenge, cleaned) -> list[float]

Extract all numbers from both raw text (digits) and cleaned text (number words).

Integration with Grazer SDK

If you use grazer-skill for multi-platform posting, moltbook-verify handles the verification step that Grazer's Moltbook adapter needs:

from grazer import post_to_moltbook
from moltbook_verify import verify_content

result = post_to_moltbook(content, submolt="general")
if result.get("verification"):
    verify_content(api_key, result["verification"])

Success Rate

In production testing across 120+ comments with 5 agents, the solver achieves approximately 70% verification success. The remaining 30% are edge cases where:

  • The garbling destroys number words beyond recognition
  • Unusual operation keywords aren't in the detection list
  • The challenge uses patterns not yet covered (e.g., division expressed as "shared among")

We're continuously adding corrections as new garble patterns emerge. PRs welcome.

License

MIT — Elyan Labs 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moltbook_verify-1.0.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moltbook_verify-1.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file moltbook_verify-1.0.2.tar.gz.

File metadata

  • Download URL: moltbook_verify-1.0.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for moltbook_verify-1.0.2.tar.gz
Algorithm Hash digest
SHA256 40e95ca7bb3b960108f79529a239195bd9663a4d0b92bb01fee3fb9a022b4ec3
MD5 1104d7fe7e265a6c53b4a1ec2be57906
BLAKE2b-256 3a5b061efc65b19d56a1217c66d6436a86f7676ba0fbbc513c7b88154c34d047

See more details on using hashes here.

File details

Details for the file moltbook_verify-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for moltbook_verify-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b81c0a80ae044bbed0c25577c9b74efa1aba34200087e5860f2eb2f6f9b50f1
MD5 228e433801b3088e7ed377c7fd443731
BLAKE2b-256 9039f03adf4fa95fb511b7600981f9157a8055854531a9abf9898945dc7e89fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page