---
title: "Enterprise Architecture and Network Diagrams with AI: How-To"
url: "https://goremy.ai/blog/articles/draw-architecture-and-network-diagrams-with-ai"
author: Luis Chavez-Mattos
editor: Luis Chavez-Mattos
editor_title: Director, Product
published: "2026-12-03T15:20:13.732Z"
updated: "2026-12-03T15:20:13.732Z"
topic: Coding and DevOps with AI
description: Draft C4, ArchiMate and network diagrams from plain text with AI. Prompts to paste, tools that render them, and what to check before you share.
---

# Enterprise Architecture and Network Diagrams with AI: How-To

> Draft C4, ArchiMate and network diagrams from plain text with AI. Prompts to paste, tools that render them, and what to check before you share.

Edited by Luis Chavez-Mattos, Director, Product · Published 2026-12-03

## How do you draw an enterprise architecture or network diagram with AI?

You describe the system in plain text, ask an AI assistant to write it in a diagram-as-code format (Mermaid, PlantUML, Structurizr DSL, D2 or Graphviz), and paste that text into a tool that renders it. Then you check every box and arrow against reality, fix what is wrong by editing the text, and export to draw.io, Visio or your architecture repository. AI is good at the first draft and the layout. It is not good at knowing what your environment actually contains.

## TL;DR

- **Text first, picture second.** AI is far more reliable writing diagram code than producing a finished image, and code can be edited, diffed and versioned.
- **Write down the facts before you prompt.** A plain list of systems, connections and zones gives the AI something true to draw. Without it, the AI fills gaps with plausible inventions.
- **Pick the notation for the audience.** C4 for software architecture conversations, ArchiMate for enterprise architecture models and governance, logical network diagrams for network and security reviews.
- **Never paste secrets or real addressing into a public AI tool.** Replace IPs, hostnames and customer names with placeholders, and use the AI tool your company approves.
- **Verify every connection.** AI invents arrows, merges systems that are separate and leaves out the firewall nobody mentioned.
- **Keep the text as the source.** Export to Visio or draw.io for the final look, but store the text version so the next update takes minutes.

## Which diagram type do you actually need?

Architects and network engineers both say "diagram" and mean different things. Choose before you prompt, because the notation decides what the AI should include and what it should leave out.

| Need | Notation | What it shows | Good text format |
|---|---|---|---|
| Explain a software system to engineers and stakeholders | C4 model | System context, containers (apps, databases, services), components | Structurizr DSL, Mermaid, PlantUML with C4 library |
| Model business, application and technology layers for governance | ArchiMate | Capabilities, applications, data, infrastructure and how they relate | Archi or another ArchiMate tool; AI drafts the element list and relationships |
| Show how networks connect | Logical network diagram | Zones, subnets, firewalls, load balancers, links | Mermaid flowchart, D2, Graphviz |
| Show racks, cabling and ports | Physical network diagram | Devices, interfaces, cable runs | Usually built from inventory data; AI helps with structure only |
| Show how a request moves through systems | Sequence diagram | Order of calls between systems | Mermaid, PlantUML |

C4 has four levels: context (your system and the people and systems around it), containers (the deployable pieces inside it), components (the parts inside one container) and code. Most useful diagrams stop at containers. If a stakeholder asks for "the architecture diagram," a C4 context or container diagram is usually what they want.

## What do you need before you open an AI tool?

Spend ten minutes writing a fact sheet. This is the step that separates a usable diagram from a confident fiction.

For an application architecture, list:

1. The system's name and purpose in one sentence.
2. The people or roles who use it.
3. Each application, service and database, with its technology if you know it.
4. Each connection, with direction and what flows across it ("Web app calls Orders API over HTTPS").
5. External systems (payment provider, identity provider, CRM).

For a network, list:

1. Zones or segments (internet, DMZ, application tier, database tier, management, branch offices).
2. Devices that sit between zones (firewalls, load balancers, VPN gateways, routers).
3. Which zones can talk to which, and over what protocol or port at a general level.
4. Links to outside networks (cloud providers, partners, data centers).
5. Anything you are unsure of, marked "unknown." Tell the AI to keep unknowns visible.

Sources for the fact sheet: existing wiki pages, a CMDB export, a cloud console, a firewall rule review, or a conversation with the person who built it. If you are working from old documents, paste them in (sanitized) and ask the AI to extract the fact sheet first. Read that extraction before moving on.

## How do you keep company data safe while using AI?

Do this before pasting anything.

