Use sequence for API handshakes, authentication flows, multi-agent conversations, and protocol walkthroughs across 2–6 actors.
sequence
Press Play or click any message or note pill to step through the handshake in order:
1. Declare 2–6 actors — each can be a string or { id, title, note, highlight }.
actors
{ id, title, note, highlight }
2. Add messages in chronological order ({ from, to, label, fallback, description, code }).
messages
{ from, to, label, fallback, description, code }
3. Add self-calls by setting from and to to the same actor id.
from
to
id
4. Add participant notes anywhere in messages with { kind: note, position: over | left | right, actors: [id], label: "..." }.
{ kind: note, position: over | left | right, actors: [id], label: "..." }
5. Enable numbered: true to number messages (01, 02, ...) while keeping note pills unnumbered (matching Mermaid autonumber).
numbered: true
01
02
autonumber
| Field | Required | Description |
|---|---|---|
| type | Yes | Must be sequence |
type
| label | Yes | Accessible 1-sentence summary |
label
| actors | Yes | 2–6 actors (string or { id, title, note?, highlight? }) |
{ id, title, note?, highlight? }
| messages | Yes | Ordered messages or note items (kind: note) |
kind: note
| numbered | No | true prefixes messages with 01, 02, ... |
numbered
true
| eyebrow | No | Uppercase header above actors |
eyebrow