PugBase/Docs

Diagrams

A diagram note is a canvas you can draw on by hand or by asking. Tell AI what you need - an architecture, a flow, a database - and it draws it with real shapes, zones and product icons that you can then move, restyle and connect yourself.

Asking AI to add a notification service to an existing architecture diagram. The waiting is cut out; everything else is as it happens.

Ask AI to draw or change it

Open a diagram note and press the AI button at the bottom right. Say what you want in your own words. AI reads the diagram that is already there, so you can ask for a change as easily as for a new drawing.

An architecture diagram with zones and product icons, and the AI chat ready for the next request.
  • Name the technologies (React, PostgreSQL, Redis, Stripe, AWS) and they are drawn with their own icons.
  • Say what belongs together ("on AWS", "third-party services") and those parts are grouped in a zone.
  • Say which language the labels should be in. Without it they may come out in English.
  • Paste a picture of a whiteboard or an old diagram into the chat and ask for it to be redrawn.

Two kinds of diagram

  • Flowchart: architecture, process and decision flows. Shapes, zones, icons, and lines with labels.
  • ER diagram: a database. The schema is written as DBML on the left and drawn as tables with their relations on the right. Edit the DBML and the drawing follows.
An ER diagram: DBML on the left, the tables it describes on the right.

Change it by hand

  • Drag a shape to move it. Lines stay attached and find a new path.
  • Drag from the dot on a shape's edge to another shape to connect them.
  • Pick shapes and icons from the panel on the left, or search it (aws, database, decision).
  • Layout arranges the whole drawing again. Fit brings all of it into view. Lock stops accidental moves.
A process flow with decisions, drawn from one request.

History and export

Every change AI makes keeps the drawing as it was before in History, so a change you do not like is one click from undone. Export saves the drawing as a picture on a white or a transparent background.

Diagrams inside a document

In an ordinary note, ask the AI chat for a diagram and choose where it goes: inside the note as a diagram block, or as a diagram note of its own that you can drag and edit.

Let your coding agent draw

An agent connected over MCP draws with create_diagram_note and redraws with update_diagram - for example to bring the architecture diagram in line with the code it has just changed. See Installation to connect one.