Back to Blog

AI Makes Pretty Diagrams. Then What?

aimcpdiagrams-as-codeediting

Ask any modern AI to “draw me an architecture diagram” and you’ll get something that looks great. The boxes line up, the arrows make sense, the colors are tasteful. AI is genuinely good at this now.

Then you notice the database should be two services, not one. Or the label is wrong. Or your boss wants the whole thing left-to-right instead of top-down.

And you’re stuck. Most AI diagramming output is a flat image — a PNG, an SVG, a picture baked into a chat window. To change one box you regenerate the entire thing and hope the AI doesn’t move everything else around. The diagram looks finished, but it’s a dead end. You can admire it; you can’t work with it.

DGMO is different for one boring, decisive reason: the diagram is plain text. The AI doesn’t hand you a picture — it hands you source code you can read, edit by hand, restyle in an app, and hand back. That single property turns a one-shot generation into a real editing loop.

The Loop

Here’s the cycle that DGMO unlocks, and that image-based tools can’t:

The AI Diagramming LoopDescribe in plain EnglishTell your AI assistant whatyou want to seeGenerate DGMOThe AI writes validDGMO source, checkedagainst the languagespecRenderDGMO turns thetext into a crispSVG or PNGRefine in the appOpen it in Diagrammo —drag, restyle, edit thesource by handHand back to the AIAsk for the nextchange; the AI editsthe same text
The AI Diagramming LoopDescribe in plain EnglishTell your AI assistant whatyou want to seeGenerate DGMOThe AI writes validDGMO source, checkedagainst the languagespecRenderDGMO turns thetext into a crispSVG or PNGRefine in the appOpen it in Diagrammo —drag, restyle, edit thesource by handHand back to the AIAsk for the nextchange; the AI editsthe same text
cycle The AI Diagramming Loop

Describe in plain English blue
  Tell your AI assistant what you want to see

Generate DGMO green
  The AI writes valid DGMO source, checked against the language spec

Render orange
  DGMO turns the text into a crisp SVG or PNG

Refine in the app purple
  Open it in Diagrammo  drag, restyle, edit the source by hand

Hand back to the AI teal
  Ask for the next change; the AI edits the same text

The difference between this and “the AI gave me a picture” is the bottom half of the loop. Because the diagram is text:

  • You can edit it directly. Change a label, add a node, flip the direction (direction-lr) — it’s a one-line edit, no AI round-trip needed for small fixes.
  • The desktop app understands it. Open the .dgmo file in Diagrammo, tweak the palette, reorganize, and the source stays canonical.
  • The AI can pick up where you left off. Paste the edited source back and say “now add a caching layer.” The AI edits your version instead of starting from scratch — your hand-edits survive.
  • It lives in version control. It diffs. It goes through code review. It’s a file, not a screenshot buried in a chat log.

A picture is a destination. Text is a workspace.

Setting It Up

Getting into the loop takes a few minutes — and usually starts with the frustration of an AI image you can’t edit. Here’s the real arc, bumps and all:

Setting Up AI DiagrammingDeveloperTired of redrawing architecture docs by handWhereBrowserTerminalEditorDesktop AppHopefulFrustratedRelievedConfusedImpressedInControlDiscoverAI draws a great-lookingdiagramLooks perfect on the first tryBrowserTry to fix one label — it is just aPNGRegenerating shifts every otherboxBrowserSet UpInstall and run the integrationinstallerdgmo install claude-codeTerminalForget to restart the assistantMCP tools appear only after arestartEditorCreateDescribe it in plain English, getvalid DGMOIt looked up the real syntax insteadof guessingEditorIterateEdit in the app, hand thesource back to the AIThe loop an image tool can nevercloseDesktop App
Setting Up AI DiagrammingDeveloperTired of redrawing architecture docs by handWhereBrowserTerminalEditorDesktop AppHopefulFrustratedRelievedConfusedImpressedInControlDiscoverAI draws a great-lookingdiagramLooks perfect on the first tryBrowserTry to fix one label — it is just aPNGRegenerating shifts every otherboxBrowserSet UpInstall and run the integrationinstallerdgmo install claude-codeTerminalForget to restart the assistantMCP tools appear only after arestartEditorCreateDescribe it in plain English, getvalid DGMOIt looked up the real syntax insteadof guessingEditorIterateEdit in the app, hand thesource back to the AIThe loop an image tool can nevercloseDesktop App
journey-map Setting Up AI Diagramming

persona Developer green
  Tired of redrawing architecture docs by hand

