Run Workflow
This endpoint runs a workflow that has been configured in the Tennr app.
Body (multipart/form-data)
This is the ID of the agent that you would like to execute. Found within the Tennr platform.
If your input step is not configured in “batched” mode, then you can put your arguments at the base level of the request body. For example, if you have an input variable named “Question” you would pass a form field, “Question”, with the value you’d like to pass to the workflow, such as “What is Tennr?”.
If your input step is configured in “batched” mode, then you must provide an argument to the “batches” field in the request body. This field must be populated with a stringified JSON array of objects. Each object in the array represents one “batch” of inputs, and should be in { key: value } format. For example, if if you have an input configured to accept a “Question” and “Tone” you could provide the following arguments to submit two batches to the workflow.
This optional argument allows you to supply a list of previous messages for usage in chat-based applications. Each message should be in the following format.
This optional argument enables streaming results back in real time. If enabled the results of individual steps and, for certain steps like generate answer, partial updates will be sent back as they are generated. The results will be sent back using server-sent events format. Please contact [email protected] for support ingesting the results on the frontend.
Response
The generated text response as configured in the Tennr app at the output step.
If a workflow contains a reference context step the sources used will be returned as an array of objects in the following format.
Errors
We use zod to dynamically validate your inputs according to your workflow configuration. If the workflow is not in “batched” mode, you will receive an error response similar to the below with details for each value that was invalid.
If the workflow is in “batched” mode, you will receive a JSON response like the below that provides the same data as above, but with an indicator for which member of the input array was invalid.