GenClaw  by yejy53

Agentic image generation via code-driven visual sketching

Created 1 month ago
282 stars

Top 92.3% on SourcePulse

GitHubView on GitHub
Project Summary

GenClaw introduces a novel approach to agentic image generation by leveraging code as a controllable visual canvas. Instead of solely relying on prompt manipulation, agents write executable sketches (SVG, HTML/CSS, Python, 3D) to define visual elements, spatial layouts, and text, enabling a more explicit, debuggable, and iterative image synthesis process. This method targets researchers and power users seeking greater control and transparency in AI-driven image creation, shifting the paradigm from black-box diffusion to a reasoning-friendly, collaborative workflow.

How It Works

The core innovation lies in treating code as a "visual brush." Agents generate executable sketches that precisely define scene composition, object placement, and text rendering, turning abstract concepts into verifiable programs. This explicit representation allows for debugging and incremental refinement, mirroring a human artist's conceptualize-sketch-color-refine loop. By integrating an LLM agent's planning and tool-use capabilities directly into image synthesis, GenClaw transforms image creation into a first-class agent capability, facilitating iterative collaboration rather than one-shot inference.

Quick Start & Requirements

Installation involves cloning the repository and setting up a Python environment using venv (pip install -e .) or conda (conda env create -f environment.yml). A headless browser is required; install via playwright install chromium (and playwright install-deps on Linux). Configuration necessitates an OpenAI-compatible gateway endpoint and API key, along with model names for the planner and image generation, and a Tavily API key for search tasks. The Web UI can be launched with chainlit run src/cc_genclaw/ui/chainlit_app.py -w.

Highlighted Details

  • Code as Visual Canvas: Utilizes SVG, HTML/CSS, Python, and lightweight 3D code for detailed visual sketching.
  • Human-Centric Workflow: Mimics the human creative process with transparent, inspectable, and editable stages from ideation to refinement.
  • Agentic Tool Integration: Employs an LLM agent harness with tools for text-to-image (t2i), image-to-image (i2i), scene drafting (SVG), text rendering, web/image search, and multimodal reasoning.
  • Iterative Generation: Supports incremental rendering and collaboration, allowing users to intervene and modify artifacts at various stages.

Maintenance & Community

The project was recently released (May/June 2026) with a technical report and project page. Links to community channels like Discord or Slack, or a public roadmap, are not explicitly provided in the README.

Licensing & Compatibility

GenClaw is released under the MIT License. This permissive license allows for broad compatibility, including commercial use and integration within closed-source projects without significant restrictions.

Limitations & Caveats

As a recently released research exploration, GenClaw is likely to be under active development. It requires significant configuration, including API keys for external services (OpenAI-compatible gateway, Tavily), and relies on multiple LLM and image generation models. The "exploratory" nature suggests potential for evolving APIs and features.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
1
Star History
55 stars in the last 30 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of "Artificial Intelligence: A Modern Approach"; Research Director at Google).

NanoBananaEditor by markfulton

0%
694
Advanced AI image generation and editing platform
Created 10 months ago
Updated 2 months ago
Feedback? Help us improve.