StructSVG: Tree-Graph Guided Multi-Agent Text-to-SVG Generation
Abstract
Scalable Vector Graphics (SVG) is a resolution-independent and fully editable graphic format widely adopted in UI design, art, and web development. Inherently a hierarchical semantic structure, SVG organizes geometric primitives in a document tree where element hierarchy and drawing order directly determine both visual appearance and editability. However, most of the existing text-to-SVG methods either treat SVG as flat token sequences lacking structural awareness, or rely on optimization-based differentiable rasterization with prohibitive computational costs, resulting in outputs that lack meaningful semantic hierarchy and editable structure. Inspired by the rapid advancement of Large Language Models (LLMs) and agent-based frameworks, which have demonstrated strong capabilities in structured reasoning and multi-step planning, we propose StructSVG, a training-free, structure-aware multi-agent framework for text-to-SVG generation. StructSVG constructs an explicit Tree-Graph intermediate representation: the semantic tree hierarchically decomposes the prompt into editable visual components with semantic identifiers and spatial information, while the topology graph models inter-element rendering order and spatial relationships, providing a structured blueprint for LLM-driven generation and refinement. Five specialized agents collaborate across three stages to perform structured planning, component drafting, and refinement and selection. Extensive experiments demonstrate the effectiveness of our approach, and we showcase diverse applications highlighting its generality and practical utility. Code and data for this paper are at https://github.com/sealost/StructSVG.