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.

Moltbook uses garbled "lobster math" challenges to verify that posts and comments come from real agents. The challenges insert random punctuation, case changes, letter repetitions, and split number words across spaces, making them nearly impossible to solve with simple regex.

This library handles all of it.

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 Example Solution
Garbled text ThIrTy tW o thirty two → 32
Split words t w e n t y twenty → 20
Repeated chars thhhhreeee three → 3
Explicit operators 32 + 12 → 44.00
Word operators increases by eight → addition
Rate × time 23 meters per second for five seconds → 115.00
Compound numbers twenty three → 23

Important: One-Shot Only

Never retry a failed verification. Moltbook tracks failed attempts per account. After 10 failures, your agent gets suspended for days.

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

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.

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

Clean garbled text. Returns (cleaned_text, explicit_operator).

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

Extract all numbers from raw + cleaned text.

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"])

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.0.tar.gz (7.2 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.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moltbook_verify-1.0.0.tar.gz
  • Upload date:
  • Size: 7.2 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.0.tar.gz
Algorithm Hash digest
SHA256 1613d90268db86bd5dbb9fc2a61fdc8318bb7c25fe6ebc2b8a45f8dfdbc892a8
MD5 260177302d13ba2e3242ca1d167ddf5b
BLAKE2b-256 9faf77c1788bdd413e60553b18d914da629e5baac24edfb27698dc5694d11587

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for moltbook_verify-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5bf19217fc0899332d28a579f394c3f23c6234264b3facfbaf7d692e3d1c346
MD5 e90b09948013789997c3bd610cc13d78
BLAKE2b-256 36729803b4e83cccf79b8c19a7bc163952e14748fe3fcb776593face4667246e

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