- The paper introduces a three-stage code-driven pipeline in which an LLM structures intent, generates executable SVG/HTML or simulation code, and an image model adds realistic textures before visual review.
- GenClaw achieves 0.878 on GenEval++, surpasses Mind-Brush at 0.782, reaches 0.989 and 0.988 on English and Chinese LongText-Bench, and improves preservation of unedited regions in ImgEdit with 27.87 PSNR and 0.718 SSIM.
- The approach makes spatial layouts, object counts, text, physical relationships, and editing layers more controllable and diagnosable, but remains limited by frontier-model dependence, code errors, and higher latency.
Motivation and problem statement
GenClaw addresses a structural limitation in current image generation agents: although agentic systems such as Mind-Brush, GenAgent, and commercial platforms increasingly incorporate search, reasoning, and review tools, the final visual synthesis still relies on end-to-end text-to-image generation. The agent's internal information flow is routed through natural language, which is inherently ambiguous for absolute spatial coordinates, exact object counts, typographic layouts, and layer occlusion (z-order) relationships. The authors characterize existing agents as "advanced prompt optimizers" whose only lever is stochastic resampling via prompt rewriting. GenClaw proposes instead that the LLM act as a genuine "brush" by materializing visual intent as executable code, decoupling structure from texture.
The code-as-brush paradigm
The system emulates a three-stage human creative workflow—Conceptualize, Sketch, Color—implemented as three layers:
- Cognitive Structuring Layer: a VLM/LLM performs intent parsing, tool-based knowledge completion (search over long-tail entities, real-time events, geographic facts), and symbolic reasoning (mathematics, physics, geography), emitting JSONL-style structured records that emphasize executability and traceability rather than descriptive richness.
- Executable Canvas Layer: the agent compiles these records into backend-appropriate code. SVG is used for compositional control (object nodes with explicit coordinates, counts, sizes, z-order); HTML/CSS for deterministic text rendering; Python/Canvas/Three.js as lightweight physical or geometric simulators; and SAM 3-based segmentation plus inpainting to build layered representations organized via JSONL for editing.
- Visual Generation and Review Layer: an off-the-shelf image model (e.g., Qwen-Image, Gemini-3.1-Flash-Image) conditions on the rendered sketch to add textures, lighting, materials, and photorealism, followed by VLM-based review. Because intermediate artifacts are inspectable, failures can be attributed to retrieval errors, code-generation errors, or rendering errors—a stratified diagnostic capability absent from black-box pipelines.
Quantitative results
On GenEval++ (2605.30248), GenClaw achieves an overall score of 0.878, exceeding all evaluated baselines including closed-source models (Gemini-3.1 Flash-Image at 0.775, GPT-Image-1.5 at 0.750) and rewrite-based agents (Mind-Brush at 0.782). The largest gains appear precisely where natural-language control fails: Pos/Count at 0.925 versus 0.850 for the next best, Multi-Count at 0.900, and Count at 0.950. The authors argue this gap distinguishes structural sketching from prompt rewriting, since rewrite-based agents cannot lock discrete attributes into the generation process.
| Benchmark |
Metric |
GenClaw |
Best baseline |
| GenEval++ |
Overall |
0.878 |
0.782 (Mind-Brush) |
| LongText-Bench EN |
— |
0.989 |
0.989 (Seedream 4.5) |
| LongText-Bench ZH |
— |
0.988 |
0.987 (Seedream 4.5) |
| ImgEdit |
PSNR (unedited regions) |
27.87 |
22.50 (FLUX.2 Klein 9B) |
| ImgEdit |
SSIM (unedited regions) |
0.718 |
0.695 |
| ImgEdit |
VLM-Score |
4.29 |
4.69 (GPT-Image-1.5) |
| Mind-Bench |
Overall |
0.57 |
0.38 (Nano Banana Pro) |
On LongText-Bench, GenClaw attains 0.989 (EN) and 0.988 (ZH), attributed to deterministic HTML/SVG text rendering rather than pixel-space "guess-writing" of glyphs. On ImgEdit, the layer-wise editing paradigm yields markedly higher preservation of unedited regions (PSNR 27.87, SSIM 0.718)—a direct consequence of isolating edits to target layers—although its VLM-Score of 4.29 trails GPT-Image-1.5's 4.69, indicating a trade-off between instruction execution strength and non-target consistency. On Mind-Bench, GenClaw reaches 0.57 overall versus 0.38 for Nano Banana Pro and 0.31 for Mind-Brush, with particularly strong reasoning-driven sub-scores (Poem 0.90, SL 0.78); the authors attribute part of this gain to multi-round search with reference filtering, compared to Mind-Brush's single-pass search.
A distinctive contribution is the use of code canvases as executable simplified world models. For mirror-reflection, spring deformation, pressure, and buoyancy tasks, the agent first constructs a deterministic geometric/physical simulation (e.g., Three.js scene with explicit light source and object placement), then hands the resulting "physical draft" to the image model for naturalized rendering. This converts implicit physical relations into inspectable visual constraints before pixel synthesis, addressing a documented failure mode of direct generators on compound physical laws.
Limitations
The paper concedes three substantive constraints. First, dependency on frontier generators: open-source conditional models frequently fail to convert abstract SVG/HTML sketches into photorealistic images, producing artifacts or retaining flat vector styling; the reported results therefore depend on Gemini-3.1-Flash-Image, and the paradigm's feasibility with weaker decoders remains unvalidated. Second, efficiency overhead: the multi-step pipeline incurs significant latency and is redundant for simple tasks relative to one-shot generation, and gains may diminish as base models improve natively—an acknowledged risk to the approach's long-term marginal value. Third, code-generation instability: LLM-produced code can contain coordinate errors, incorrect z-order, or mis-scaled elements, which propagate directly into sketches and final images. Additionally, the image decomposition mechanism is described as rudimentary, and the strong ImgEdit consistency numbers come at some cost in holistic edit quality.
Conclusion
GenClaw reframes image generation from one-shot black-box synthesis into a staged, traceable pipeline in which the LLM handles logic and structure through executable visual code while the image model specializes in texture and realism. The empirical evidence—particularly the GenEval++ and Mind-Bench margins over both closed-source models and rewrite-based agents, and the unedited-region preservation on ImgEdit—supports the claim that explicit intermediate structure improves controllability. The approach's reliance on frontier conditional generators, its latency cost, and the fragility of LLM-generated layout code remain open questions for making the paradigm robust beyond preliminary demonstration.