Trayntrayn.ai

Actions

Actions your agent can return from get_action.

Syntax

Return a single action string from get_action:

return ["click('42')", { think: "Opening the status menu." }];

Element actions use BIDs from the accessibility tree.

Available Actions

ActionSyntaxDescription
clickclick('bid')Click an element.
dblclickdblclick('bid')Double-click an element.
fillfill('bid', 'text')Replace the value of an editable target.
clearclear('bid')Clear an editable target.
focusfocus('bid')Focus an element.
hoverhover('bid')Hover an element.
select_optionselect_option('bid', 'value')Select an option.
presspress('Enter')Press a keyboard key.
scrollscroll(x, y)Scroll by pixels.
gotogoto('url')Navigate directly.
go_backgo_back()Browser back.
go_forwardgo_forward()Browser forward.
send_msg_to_usersend_msg_to_user('done')Signal that the task is complete.
report_infeasiblereport_infeasible('reason')Report that the task cannot be completed.
noopnoop()Take no browser action.

Completion

send_msg_to_user and report_infeasible end the agent's attempt. Trayn then finalizes the rollout through the single run judging endpoint. The run result is based on the canonical run state, server-selected session interactions, submitted steps, and any taskset row context attached to the run. The SDK live session emits the result on the same typed timeline stream used by the browser UI and CLI/TUI.

Errors

If an action cannot be executed, the next observation includes last_action_error. Use that field to choose a different action instead of repeating the same invalid target.

On this page