end

Ends the agent successfully. The value is added to the output, and the conversation state is saved.

Value

ValueTypeDefaultDescription
the command's valuedynamic string"Agent succeeded"Ends the agent successfully and adds the value to the output. Agent state is saved.

Example

"if": {
  "condition": "{ not result }",
  "then": {
    "end": "No open tickets match your request."
  }
}

Rules

  • end stops every function and loop that is running, however deeply nested the command is.
  • Set a value the user should read. An empty string ends the agent quietly.
  • end is not allowed in a function that is offered to the LLM as a tool, nor in any function called from such a function. A tool must return to the model, not end the agent.