Command reference
Every agent is built from 20 commands. A command is one key in a function's commands object: the key names the command, and the value carries its fields. This page lists the commands in the groups the editor uses.
A command can appear more than once in a function. Add a suffix to the key: api, api.2, api.fetchWeather. The suffix is only a name. Commands run in the order they are written.
Variables
varSets variables in function, agent, or conversation scope.
Flow control
ifRuns one command block or another, based on a condition.whileLoop that repeats as long as the condition remains true.forIterates over the elements of an iterable.breakBreaks out of the innermost loop when the value is true. Only allowed inside 'for' and 'while'.continueStarts the next iteration of the innermost loop when the value is true. Only allowed inside 'for' and 'while'.funcCalls another function.returnReturns from the current function with this value.parallelRuns several of the agent's functions at the same time.
LLM interaction
External systems
Human-in-the-loop
askPauses the agent and asks the user for input.
Agent output
outputAdds text, HTML or images to the agent's output.
Agent termination
endEnds the agent successfully and adds the value to the output. Agent state is saved.failEnds the agent with a failure message. Agent state is not saved. The value is shown to the user by the Search2o application.
Observability
progressStreams a progress message to the UI, that is shown to the user. The message is not part of the agent's output.traceTraces execution. Shown when the agent is validated.logLogs a message on the agent server. A plain string logs to the default logger at info level.
Reading a command page
Each command page has the same shape: what the command does, a table of its fields generated from the agent schema, an example that runs as written, and the rules that apply. In the tables, a dynamic string is a string that may hold a Python expression in braces (see Python expressions). A command block is a nested object of commands.

