Declaring what a workflow accepts
Triggers lists the requests the workflow accepts, each under New with a JSON Schema. Prompt and Files are the standard fields; a schema may require them and add its own. A workflow with one entry needs no name for it. With several, each is named and the caller says which one it is using with ?name=.
Triggers:
- New: Refund
Schema:
type: object
required: [Prompt, Invoice]
properties:
Prompt: { type: string }
Invoice: { type: string }
Instructions: { type: string }The request becomes the turn’s first message to the model, one line per field, with the caller’s time zone and any files attached. A schema that declares an Instructions field lets the caller add to the workflow’s instructions for that turn.
What starts a run
While a turn is still running
A run has at most one live turn. Mode decides what a new request does while the last turn is running, waiting for an answer, or failed and due for an automatic retry. It is Queue where the workflow declares none.
Mode: QueueThenSupersedeAfter
WaitTimeout: PT30SWaitTimeout is a duration, as ISO 8601 (PT30S) or a TimeSpan (00:00:30). The two modes ending in After require it and the other three refuse it. Queued requests open in the order they arrived.