Skip to content

Commit 46de6e4

Browse files
Readme (#3)
* README update * more information * simplify setup
1 parent 75ef7d7 commit 46de6e4

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,40 @@
1-
# Playwright-computer-use
1+
# Playwright Computer Use
22

3-
This Repo contains a Claude computer use tool that interacts with Playwright.
3+
Easily use the Claude `computer` tool to let an agent interact with a web browser on your machine (playwright).
44

5+
This repo contains the required code to connect a Playwright browser to Claude's computer use capabilities. This enables you to use a browser as a tool for your agent, to interact with web pages, and achieve tasks that require a browser.
56

6-
## Demo
7-
The Demo consists of the computer use agent by Claude, with access to a Playwright instance.
8-
To run the demo:
9-
* Clone the Repo:
7+
## Quickstart
8+
9+
Clone the Repo
1010
```
1111
git clone https://github.com/invariantlabs-ai/playwright-computer-use.git
1212
```
13-
* setup a virtual environment and install requirements
13+
14+
Install the dependencies:
1415
```
15-
python -m venv venv
16-
. venv/bin/activate
17-
pip install .
16+
cd playwright-computer-use
17+
pip install -e .
1818
```
19-
* create a `.env` basing on `.env-example`
20-
* run `python demo.py "How long does it take to travel from Zurich to Milan?"`
2119

22-
## Install
20+
Create a `.env` basing on `.env-example` ([Anthropic Key](https://console.anthropic.com) and an optional [Invariant Key](https://explorer.invariantlabs.ai) for tracing). Then run:
21+
22+
```
23+
python demo.py "How long does it take to travel from Zurich to Milan?"
24+
```
25+
26+
This will spawn an agent on your machine that attempts to achieve whatever task you have in mind in the browser.
27+
28+
## Install As Package
29+
2330
```
2431
pip install git://git@github.com/invariantlabs-ai/playwright-computer-use.git
2532
```
26-
## Use
27-
You can now include `PlaywrightToolbox` as a tool for `Claude`. It would work as any other tool.
33+
34+
## Using the PlaywrightToolbox as a Library
35+
36+
You can also include the `PlaywrightToolbox` as a tool for `Claude`, to enable the use of a playwright browser in an existing agent.
37+
2838
```python
2939
tools = tools = PlaywrightToolbox(page=page, use_cursor=True)
3040

0 commit comments

Comments
 (0)