Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
lyie28 committed Sep 23, 2024
1 parent a1d6308 commit 356bf70
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Binary file added docs/assets/actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions docs/docs/learn/actions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Action objects

Trajectories objects will always contain a list of `Action objects`, which provide information about each action generated and executed by an agent, as well as all the information needed to replay these actions.

![action chain](https://raw.githubusercontent.com/lavague-ai/LaVague/drafting-some-docs/docs/assets/actions.png)

## Navigation actions

In the case of web navigation, an agent will generate an action based on a pre-defined list of possible actions. The action is provided as a string following a JSON format with all the key-pair arguments needed to easily parse and perform navigation actions.

```json
action:
args:
xpath: "/html/body/section/devsite-header/div/div[1]/div/div/div[2]/div[1]/devsite-tabs/nav/tab[2]/a"
name: "click"
```

Here is a list of the current possible actions an agent can perform and the arguments required for this action:

| Name | Arguments | Description | Engine |
|-------------------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------|--------------------|
Expand All @@ -13,8 +29,5 @@
| SCROLL_UP | none | Scrolls the browser window up. | NavigationControl |
| WAIT | none | Pauses the operation for a set duration (e.g., 5 seconds). | NavigationControl |
| BACK | none | Navigates back to the previous page. | NavigationControl |
| SCAN | none | Placeholder action, does nothing (pass). | NavigationControl |
| MAXIMIZE_WINDOW | none | Maximizes the browser window. | NavigationControl |
| SWITCH_TAB | tab_id: number | Switches to a specific browser tab based on the tab_id provided. | NavigationControl |


| SWITCH_TAB | tab_id: number | Switches to a specific browser tab based on the tab_id provided. | NavigationControl |

0 comments on commit 356bf70

Please sign in to comment.