# Next AI Draw — AI-Powered Diagramming with Draw.io Integration > A Next.js web application that combines AI capabilities with draw.io diagrams, letting you create and modify diagrams through natural language commands. ## Install Save as a script file and run: # Next AI Draw — AI-Powered Diagramming with Draw.io Integration ## Quick Use ```bash git clone https://github.com/DayuanJiang/next-ai-draw-io.git cd next-ai-draw-io npm install && npm run dev ``` ## Introduction Next AI Draw integrates AI language models with the draw.io diagramming engine, allowing developers to create, modify, and enhance diagrams through natural language. Instead of manually dragging shapes and drawing connections, you describe what you want and the AI generates or updates the diagram accordingly. ## What Next AI Draw Does - Generates draw.io diagrams from natural language descriptions - Modifies existing diagrams through conversational commands - Supports flowcharts, sequence diagrams, architecture diagrams, and more - Renders diagrams in a full draw.io editor for manual fine-tuning - Exports diagrams in standard draw.io XML, PNG, and SVG formats ## Architecture Overview The application is built on Next.js with the draw.io embed as the rendering engine. User prompts are sent to a configurable LLM backend, which generates or modifies the draw.io XML. The XML is then loaded into the embedded editor for interactive editing and export. ## Self-Hosting & Configuration - Clone the repository and install dependencies with npm - Set your LLM API key in the environment configuration - Supports OpenAI-compatible and other major LLM providers - Run the dev server locally or deploy to any Next.js hosting platform - Customize diagram templates and default styles via configuration files ## Key Features - Natural language to diagram conversion with AI assistance - Full draw.io editor integration for manual adjustments - Multi-format export including XML, PNG, and SVG - Support for multiple LLM providers through configurable backends - Real-time preview as you describe changes ## Comparison with Similar Tools - **Mermaid** — text-based diagram syntax rendered as images; Next AI Draw uses natural language and provides a full visual editor - **D2** — declarative diagram scripting language; Next AI Draw adds AI-powered generation on top of draw.io - **Excalidraw** — whiteboard-style drawing; Next AI Draw focuses on structured diagrams with AI generation - **tldraw** — infinite canvas SDK; Next AI Draw is purpose-built for AI-assisted diagram creation ## FAQ **Q: Which LLM providers are supported?** A: It supports OpenAI-compatible APIs and can be configured for other providers that follow similar interfaces. **Q: Can I edit AI-generated diagrams manually?** A: Yes, all generated diagrams open in a full draw.io editor where you can make manual adjustments. **Q: Is it self-hostable?** A: Yes, it runs as a standard Next.js application that can be deployed anywhere. **Q: What diagram types does it support?** A: Flowcharts, sequence diagrams, architecture diagrams, ER diagrams, and any type supported by draw.io. ## Sources - https://github.com/DayuanJiang/next-ai-draw-io --- Source: https://tokrepo.com/en/workflows/asset-e63317a9 Author: Script Depot