OutputRespond
- Written as
- Output
- Output
- Content
- Reply
- (ToolResult workflows only)
Inputs
- Outputoutput contractRequired
- What the workflow returns.
ContentStructured: <schema>ToolResult- Contentstring
- Text. An answer that is empty or only whitespace fails the turn.
- Structured: <schema>object
- JSON checked against the schema you give.
- ToolResultresult[]
- The tool results the run gathered, each with the query it ran and its sources, for a workflow another workflow calls to collect material.
- Replyobject
- On a ToolResult workflow only: the field the closing reply is returned under beside the results, and what it is narrowed to, Content or one Structured schema.
Outputs
- <result>any
- The committed result: recorded as result.committed, returned to a calling workflow, and the turn ends Completed.
Example
Output: Content
Steps:
- ExecuteTool: Pay
Operations: [IssueRefund]
- DeliverResults: HandOver
- ModelCall: Reply
Instructions: Tell the billing system the refund was issued, and give its refund id.
Output: ContentWhenever the run’s conversation ends on results, the engine asks the model to reply to them: before the next model step, and once the steps are done. A final ModelCall, as here, asks your own question last. Either way, the last reply is held to the workflow’s Output and becomes the result.
Reading the result
- On the stream. A run started with Accept: text/event-stream sends result.committed, with the value, before the turn ends.
- Afterwards. The turn’s resultRef names the result.committed event; the run’s events hold it for as long as the run is kept.
- From another workflow. A WorkflowCall step receives the result as its own value.