Visual

Diagrams

The 4 tools for diagrams. Before an agent first makes one, it reads guide topic diagrams.

create_diagram

Make a diagram in a space: nodes and the edges between them — flowcharts, processes, system architecture, data flows, org charts, user journeys — with groups drawn around related nodes. Artifacts lays it out top to bottom or left to right so nothing overlaps; people drag, rename, connect and comment on nodes. Give the nodes (id, label, shape), then the edges (from, to, label). Read guide topic "diagrams" first; check it with render_diagram.

Parameters

space_idstringrequired
titlestringrequired
subtitlestring
One line: what it shows.
directionstring
TB top to bottom (default: processes, hierarchies), LR left to right (pipelines, architectures). One of TB, LR, BT, RL.
nodesobject[]required
Show child attributes
idstring
Short and stable: lowercase letters, digits, _ and - ("api", "orders-db"). Made from the label when left out.
labelstringrequired
Two to four words: "Payment service", "Approve refund?".
shapestring
rounded (a step or service, default), box (a system or thing), pill (start or end), diamond (a decision), cylinder (a database), circle (an event or person), note (an aside). One of box, rounded, pill, diamond, circle, cylinder, note.
descriptionstring
A short line under the label: "Postgres 16", "within 2 days".
colorstring
Only to mean something, the same color for the same meaning. One of default, blue, green, amber, red, violet, gray.
groupstring
The group it sits in, by group id.
edgesobject[]required
Show child attributes
fromstringrequired
A node id.
tostringrequired
A node id.
labelstring
When the arrow is not obvious: "Yes", "on failure", "nightly".
stylestring
dashed: optional or asynchronous. One of solid, dashed.
arrowstring
Default end (one-way). One of end, both, none.
groupsobject[]
Show child attributes
idstring
labelstringrequired
"Frontend", "AWS", "Finance team".

read_diagram

A diagram as it is now, people's edits included: direction, groups, nodes (with x and y where people placed them) and edges with their ids (what update_diagram takes).

Parameters

item_idstringrequired

update_diagram

Change a diagram. Any of: title, subtitle, direction; add_groups, remove_groups (their nodes stay, outside any group); add_nodes; change_nodes (by id: the fields you give replace those fields, "" clears one — description, color, group; shape back to rounded); remove_nodes (with their edges); add_edges; change_edges (by id); remove_edges (ids); tidy (true: drop where people placed nodes and lay it all out again). Applied in that order, all or nothing; read_diagram first for the ids — people may have changed it.

Parameters

item_idstringrequired
titlestring
subtitlestring
directionstring
One of TB, LR, BT, RL.
add_groupsobject[]
Show child attributes
idstring
labelstringrequired
"Frontend", "AWS", "Finance team".
remove_groupsstring[]
add_nodesobject[]
Show child attributes
idstring
Short and stable: lowercase letters, digits, _ and - ("api", "orders-db"). Made from the label when left out.
labelstringrequired
Two to four words: "Payment service", "Approve refund?".
shapestring
rounded (a step or service, default), box (a system or thing), pill (start or end), diamond (a decision), cylinder (a database), circle (an event or person), note (an aside). One of box, rounded, pill, diamond, circle, cylinder, note.
descriptionstring
A short line under the label: "Postgres 16", "within 2 days".
colorstring
Only to mean something, the same color for the same meaning. One of default, blue, green, amber, red, violet, gray.
groupstring
The group it sits in, by group id.
change_nodesobject[]
Show child attributes
idstringrequired
The node to change, by id.
labelstring
shapestring
One of box, rounded, pill, diamond, circle, cylinder, note, ``.
descriptionstring
A short line under the label: "Postgres 16", "within 2 days".
colorstring
One of default, blue, green, amber, red, violet, gray, ``.
groupstring
The group it sits in, by group id.
remove_nodesstring[]
add_edgesobject[]
Show child attributes
fromstringrequired
A node id.
tostringrequired
A node id.
labelstring
When the arrow is not obvious: "Yes", "on failure", "nightly".
stylestring
dashed: optional or asynchronous. One of solid, dashed.
arrowstring
Default end (one-way). One of end, both, none.
change_edgesobject[]
Show child attributes
idstringrequired
The edge to change, by the id read_diagram gives.
fromstring
tostring
labelstring
When the arrow is not obvious: "Yes", "on failure", "nightly".
stylestring
One of solid, dashed, ``.
arrowstring
One of end, both, none, ``.
remove_edgesstring[]
tidyboolean

render_diagram

See a diagram as people do: a screenshot of the whole diagram fitted to the view, plus checks — nodes not connected, decisions without labelled answers, long or repeated labels, empty groups — and errors the page hit.

Parameters

item_idstringrequired
wideboolean
A wider view (1920 px) for large left-to-right diagrams.