return
Returns from the current function with a value.
Value
| Field | Type | Default | Description |
|---|---|---|---|
rootrequired | JSON 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
mainends the agent successfully. The returned value is what aninvokecommand in another agent receives as its result. The user sees only what the agent wrote withoutput. - 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.
returnleaves every loop the command is inside.

