Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lyie28 committed Sep 23, 2024
1 parent 2e86f1f commit a979ba4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
Binary file added docs/assets/trajectory-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/trajectory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/docs/get-started/quick-tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ First of all, we need to get our `trajectory`, or series of actions, correspondi
To do this, we initialize a WebAgent and give it an objective of testing a natural language `scenario`.

```python
from lavague.core.agents import WebAgent
from lavague import WebAgent

# Create Web Agent
agent = WebAgent(api_key="")
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/learn/trajectory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Trajectories

Trajectories are classes returned by LaVague agents containing information about an agent run and the list of actions performed.

They contain the following attributes:
- `start_url`: The URL provided as input for this run
- `objective`: The text objective that was given as input for this run
- `run_id`: A unique run id
- `output`: Text output where expected
- `actions`: The series of [actions](./actions.md) generated during this run
- `status`: Whether the agent run was `completed` or `failed`

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

## Integrations

This Trajectory can be passed to `exporter` functions to be converted into replayable automation code in the format required your use case.

![exporter](https://raw.githubusercontent.com/lavague-ai/LaVague/drafting-some-docs/docs/assets/trajectory-export.png)

Currently, we only provide a `PyTest exporter`, but we plan to work with the community to build exporters to cover a wide range of use cases.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ pip install lavague
You're now ready to start using LaVague Web Agents to perform tasks on the websites of your choice:

```python
from lavague.core.agents import WebAgent
from lavague import WebAgent

url = "https://huggingface.co/"
objective = "Return a list of the top 5 trending models on HuggingFace"
agent = WebAgent()
obj = "Return a list of the top 5 trending models on HuggingFace"
agent = WebAgent(api_key="")
ret = agent.run(url=url, objective=obj)

# Print output
Expand Down

0 comments on commit a979ba4

Please sign in to comment.