Metadata-Version: 2.1
Name: agentdesk
Version: 0.2.2
Summary: A desktop for AI agents
License: Apache 2.0
Author: Patrick Barker
Author-email: patrickbarkerco@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: agent-tool (>=0.1.4,<0.2.0)
Requires-Dist: docker (>=7.0.0,<8.0.0)
Requires-Dist: fastapi[all] (>=0.109.0,<0.110.0)
Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0)
Requires-Dist: namesgenerator (>=0.3,<0.4)
Requires-Dist: paramiko (>=3.4.0,<4.0.0)
Requires-Dist: pillow (>=10.2.0,<11.0.0)
Requires-Dist: psutil (>=5.9.8,<6.0.0)
Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
Requires-Dist: pycdlib (>=1.14.0,<2.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: sqlalchemy (>=2.0.25,<3.0.0)
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
Requires-Dist: tqdm (>=4.66.2,<5.0.0)
Requires-Dist: typer (>=0.9.0,<0.10.0)
Description-Content-Type: text/markdown

# AgentDesk

A desktop for AI agents.

Built on [agentd](https://github.com/AgentSea/agentd) to make desktop VMs accessible to AI agents.

Implements the [ToolsV1 protocol](https://github.com/AgentSea/agent-tools)

## Installation

```
pip install agentdesk
```

## Quick Start

```python
from agentdesk import Desktop

desktop = Desktop.local()
desktop.view(background=True)

desktop.open_url("https://google.com")

desktop.move_mouse(500, 500)

desktop.click()

img = desktop.take_screenshot()
```

## Usage

### Create a local desktop

```python
from agentdesk import Desktop

desktop = Desktop.local()
```

```bash
$ agentdesk create --provider qemu
```

_\*requires [qemu](https://www.qemu.org/)_

### Create a remote desktop on GCE

```python
desktop = Desktop.gce()
```

```bash
$ agentdesk create --provider gce
```

### Create a remote desktop on EC2

```python
desktop = Desktop.ec2()
```

```bash
$ agentdesk create --provider ec2
```

### View the desktop in the UI

```python
desktop.view()
```

```bash
$ agentdesk view old_mckinny
```

_\*requires docker_

### List desktops

```python
Desktop.list()
```

```bash
$ agentdesk get
```

### Delete a desktop

```python
Desktop.delete("old_mckinny")
```

```bash
$ agentdesk delete old_mckinny
```

### Use the desktop

```python
desktop.open_url("https://google.com")

coords = desktop.mouse_coordinates()

desktop.move_mouse(500, 500)

desktop.click()

desktop.type_text("What kind of ducks are in Canada?")

desktop.press_key('Enter')

desktop.scroll()

img = desktop.take_screenshot()
```

### Examples

[GPT-4V](./examples/gpt4v/note.ipynb) provides a notebook using a desktop

## Developing

Please open an issue before creating a PR.

