Skip to main content
A structured procedure stores a JSON description of steps. In the API, its procedure type is deterministic. That name identifies the authoring format; it is not a guarantee of deterministic conversation execution.
Saving an agent draft or publishing an agent validates the structured content. That doesn’t prove the steps run in order or that external actions succeed.

Define the steps

The procedure’s content field is a string containing JSON, not a nested request object. The JSON inside that string must be an object with a steps array. For example, the inner content can be:
Serialize this object into the request’s content string. Validation checks these step types and required fields: The presence of a required field is not proof that its referenced resource is usable or that a branch condition is complete. Do not invent an execution format for nested branch entries from this table alone.

Save and review

1

Choose real resources

Prepare an existing agent and editable branch. Resolve any tool or procedure identifiers against resources you can access. Start with steps that collect or explain information before adding external actions.
2

Create the procedure

Use Create procedure with type: "deterministic", name, a clear trigger, and the serialized content. Read its branch draft back before further edits.
3

Save an agent draft and correct errors

Save an agent draft. If a structured procedure fails, the request answers 400 and nothing is saved. Errors identify the procedure and a content path, such as steps[0].ask.instruction. Check JSON syntax, recognized step types, and required fields first.

Frequently asked questions

Parse the inner content separately. It must be a JSON object with a steps array, then serialized as a string in the procedure request. An array alone is not accepted as the content object.
No. It proves the authored structure is valid. Resource access, runtime behavior, and successful external actions require separate verification.