Scenarios
Scenarios define flow sequences that can be played back step-by-step. They model how data and control move through the system.
Basic scenario
scenarios:
dinner-prep:
name: Dinner Preparation
steps:
- from: chef
to: orchestrator
label: What can we cook?
payload: '{"request": "dinner suggestions"}'
- from: orchestrator
to: inventory-agent
label: Check ingredients
Scenario properties
| Property | Type | Required | Description |
|---|
name | string | yes | Display name |
description | string | no | Scenario description |
steps | array | no | Ordered flow steps |
Step properties
| Property | Type | Required | Default | Description |
|---|
from | string | yes | — | Source node id |
to | string | yes | — | Target node id |
type | string | no | call | call, return, async, event, error |
label | string | no | — | Short label shown during playback |
payload | string | no | — | Detail data shown in panel |
duration | number | no | — | Custom playback duration (ms) |
fragment | object | no | — | Sequence diagram fragment |
note | object | no | — | Sequence diagram note |
Fragments
Fragments model sequence diagram constructs (alt, opt, loop, par).
steps:
- from: orchestrator
to: inventory-agent
label: Check stock
fragment:
type: loop
label: "Retry up to 3 times"
position: start
- from: inventory-agent
to: orchestrator
type: return
label: Stock levels
fragment:
type: loop
position: end
Fragment properties
| Property | Type | Required | Values |
|---|
type | string | yes | alt, opt, loop, par |
label | string | no | Condition or description |
position | string | yes | start, else, end |
Notes
Notes attach to steps for annotations:
- from: orchestrator
to: model
label: Generate response
note:
text: "Uses GPT-4 with temperature=0.7"
position: right
Note properties
| Property | Type | Required | Values |
|---|
text | string | yes | Note content |
position | string | yes | left, right, over |