- Use the AI tool your company has approved. If there isn't one, ask your security team before using a personal account for work material.
- Replace real IP addresses with documentation ranges (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24) or labels like "App subnet."
- Replace hostnames, customer names and project code names with neutral labels.
- Never paste passwords, keys, tokens or full device configs that contain them. Strip them first.
- Describe the shape of the network. You rarely need the exact rule set to get a useful diagram.

## How do you draw a C4 diagram with AI, step by step?

**Step 1. Write the fact sheet** as described above.

**Step 2. Paste this prompt**, filling in the brackets:

```
You are a software architect. Using only the facts below, write a C4 container
diagram as Mermaid code (flowchart syntax, left to right).

Rules:
- Use only the systems and connections I list. Do not add components I did not mention.
- Label every arrow with what flows across it and the protocol if I gave one.
- Put external systems in a separate subgraph called "External".
- If something is unclear, add a node or note labelled "UNKNOWN: <question>" instead of guessing.
- After the code, list every assumption you made.

Facts:
[paste fact sheet]
```

**Step 3. Render it.** Paste the code into the Mermaid live editor, a Markdown viewer that supports Mermaid (many wikis and code hosting sites do), or draw.io, which can import Mermaid text through its Insert menu.

**Step 4. Read the assumptions list.** The AI should tell you where it guessed. Every item there is a question for a human who knows the system.

**Step 5. Edit in text.** Ask for changes in plain language ("Split the database into read and write replicas," "Move the identity provider outside the boundary") and have the AI return the full updated code. For small changes, edit the text yourself.

Here is the kind of output you should expect for a simple order system (illustrative, not a real environment):

```
flowchart LR
  customer([Customer]) -->|HTTPS| web[Web App]
  web -->|REST/JSON| orders[Orders API]
  orders -->|SQL| db[(Orders Database)]
  orders -->|HTTPS| pay[Payment Provider]
  orders -->|Events| queue[[Message Queue]]
  queue --> notify[Notification Service]
  notify -->|SMTP| email[Email Service]
  subgraph External
    pay
    email
  end
```

If you need the diagram to follow C4 conventions (person, system, container shapes, a boundary box), ask for Structurizr DSL or PlantUML with the C4 library instead. Mermaid also has a C4 diagram type, but it is less mature than its flowcharts, so check how it renders before you commit to it.

## How do you draw an ArchiMate diagram with AI?

ArchiMate is stricter than C4. It defines specific element types (business process, application component, node and so on) and specific relationship types (serving, realization, assignment, flow). Using the wrong relationship is a modeling error, not a style choice, and an AI will make that error often.

A workable approach:

1. **Have the AI draft the model as a table**, not as a picture. Elements in one table (name, ArchiMate type, layer), relationships in another (source, relationship type, target).
2. **Review the table with an architect.** This is where you catch wrong types, such as a database modeled as an application component, or "serving" used where "flow" is meant.
3. **Enter or import it into your ArchiMate tool.** Archi is a free, widely used modeling tool, and many enterprise architecture platforms support ArchiMate import. Some tools accept a standard exchange file format. You can ask the AI to produce one, but test a small file first, because malformed XML is a common failure.
4. **Generate views from the model** in the tool, rather than drawing boxes by hand.

Prompt for the table step:

```
Act as an enterprise architect who follows the ArchiMate specification.
From the description below, produce two tables.

Table 1: Elements. Columns: Name, ArchiMate element type, Layer (Business, Application, Technology), Notes.
Table 2: Relationships. Columns: Source, Relationship type (serving, realization, assignment, flow, triggering, access, composition, aggregation), Target, Why.

Rules:
- Only use elements stated in the description. Mark any you inferred as "INFERRED".
- If you are not sure which element or relationship type is correct, give your best option and write "CHECK" in Notes.

Description:
[paste]
```

Sort the output by the "CHECK" and "INFERRED" flags first. That is your review queue.

## How do you draw a network diagram with AI?

The method is the same, with different facts and more attention to trust boundaries.

**Step 1. Sanitize and list the facts** (zones, devices between zones, allowed flows, external links).

**Step 2. Prompt for a logical diagram:**

```
You are a network engineer. Draw a logical network diagram in Mermaid
(flowchart, top to bottom) from the facts below.

Rules:
- One subgraph per zone. Name each zone clearly.
- Show every firewall, load balancer and VPN gateway as its own node between the zones it separates.
- Label each link with the protocol or traffic type I gave.
- Do not invent devices, subnets or addresses. Use my placeholders exactly.
- Mark anything I did not specify as "UNKNOWN".
- Then list which zone-to-zone paths exist in the diagram so I can check them against the firewall policy.

Facts:
[paste sanitized facts]
```

