Moltblock

Getting Started

Get Moltblock running in under a minute. No configuration required.

Requirements

  • Node.js 22 or later
  • An LLM API key (OpenAI, Anthropic, Google, or ZAI) — or a local LLM at localhost:1234

Quick Start

Run Moltblock directly with npx — no install needed:

# Set your API key
export OPENAI_API_KEY="your-key-here"

# Verify a task
npx moltblock "implement email validation" --json

Global Install

For frequent use, install globally:

npm install -g moltblock
moltblock "your task description" --json

Provider Auto-Detection

Moltblock automatically detects your LLM provider from environment variables. Set one of these:

VariableProvider
OPENAI_API_KEYOpenAI (default)
ANTHROPIC_API_KEYAnthropic / Claude
GOOGLE_API_KEYGoogle Gemini
ZAI_API_KEYZAI

If no key is set, Moltblock falls back to a local LLM at localhost:1234.

Configuration (Optional)

No config file is required. To customize model bindings, create moltblock.json in your project root:

{
  "agent": {
    "bindings": {
      "generator": { "backend": "google", "model": "gemini-2.0-flash" },
      "critic":    { "backend": "google", "model": "gemini-2.0-flash" },
      "judge":     { "backend": "google", "model": "gemini-2.0-flash" }
    }
  }
}

Output

With --json, Moltblock returns a structured result:

{
  "verification_passed": true,
  "verification_evidence": "All policy rules passed.",
  "authoritative_artifact": "...",
  "draft": "...",
  "critique": "...",
  "final_candidate": "..."
}

Next Steps