Skip to main content
An end step stops the agent. No further steps run after it. Use it to terminate a branch explicitly and record the outcome of the run.

Configuration

configuration
object
An end step is terminal — it cannot have a next field. Reaching it ends execution of the current path.

Example

End on success:
{
  "id": "done",
  "type": "end",
  "status": "success",
  "message": "Order processed"
}
End on failure from a choice branch:
{
  "id": "reject",
  "type": "end",
  "status": "failure",
  "message": "Inventory check failed"
}

Use cases

  • Stop early on a choice branch that needs no further work
  • Mark a branch as a failure with a reason for the run history
  • Give an agent a single, explicit terminal node

Next steps