**Step 3. Render and compare.** The last instruction matters. A path list in words is easier to check against a firewall policy than a picture.

**Step 4. Ask for a second opinion:**

```
Review the diagram code above as a security reviewer. List:
1. Any path from the internet zone to a sensitive zone that does not pass through a firewall node.
2. Single points of failure.
3. Anything that looks inconsistent with the facts I gave you.
Do not suggest new components unless you label them as suggestions.
```

This is a useful sanity check. It is not a security assessment.

For physical diagrams (racks, ports, cable runs), AI is a poor fit. That information lives in your inventory and discovery tools, and a diagram made from guesses is worse than none. Use AI to help structure the document, not to supply the facts.

## What should you check in every AI-drawn diagram?

Run this checklist before anyone else sees it.

- **Every box exists.** Can you point to the real system, device or service?
- **Every arrow is real.** Does the connection exist, in that direction, with that protocol?
- **Nothing is missing.** Ask the owner "what else talks to this?" Batch jobs, monitoring agents, backups and admin access are the usual omissions.
- **Boundaries are right.** Is each system in the correct zone, cloud account or ownership boundary?
- **Names match production.** Use the names people actually use in tickets and runbooks.
- **Unknowns are visible.** Any "UNKNOWN" should be resolved or left on the diagram on purpose.
- **Notation is correct.** For ArchiMate, element and relationship types follow the standard. For C4, each level shows the right kind of thing (no components on a context diagram).
- **It has a date and an owner.** A diagram without either is already out of date.

## Where should you not trust AI for diagrams?

- **Discovering what exists.** AI can only draw what you tell it. It does not see your environment.
- **Security conclusions.** It may produce a tidy diagram of a flawed design and call it fine.
- **Exact addressing and rule sets.** Copy those from the source of truth, not from a model's output.
- **Compliance evidence.** If an auditor needs a diagram, a person must attest that it matches reality.
- **Layout of large diagrams.** Past a few dozen nodes, auto-layout gets messy. Split into several views, one per audience or zone.
- **Strict notation.** Treat any ArchiMate or formal modeling output as a draft from a junior colleague.

## How do you get from AI text to a Visio or draw.io file?

- **draw.io (diagrams.net):** use its option to insert diagrams from text, which accepts Mermaid and PlantUML. You get editable shapes you can then style by hand.
- **Visio:** the practical route is to build the structure in draw.io or a text tool and then redraw or import. Visio can open some other formats, but behavior varies by version, so test with a small diagram. If your company requires Visio files, plan to finish the styling there by hand.
- **Wiki or docs:** many wikis render Mermaid directly, which keeps the diagram editable as text in the page.
- **Repository:** store the text file next to the code or the runbook. Reviewers can then see exactly what changed in an update.

Whichever you choose, keep the text version. When the architecture changes, you paste the old text and the change description into the AI, get an updated draft, and re-check only what changed.

## How can a small internal app keep diagrams from going stale?

Diagrams go stale mostly because nobody has a current list of what exists and who owns it. The fact sheet you wrote for the AI is that list. A small internal app can hold it: a system register with each system's owner, environment, data sensitivity, connections and a "last reviewed" date, plus a form where teams request changes. You can describe a tool like that in plain English to [Remy](https://goremy.ai), which builds and deploys a full-stack app with a database and sign-in, so the register lives in one governed place instead of a spreadsheet. The diagram text can then be attached to each system and reviewed on a schedule.

## Frequently Asked Questions

### Can AI draw an architecture diagram directly from a screenshot or an old Visio file?

Some AI tools can read images and describe what they see, but accuracy drops with dense or low-resolution diagrams. A safer path is to ask the AI to extract a list of systems and connections from the image, correct that list yourself, and then generate the new diagram from the corrected list.

### Which format is best: Mermaid, PlantUML or Structurizr?

Mermaid is the easiest to render, since many wikis and tools support it. PlantUML has a long history and a C4 library. Structurizr DSL is built around the C4 model, so it suits teams that want one model with several views. Pick the one your tools already render, and ask the AI to write in that format.

### Is it safe to paste network configurations into an AI chatbot?

Not without care. Configs often contain addresses, credentials and policy details that should not leave your company. Use an approved tool, remove secrets and real addressing, and describe the structure rather than pasting raw files wherever you can.

### Will AI replace enterprise architects and network engineers who make these diagrams?

It removes much of the drafting time, but the hard part is knowing what is true and what should be built. Reviewing, deciding and being accountable for the diagram stay with people. The skill that gains value is verifying a draft quickly and knowing which questions to ask the system owner.
