return

Returns from the current function with a value.

Value

ValueTypeDefaultDescription
the command's valueany JSON valueReturns from the current function with this value.

Example

"return": "{ {'name': row['name'], 'total': row['amount'] * 1.2} }"

Rules

  • The value may be any JSON value. A string in braces is evaluated first.
  • Returning from main ends the agent successfully. The user sees only what the agent wrote with output.
  • A function used as an LLM tool should return a dict. The dict is sent to the model as JSON; any other value is sent as text.
  • return leaves every loop the command is inside.