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

PropertyTypeRequiredDescription
namestringyesDisplay name
descriptionstringnoScenario description
stepsarraynoOrdered flow steps

Step properties

PropertyTypeRequiredDefaultDescription
fromstringyesSource node id
tostringyesTarget node id
typestringnocallcall, return, async, event, error
labelstringnoShort label shown during playback
payloadstringnoDetail data shown in panel
durationnumbernoCustom playback duration (ms)
fragmentobjectnoSequence diagram fragment
noteobjectnoSequence 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

PropertyTypeRequiredValues
typestringyesalt, opt, loop, par
labelstringnoCondition or description
positionstringyesstart, 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

PropertyTypeRequiredValues
textstringyesNote content
positionstringyesleft, right, over