tag Where as ch
  Browser blue
  Terminal teal
  Editor green
  Desktop App purple

[Discover]
  AI draws a great-looking diagram score: 4, emotion: Hopeful, ch: Browser
    thought: Looks perfect on the first try
  Try to fix one label  it is just a PNG score: 1, emotion: Frustrated, ch: Browser
    pain: Regenerating shifts every other box

[Set Up]
  Install and run the integration installer score: 5, emotion: Relieved, ch: Terminal
    description: dgmo install claude-code
  Forget to restart the assistant score: 2, emotion: Confused, ch: Editor
    pain: MCP tools appear only after a restart

[Create]
  Describe it in plain English, get valid DGMO score: 5, emotion: Impressed, ch: Editor
    thought: It looked up the real syntax instead of guessing

[Iterate]
  Edit in the app, hand the source back to the AI score: 5, emotion: InControl, ch: Desktop App
    opportunity: The loop an image tool can never close

The two commands behind that journey:

# 1. Install the CLI (Homebrew, or npm on any platform)
brew install diagrammo/dgmo/dgmo

# 2. Wire it into your AI assistant
dgmo install claude-code

The second command sets up the MCP server, drops the /dgmo slash command into Claude Code, and writes the MCP configuration — no prompts. (Run dgmo install with no target and it auto-detects every assistant you have and sets them all up at once. Using Cursor, Windsurf, Copilot, or Codex instead? Each is a single dgmo install <tool> too — see Using DGMO with AI for every integration.) Restart your assistant and you’re in the loop.

What the AI Is Actually Doing

When you ask for a diagram, the AI isn’t guessing at syntax from memory. The MCP server gives it tools to look up the real language and styling rules, then render the result. Here’s the flow:

How the MCP Integration WorksYouAI AssistantDGMO MCPServerRendererLanguageSpecStylingGuidanceDiagramplain Englishget_language_referencerender_diagramreadsreadscallsSVG / PNGLayerUserAIServerKnowledgeOutput
How the MCP Integration WorksYouAI AssistantDGMO MCPServerRendererLanguageSpecStylingGuidanceDiagramplain Englishget_language_referencerender_diagramreadsreadscallsSVG / PNGLayerUserAIServerKnowledgeOutput
boxes-and-lines How the MCP Integration Works

tag Layer as l
  User blue
  AI teal
  Server green
  Knowledge orange
  Output purple

direction-lr

You l: User
  -plain English-> AI Assistant l: AI

AI Assistant l: AI
  -get_language_reference-> DGMO MCP Server l: Server
  -render_diagram-> DGMO MCP Server l: Server

DGMO MCP Server l: Server
  -reads-> Language Spec l: Knowledge
  -reads-> Styling Guidance l: Knowledge
  -calls-> Renderer l: Server

Renderer l: Server
  -SVG / PNG-> Diagram l: Output

Two things in that diagram matter most:

The language spec. Before writing DGMO, the AI calls get_language_reference to fetch the exact, current syntax for the chart type it needs — not whatever was in its training data. That’s why AI-generated DGMO tends to be valid on the first try: it’s working from the source of truth, not a stale memory.

The styling guidance. The server also carries authoring guidance — how to pick a chart type, when to use color, how to keep a diagram readable. So the output isn’t just valid, it’s good: titled, sensibly colored, and laid out the way a thoughtful human would.

The renderer then turns that text into an SVG or PNG. But — and this is the whole point — the text is the artifact. The image is just one view of it.

The Honest Comparison

AI image diagramming and DGMO aren’t really competing on looks. A good model can make a beautiful diagram either way. They’re competing on what happens next:

AI image outputDGMO
First draftLooks greatLooks great
Fix one labelRegenerate everythingOne-line edit
Change the layoutRe-prompt and praydirection-lr
Edit by handNot possibleOpen the app
Hand back to AIStart overAI edits your version
Version controlScreenshot in a chatA file that diffs

If you only ever need a diagram once, an image is fine. But diagrams are rarely done the first time — they’re living documents that change as the system they describe changes. DGMO is built for the second draft, and the tenth.

Try the Loop

# Install
brew install diagrammo/dgmo/dgmo

# Connect to Claude Code
dgmo install claude-code

# Restart, then ask:
# "Draw our checkout service as a boxes-and-lines diagram"
# ...then edit it, and ask for the next change.

No installation handy? Generate something with your AI, paste the DGMO into online.diagrammo.app, and start editing. That’s the loop — and it’s the part the picture never gives you.