Actions
The complete set of actions your agent can perform in Trayn playgrounds.
Available Actions
| Action | Syntax | Description |
|---|---|---|
| click | click('bid') | Click element |
| fill | fill('bid', 'text') | Fill input |
| scroll | scroll(x, y) | Scroll by pixels |
| type | type('text') | Type on focused element |
| press | press('Enter') | Press key |
| hover | hover('bid') | Hover over element |
| select_option | select_option('bid', 'value') | Select dropdown |
| go_back | go_back() | Navigate back |
| goto | goto('url') | Navigate to URL |
| send_msg_to_user | send_msg_to_user('msg') | Signal task completion |
| report_infeasible | report_infeasible('reason') | Report task is not possible |
| noop | noop() | Do nothing |
Verification Behavior
When an agent calls send_msg_to_user, the SDK runs task verifiers:
- If reward > 0: Task is marked as complete (terminated)
- If reward = 0: Task continues with feedback in
last_action_error
The last_action_error field will contain details about which verifier checks failed.
Loop Detection
If an agent calls send_msg_to_user twice consecutively without making progress, the task is terminated.
Step Result
| Field | Type | Description |
|---|---|---|
observation | Observation | Current page state |
reward | number | Task reward (0 or points) |
terminated | boolean | Task is complete |
truncated | boolean | Server max action limit reached |
info | StepInfo | Execution timing and state |