From db0246fa6a98414a221420e44073f1bbb1cf9845 Mon Sep 17 00:00:00 2001 From: Patrick Barker Date: Thu, 5 Sep 2024 17:50:18 -0600 Subject: [PATCH] docs --- README.md | 26 +++++++++++++++++++++++--- poetry.lock | 8 ++++---- pyproject.toml | 4 ++-- surfkit/__init__.py | 1 + surfkit/client.py | 11 ++++++++++- surfkit/learn/base.py | 12 ++++++++++++ 6 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 surfkit/learn/base.py diff --git a/README.md b/README.md index 152d89c..e6a6a9d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,27 @@ pip install surfkit - MacOS or Linux - [Qemu](https://www.qemu.org/download/#macos) -### Create an Agent +### Python + +Use an agent to solve a task + +```python +from surfkit import solve + +task = solve( + "Search for the most common variety of french duck", + agent_type="mariyadavydova/SurfSlicer", + device_type="desktop", + ) + +task.wait_for_done() + +result = task.result +``` + +### CLI + +#### Create an Agent Find available agents on the Hub @@ -69,7 +89,7 @@ List running agents surfkit list agents ``` -### Create a Device +#### Create a Device Create an Ubuntu desktop for our agent to use. @@ -83,7 +103,7 @@ List running devices surfkit list devices ``` -### Solve a task +#### Solve a task Use the agent to solve a task on the device diff --git a/poetry.lock b/poetry.lock index 048991a..fd2875e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4480,13 +4480,13 @@ widechars = ["wcwidth"] [[package]] name = "taskara" -version = "0.1.125" +version = "0.1.126" description = "Task management for AI agents" optional = false python-versions = "<4.0,>=3.10" files = [ - {file = "taskara-0.1.125-py3-none-any.whl", hash = "sha256:0fed731e46cd9e59fd0adaf076c68d7155547eb3fe60a7071fbbed926e4eb08e"}, - {file = "taskara-0.1.125.tar.gz", hash = "sha256:18abf8f650d4af0c9cb456cc0e746d059eb473965d4c1ce2a41709f925128065"}, + {file = "taskara-0.1.126-py3-none-any.whl", hash = "sha256:80b606b4d24ce94528b0331ffc5adb406b15f17f80de758ce9d7ed4b0f9de89d"}, + {file = "taskara-0.1.126.tar.gz", hash = "sha256:e779cfff7fca36af7e622b02ec8b64e12832fbf5f2fa421d0d6a852fd6c74a14"}, ] [package.dependencies] @@ -5490,4 +5490,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "8af7c07229464036e4938033819039e962237ef7015a9a037e264b079b06cc3c" +content-hash = "4c48bfacfa7af7a2df2ae3d733478070c0d924a5b937bd9ca4872416fdfbae4f" diff --git a/pyproject.toml b/pyproject.toml index eceac12..f249f31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "surfkit" -version = "0.1.238" +version = "0.1.239" description = "A toolkit for building AI agents that use devices" authors = ["Patrick Barker "] license = "MIT" @@ -22,7 +22,7 @@ rich = "^13.7.1" tqdm = "^4.66.4" agentdesk = "^0.2.93" kubernetes = "^30.1.0" -taskara = "^0.1.125" +taskara = "^0.1.126" [tool.poetry.group.dev.dependencies] diff --git a/surfkit/__init__.py b/surfkit/__init__.py index 0de5f26..8afeda9 100644 --- a/surfkit/__init__.py +++ b/surfkit/__init__.py @@ -6,3 +6,4 @@ ) from surfkit.client import solve +from taskara import Task, TaskStatus diff --git a/surfkit/client.py b/surfkit/client.py index bd788f1..71e94e8 100644 --- a/surfkit/client.py +++ b/surfkit/client.py @@ -1,5 +1,5 @@ import logging -from typing import Optional +from typing import Optional, Dict from agentdesk import Desktop from namesgenerator import get_random_name @@ -418,3 +418,12 @@ def solve( except: pass return task + + +def learn( + description: str, + parameters: Dict[str, str] = {}, + device_type: str = "desktop", + starting_url: Optional[str] = None, +): + pass diff --git a/surfkit/learn/base.py b/surfkit/learn/base.py new file mode 100644 index 0000000..3f2d50b --- /dev/null +++ b/surfkit/learn/base.py @@ -0,0 +1,12 @@ +from abc import ABC, abstractmethod + + +class Teacher(ABC): + + @abstractmethod + def teach(self, *args, **kwargs): + pass + + +class LLMTeach(Teacher): + pass