yejy53/GenClaw
GenClaw: Code-Driven Agentic Image Generation
What it solves
GenClaw addresses the limitations of one-shot image generation, where users often struggle with precise spatial layouts, specific object counts, and accurate text rendering. Instead of relying solely on prompt engineering, it introduces a way to use code as a controllable visual canvas to ensure the final image matches the user's intent.
How it works
The system operates as an agentic loop that follows a "think, sketch with code, then render" workflow. A planner LLM uses a set of tools to create a visual draft before calling an image generation model for the final result.
- Perception: A sub-LLM writes "painter notes" to guide the planning.
- Planning: The planner creates a
todo_writeplan and selects a tool pipeline. - Drafting: The agent uses tools like
code_scene_draft(SVG) orcode_text_draft(HTML/CSS) to create an explicit, editable layout. - Rendering: The draft is passed to image-to-image (
i2i) or text-to-image (t2i) models for final synthesis.
Who it’s for
It is designed for creators and developers who need high-precision control over image composition, such as those designing posters with specific text or complex scenes with exact object placements.
Highlights
- Code as a Visual Brush: Uses SVG, HTML/CSS, and Python to turn spatial layout and text rendering into verifiable and debuggable programs.
- Human-like Creative Loop: Mirrors the process of conceptualizing, sketching, coloring, and refining, making every stage transparent and editable.
- Agentic Harness: Integrates LLM planning, tool-use, and reflection directly into the image synthesis process.
- Knowledge-Grounded: Includes search tools (via Tavily) and multimodal reasoning to ground image generation in real-world knowledge.
Related
- Project
- Dispatch
- Project
- Project
- Project