drawio-ai-kit

Teach your AI to draw correct, beautiful draw.io diagrams — declarative layout engine, ground-truth stencils, structural validator, vision self-check. AWS · Azu

What is drawio-ai-kit?

Teach your AI to draw correct, beautiful draw.io diagrams — declarative layout engine, ground-truth stencils, structural validator, vision self-check. AWS · Azure · GCP · Databricks · BPMN. Zero dependencies.

Overview of drawio-ai-kit

What it is

An orchestration and validation framework enabling AI agents to generate structurally precise and aesthetically standardized draw.io diagrams, optimized for AWS, Azure & GCP architectures. It mitigates common AI agent hallucinations using three key components: a Declarative Catalog, Design Principles, and a Structural Validator. Exposed via the self-contained drawio-ai CLI (one bundled file, nothing extra to install). The package has zero runtime dependencies.

Key features

  • Declarative Catalog — a single source of truth mapping draw.io stencil IDs to their respective taxonomies and canonical color palettes.
  • Design Principles — codified architectural and layout rules (in skills/drawio/references/principles.md).
  • Structural Validator — a static analysis engine that audits diagram XML to guarantee stencil references are valid and design principles are satisfied.
  • Vision self-check — optional, enabled by the draw.io desktop app (drawio-ai render).
  • Declarative layout engine — supports topology types: pipeline, hierarchy, network, hubspoke, hybrid, mesh, sequence.
  • Icon search with typo tolerance and aliases (e.g., k8s, pg, es).

Use cases

  • Generating structurally precise and aesthetically standardized draw.io diagrams for AWS, Azure, GCP, Databricks, and BPMN architectures.
  • AI agents producing diagrams with validated stencils and design principles, reducing hallucinations.
  • Vision-based self-correction loop: render, analyze, rectify.

Getting started

Requirements: Node.js ≥20.6 or Bun 1.4+. One-liner install (CLI + skill): bash curl -fsSL https://raw.githubusercontent.com/sparklabx/drawio-ai-kit/refs/heads/main/install.sh | sh Manual install (npm or Bun): bash npm i -g drawio-ai-kit && drawio-ai skill install bun add -g drawio-ai-kit && drawio-ai skill install As a project dependency: bash npm i drawio-ai-kit

License and pricing

MIT license. Open source. No pricing stated.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/sparklabxdrawio-ai-kit.svg)](https://yunodb.com/tools/sparklabxdrawio-ai-kit?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/sparklabxdrawio-ai-kit?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/sparklabxdrawio-ai-kit.svg" alt="Featured on YunoDB" height="20"></a>