Working with Documents

Diagrams

Generate and refine Mermaid diagrams, with AI or by hand.

Docpipe renders Mermaid diagrams right in a document — flowcharts, sequence diagrams, and more — so an architecture or a process can live beside the prose that explains it. You can write the diagram by hand or describe it and let AI draw it.

Insert a diagram

Add a Mermaid diagram from the slash menu or the Insert menu. A new block starts with a small example diagram and shows two panes:

  • Mermaid source — the diagram's text, which you can edit directly.
  • Preview — a live render that updates as you type. If the syntax is off, the error shows inline so you can fix it.

Generate or change it with AI

You don't need to know Mermaid syntax. Click Generate with AI on the block to open the diagram dialog:

  • On a new diagram, it's titled Generate Mermaid diagram — describe what you want ("a flowchart for user login") and it draws it.
  • On an existing one, it's Modify diagram with AI — describe the change ("add an error-handling path") and it edits what's there.

The current document is sent along as context, so the diagram can reflect what the page is actually about. When it finishes, the new diagram is validated and dropped into the block.

Because the source stays editable, AI and hand-editing mix freely — generate a first draft, then tweak a label or add a node directly in the source pane.