agentsea / surfkit

A toolkit for building multimodal AI agents
https://docs.hub.agentsea.ai
MIT License
103 stars 10 forks source link

Print logs on failure to connect to agent #11

Closed pbarker closed 5 months ago

pbarker commented 5 months ago

Print logs on failure to connect to an agent

claysauruswrecks commented 5 months ago
user@computer:~/twerkspace/kentaur/surfpizza$ cat ~/.agentsea/logs/surfpizza-bell-vqj21.log 
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/media/user/twerkspace/kentaur/surfpizza/surfpizza/server.py", line 15, in <module>
    from .agent import Agent, router
  File "/media/user/twerkspace/kentaur/surfpizza/surfpizza/agent.py", line 24, in <module>
    from .tool import SemanticDesktop, router
  File "/media/user/twerkspace/kentaur/surfpizza/surfpizza/tool.py", line 32, in <module>
    router = Router.from_env()
             ^^^^^^^^^^^^^^^^^
  File "/home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/mllm/router.py", line 271, in from_env
    raise ValueError("No API keys found in environment variables.")
ValueError: No API keys found in environment variables.
user@computer:~/twerkspace/kentaur/surfpizza$ poetry run surfkit create agent -f ./agent.yaml -r process
Running agent './agent.yaml' with runtime 'process' and name 'surfpizza-knuth-ynqll'...
running agent on port 9090
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Agent not yet available, retrying...
Successfully created agent 'surfpizza-knuth-ynqll'
user@computer:~/twerkspace/kentaur/surfpizza$ poetry run surfkit solve --description "Search for common varieties of french ducks" --device sharp-borg --agent-file ./agent.yaml --agent-runtime docker --kill
Using tracker 'mystifying-haibt' running on 'docker'
finding device 'sharp-borg'...
starting proxy to vm...
checking if ssh proxy is running...
SSH proxy not found, starting one...
Executing command:  ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -N -L 127.0.0.1:8000:localhost:8000 -p 22 -i /tmp/tmp0dji5_fm agentsea@35.239.77.162
SSH proxy setup on local port 8000
proxy from local port 8000 to remote port 8000 started...
connected to desktop via agentd
found device 'sharp-borg'...
creating agent surfpizza-visvesvaraya-ovpyy from file ./agent.yaml...
running container
ran container '333e962c3fef8ae47c92b597bdfaec68d532ed36134152fdfc55cdf196d05d4d'
viewing device...
checking if ssh proxy is running...
SSH proxy not found, starting one...
Executing command:  ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -N -L 127.0.0.1:6082:localhost:6080 -p 22 -i /tmp/tmp4q82pdes agentsea@35.239.77.162
SSH proxy setup on local port 6082
found running UI container
HTTP Error: 404 Client Error: Not Found for url: http://localhost:9070/v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793
Status Code: 404
Response Body: {'detail': 'Task not found'}
Solving task 'Search for common varieties of french ducks' with agent 'surfpizza-visvesvaraya-ovpyy'...
Container 'surfpizza-visvesvaraya-ovpyy' found.
Opening in existing browser session.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connection.py:174 in _new_conn                                                             │
│                                                                                                  │
│   171 │   │   │   extra_kw["socket_options"] = self.socket_options                               │
│   172 │   │                                                                                      │
│   173 │   │   try:                                                                               │
│ ❱ 174 │   │   │   conn = connection.create_connection(                                           │
│   175 │   │   │   │   (self._dns_host, self.port), self.timeout, **extra_kw                      │
│   176 │   │   │   )                                                                              │
│   177                                                                                            │
│                                                                                                  │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮                      │
│ │ extra_kw = {'socket_options': [(6, 1, 1)]}                              │                      │
│ │     self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0> │                      │
│ ╰─────────────────────────────────────────────────────────────────────────╯                      │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/util/connection.py:95 in create_connection                                                 │
│                                                                                                  │
│    92 │   │   │   │   sock = None                                                                │
│    93 │                                                                                          │
│    94 │   if err is not None:                                                                    │
│ ❱  95 │   │   raise err                                                                          │
│    96 │                                                                                          │
│    97 │   raise socket.error("getaddrinfo returns an empty list")                                │
│    98                                                                                            │
│                                                                                                  │
│ ╭────────────────────────────── locals ──────────────────────────────╮                           │
│ │        address = ('localhost', 9091)                               │                           │
│ │             af = <AddressFamily.AF_INET: 2>                        │                           │
│ │      canonname = ''                                                │                           │
│ │            err = ConnectionRefusedError(111, 'Connection refused') │                           │
│ │         family = <AddressFamily.AF_UNSPEC: 0>                      │                           │
│ │           host = 'localhost'                                       │                           │
│ │           port = 9091                                              │                           │
│ │          proto = 6                                                 │                           │
│ │            res = (                                                 │                           │
│ │                  │   <AddressFamily.AF_INET: 2>,                   │                           │
│ │                  │   <SocketKind.SOCK_STREAM: 1>,                  │                           │
│ │                  │   6,                                            │                           │
│ │                  │   '',                                           │                           │
│ │                  │   ('127.0.0.1', 9091)                           │                           │
│ │                  )                                                 │                           │
│ │             sa = ('127.0.0.1', 9091)                               │                           │
│ │           sock = None                                              │                           │
│ │ socket_options = [(6, 1, 1)]                                       │                           │
│ │       socktype = <SocketKind.SOCK_STREAM: 1>                       │                           │
│ │ source_address = None                                              │                           │
│ │        timeout = None                                              │                           │
│ ╰────────────────────────────────────────────────────────────────────╯                           │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/util/connection.py:85 in create_connection                                                 │
│                                                                                                  │
│    82 │   │   │   │   sock.settimeout(timeout)                                                   │
│    83 │   │   │   if source_address:                                                             │
│    84 │   │   │   │   sock.bind(source_address)                                                  │
│ ❱  85 │   │   │   sock.connect(sa)                                                               │
│    86 │   │   │   return sock                                                                    │
│    87 │   │                                                                                      │
│    88 │   │   except socket.error as e:                                                          │
│                                                                                                  │
│ ╭────────────────────────────── locals ──────────────────────────────╮                           │
│ │        address = ('localhost', 9091)                               │                           │
│ │             af = <AddressFamily.AF_INET: 2>                        │                           │
│ │      canonname = ''                                                │                           │
│ │            err = ConnectionRefusedError(111, 'Connection refused') │                           │
│ │         family = <AddressFamily.AF_UNSPEC: 0>                      │                           │
│ │           host = 'localhost'                                       │                           │
│ │           port = 9091                                              │                           │
│ │          proto = 6                                                 │                           │
│ │            res = (                                                 │                           │
│ │                  │   <AddressFamily.AF_INET: 2>,                   │                           │
│ │                  │   <SocketKind.SOCK_STREAM: 1>,                  │                           │
│ │                  │   6,                                            │                           │
│ │                  │   '',                                           │                           │
│ │                  │   ('127.0.0.1', 9091)                           │                           │
│ │                  )                                                 │                           │
│ │             sa = ('127.0.0.1', 9091)                               │                           │
│ │           sock = None                                              │                           │
│ │ socket_options = [(6, 1, 1)]                                       │                           │
│ │       socktype = <SocketKind.SOCK_STREAM: 1>                       │                           │
│ │ source_address = None                                              │                           │
│ │        timeout = None                                              │                           │
│ ╰────────────────────────────────────────────────────────────────────╯                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connectionpool.py:715 in urlopen                                                           │
│                                                                                                  │
│    712 │   │   │   │   self._prepare_proxy(conn)                                                 │
│    713 │   │   │                                                                                 │
│    714 │   │   │   # Make the request on the httplib connection object.                          │
│ ❱  715 │   │   │   httplib_response = self._make_request(                                        │
│    716 │   │   │   │   conn,                                                                     │
│    717 │   │   │   │   method,                                                                   │
│    718 │   │   │   │   url,                                                                      │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ _is_ssl_error_message_from_http_proxy = <function                                            │ │
│ │                                         HTTPConnectionPool.urlopen.<locals>._is_ssl_error_m… │ │
│ │                                         at 0x7f4bf2661bc0>                                   │ │
│ │                      assert_same_host = False                                                │ │
│ │                                  body = b'{"task": {"id":                                    │ │
│ │                                         "7654cee8-70d0-478e-bef7-a5b7dd35b793",              │ │
│ │                                         "description": "Search f'+2570                       │ │
│ │                              body_pos = None                                                 │ │
│ │                               chunked = False                                                │ │
│ │                            clean_exit = False                                                │ │
│ │                                  conn = None                                                 │ │
│ │                    destination_scheme = None                                                 │ │
│ │                                   err = None                                                 │ │
│ │                               headers = {'User-Agent': 'python-requests/2.31.0',             │ │
│ │                                         'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', │ │
│ │                                         'Connection': 'keep-alive', 'Content-Length':        │ │
│ │                                         '2650', 'Content-Type': 'application/json'}          │ │
│ │                  http_tunnel_required = False                                                │ │
│ │                     is_new_proxy_conn = False                                                │ │
│ │                                method = 'POST'                                               │ │
│ │                            parsed_url = Url(                                                 │ │
│ │                                         │   scheme=None,                                     │ │
│ │                                         │   auth=None,                                       │ │
│ │                                         │   host=None,                                       │ │
│ │                                         │   port=None,                                       │ │
│ │                                         │   path='/v1/tasks',                                │ │
│ │                                         │   query=None,                                      │ │
│ │                                         │   fragment=None                                    │ │
│ │                                         )                                                    │ │
│ │                          pool_timeout = None                                                 │ │
│ │                              redirect = False                                                │ │
│ │                          release_conn = False                                                │ │
│ │                     release_this_conn = True                                                 │ │
│ │                           response_kw = {'preload_content': False, 'decode_content': False}  │ │
│ │                               retries = Retry(total=0, connect=None, read=False,             │ │
│ │                                         redirect=None, status=None)                          │ │
│ │                                  self = <urllib3.connectionpool.HTTPConnectionPool object at │ │
│ │                                         0x7f4bf269bad0>                                      │ │
│ │                               timeout = Timeout(connect=None, read=None, total=None)         │ │
│ │                           timeout_obj = Timeout(connect=None, read=None, total=None)         │ │
│ │                                   url = '/v1/tasks'                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connectionpool.py:416 in _make_request                                                     │
│                                                                                                  │
│    413 │   │   │   if chunked:                                                                   │
│    414 │   │   │   │   conn.request_chunked(method, url, **httplib_request_kw)                   │
│    415 │   │   │   else:                                                                         │
│ ❱  416 │   │   │   │   conn.request(method, url, **httplib_request_kw)                           │
│    417 │   │                                                                                     │
│    418 │   │   # We are swallowing BrokenPipeError (errno.EPIPE) since the server is             │
│    419 │   │   # legitimately able to close the connection after sending a valid response.       │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │            chunked = False                                                                   │ │
│ │               conn = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>            │ │
│ │ httplib_request_kw = {                                                                       │ │
│ │                      │   'body': b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793",   │ │
│ │                      "description": "Search f'+2570,                                         │ │
│ │                      │   'headers': {'User-Agent': 'python-requests/2.31.0',                 │ │
│ │                      'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection':      │ │
│ │                      'keep-alive', 'Content-Length': '2650', 'Content-Type':                 │ │
│ │                      'application/json'}                                                     │ │
│ │                      }                                                                       │ │
│ │             method = 'POST'                                                                  │ │
│ │               self = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f4bf269bad0>    │ │
│ │            timeout = Timeout(connect=None, read=None, total=None)                            │ │
│ │        timeout_obj = Timeout(connect=None, read=None, total=None)                            │ │
│ │                url = '/v1/tasks'                                                             │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connection.py:244 in request                                                               │
│                                                                                                  │
│   241 │   │   │   headers = headers.copy()                                                       │
│   242 │   │   if "user-agent" not in (six.ensure_str(k.lower()) for k in headers):               │
│   243 │   │   │   headers["User-Agent"] = _get_default_user_agent()                              │
│ ❱ 244 │   │   super(HTTPConnection, self).request(method, url, body=body, headers=headers)       │
│   245 │                                                                                          │
│   246 │   def request_chunked(self, method, url, body=None, headers=None):                       │
│   247 │   │   """                                                                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │    body = b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793", "description": "Search   │ │
│ │           f'+2570                                                                            │ │
│ │ headers = {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip, deflate',       │ │
│ │           'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length': '2650',             │ │
│ │           'Content-Type': 'application/json'}                                                │ │
│ │  method = 'POST'                                                                             │ │
│ │    self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                       │ │
│ │     url = '/v1/tasks'                                                                        │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/linuxbrew/.linuxbrew/Cellar/python@3.12/3.12.3/lib/python3.12/http/client.py:1336 in       │
│ request                                                                                          │
│                                                                                                  │
│   1333 │   def request(self, method, url, body=None, headers={}, *,                              │
│   1334 │   │   │   │   encode_chunked=False):                                                    │
│   1335 │   │   """Send a complete request to the server."""                                      │
│ ❱ 1336 │   │   self._send_request(method, url, body, headers, encode_chunked)                    │
│   1337 │                                                                                         │
│   1338 │   def _send_request(self, method, url, body, headers, encode_chunked):                  │
│   1339 │   │   # Honor explicitly requested Host: and Accept-Encoding: headers.                  │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │           body = b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793", "description":    │ │
│ │                  "Search f'+2570                                                             │ │
│ │ encode_chunked = False                                                                       │ │
│ │        headers = {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip,          │ │
│ │                  deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length':    │ │
│ │                  '2650', 'Content-Type': 'application/json'}                                 │ │
│ │         method = 'POST'                                                                      │ │
│ │           self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                │ │
│ │            url = '/v1/tasks'                                                                 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/linuxbrew/.linuxbrew/Cellar/python@3.12/3.12.3/lib/python3.12/http/client.py:1382 in       │
│ _send_request                                                                                    │
│                                                                                                  │
│   1379 │   │   │   # RFC 2616 Section 3.7.1 says that text default has a                         │
│   1380 │   │   │   # default charset of iso-8859-1.                                              │
│   1381 │   │   │   body = _encode(body, 'body')                                                  │
│ ❱ 1382 │   │   self.endheaders(body, encode_chunked=encode_chunked)                              │
│   1383 │                                                                                         │
│   1384 │   def getresponse(self):                                                                │
│   1385 │   │   """Get the response from the server.                                              │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │           body = b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793", "description":    │ │
│ │                  "Search f'+2570                                                             │ │
│ │ encode_chunked = False                                                                       │ │
│ │            hdr = 'Content-Type'                                                              │ │
│ │   header_names = frozenset({                                                                 │ │
│ │                  │   'connection',                                                           │ │
│ │                  │   'accept-encoding',                                                      │ │
│ │                  │   'content-length',                                                       │ │
│ │                  │   'user-agent',                                                           │ │
│ │                  │   'accept',                                                               │ │
│ │                  │   'content-type'                                                          │ │
│ │                  })                                                                          │ │
│ │        headers = {'User-Agent': 'python-requests/2.31.0', 'Accept-Encoding': 'gzip,          │ │
│ │                  deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Length':    │ │
│ │                  '2650', 'Content-Type': 'application/json'}                                 │ │
│ │         method = 'POST'                                                                      │ │
│ │           self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                │ │
│ │          skips = {'skip_accept_encoding': 1}                                                 │ │
│ │            url = '/v1/tasks'                                                                 │ │
│ │          value = 'application/json'                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/linuxbrew/.linuxbrew/Cellar/python@3.12/3.12.3/lib/python3.12/http/client.py:1331 in       │
│ endheaders                                                                                       │
│                                                                                                  │
│   1328 │   │   │   self.__state = _CS_REQ_SENT                                                   │
│   1329 │   │   else:                                                                             │
│   1330 │   │   │   raise CannotSendHeader()                                                      │
│ ❱ 1331 │   │   self._send_output(message_body, encode_chunked=encode_chunked)                    │
│   1332 │                                                                                         │
│   1333 │   def request(self, method, url, body=None, headers={}, *,                              │
│   1334 │   │   │   │   encode_chunked=False):                                                    │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ encode_chunked = False                                                                       │ │
│ │   message_body = b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793", "description":    │ │
│ │                  "Search f'+2570                                                             │ │
│ │           self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/linuxbrew/.linuxbrew/Cellar/python@3.12/3.12.3/lib/python3.12/http/client.py:1091 in       │
│ _send_output                                                                                     │
│                                                                                                  │
│   1088 │   │   self._buffer.extend((b"", b""))                                                   │
│   1089 │   │   msg = b"\r\n".join(self._buffer)                                                  │
│   1090 │   │   del self._buffer[:]                                                               │
│ ❱ 1091 │   │   self.send(msg)                                                                    │
│   1092 │   │                                                                                     │
│   1093 │   │   if message_body is not None:                                                      │
│   1094                                                                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ encode_chunked = False                                                                       │ │
│ │   message_body = b'{"task": {"id": "7654cee8-70d0-478e-bef7-a5b7dd35b793", "description":    │ │
│ │                  "Search f'+2570                                                             │ │
│ │            msg = b'POST /v1/tasks HTTP/1.1\r\nHost: localhost:9091\r\nUser-Agent:            │ │
│ │                  python-requests/2.31.'+128                                                  │ │
│ │           self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/linuxbrew/.linuxbrew/Cellar/python@3.12/3.12.3/lib/python3.12/http/client.py:1035 in send  │
│                                                                                                  │
│   1032 │   │                                                                                     │
│   1033 │   │   if self.sock is None:                                                             │
│   1034 │   │   │   if self.auto_open:                                                            │
│ ❱ 1035 │   │   │   │   self.connect()                                                            │
│   1036 │   │   │   else:                                                                         │
│   1037 │   │   │   │   raise NotConnected()                                                      │
│   1038                                                                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ data = b'POST /v1/tasks HTTP/1.1\r\nHost: localhost:9091\r\nUser-Agent:                      │ │
│ │        python-requests/2.31.'+128                                                            │ │
│ │ self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connection.py:205 in connect                                                               │
│                                                                                                  │
│   202 │   │   │   self.auto_open = 0                                                             │
│   203 │                                                                                          │
│   204 │   def connect(self):                                                                     │
│ ❱ 205 │   │   conn = self._new_conn()                                                            │
│   206 │   │   self._prepare_conn(conn)                                                           │
│   207 │                                                                                          │
│   208 │   def putrequest(self, method, url, *args, **kwargs):                                    │
│                                                                                                  │
│ ╭────────────────────────────── locals ───────────────────────────────╮                          │
│ │ self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0> │                          │
│ ╰─────────────────────────────────────────────────────────────────────╯                          │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connection.py:186 in _new_conn                                                             │
│                                                                                                  │
│   183 │   │   │   )                                                                              │
│   184 │   │                                                                                      │
│   185 │   │   except SocketError as e:                                                           │
│ ❱ 186 │   │   │   raise NewConnectionError(                                                      │
│   187 │   │   │   │   self, "Failed to establish a new connection: %s" % e                       │
│   188 │   │   │   )                                                                              │
│   189                                                                                            │
│                                                                                                  │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮                      │
│ │ extra_kw = {'socket_options': [(6, 1, 1)]}                              │                      │
│ │     self = <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0> │                      │
│ ╰─────────────────────────────────────────────────────────────────────────╯                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f4bf26996a0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/adapters.py:486 in send                                                                   │
│                                                                                                  │
│   483 │   │   │   timeout = TimeoutSauce(connect=timeout, read=timeout)                          │
│   484 │   │                                                                                      │
│   485 │   │   try:                                                                               │
│ ❱ 486 │   │   │   resp = conn.urlopen(                                                           │
│   487 │   │   │   │   method=request.method,                                                     │
│   488 │   │   │   │   url=url,                                                                   │
│   489 │   │   │   │   body=request.body,                                                         │
│                                                                                                  │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮               │
│ │    cert = None                                                                 │               │
│ │ chunked = False                                                                │               │
│ │    conn = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f4bf269bad0> │               │
│ │ proxies = OrderedDict()                                                        │               │
│ │ request = <PreparedRequest [POST]>                                             │               │
│ │    self = <requests.adapters.HTTPAdapter object at 0x7f4bf26992b0>             │               │
│ │  stream = False                                                                │               │
│ │ timeout = Timeout(connect=None, read=None, total=None)                         │               │
│ │     url = '/v1/tasks'                                                          │               │
│ │  verify = True                                                                 │               │
│ ╰────────────────────────────────────────────────────────────────────────────────╯               │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/connectionpool.py:799 in urlopen                                                           │
│                                                                                                  │
│    796 │   │   │   elif isinstance(e, (SocketError, HTTPException)):                             │
│    797 │   │   │   │   e = ProtocolError("Connection aborted.", e)                               │
│    798 │   │   │                                                                                 │
│ ❱  799 │   │   │   retries = retries.increment(                                                  │
│    800 │   │   │   │   method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]           │
│    801 │   │   │   )                                                                             │
│    802 │   │   │   retries.sleep()                                                               │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ _is_ssl_error_message_from_http_proxy = <function                                            │ │
│ │                                         HTTPConnectionPool.urlopen.<locals>._is_ssl_error_m… │ │
│ │                                         at 0x7f4bf2661bc0>                                   │ │
│ │                      assert_same_host = False                                                │ │
│ │                                  body = b'{"task": {"id":                                    │ │
│ │                                         "7654cee8-70d0-478e-bef7-a5b7dd35b793",              │ │
│ │                                         "description": "Search f'+2570                       │ │
│ │                              body_pos = None                                                 │ │
│ │                               chunked = False                                                │ │
│ │                            clean_exit = False                                                │ │
│ │                                  conn = None                                                 │ │
│ │                    destination_scheme = None                                                 │ │
│ │                                   err = None                                                 │ │
│ │                               headers = {'User-Agent': 'python-requests/2.31.0',             │ │
│ │                                         'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', │ │
│ │                                         'Connection': 'keep-alive', 'Content-Length':        │ │
│ │                                         '2650', 'Content-Type': 'application/json'}          │ │
│ │                  http_tunnel_required = False                                                │ │
│ │                     is_new_proxy_conn = False                                                │ │
│ │                                method = 'POST'                                               │ │
│ │                            parsed_url = Url(                                                 │ │
│ │                                         │   scheme=None,                                     │ │
│ │                                         │   auth=None,                                       │ │
│ │                                         │   host=None,                                       │ │
│ │                                         │   port=None,                                       │ │
│ │                                         │   path='/v1/tasks',                                │ │
│ │                                         │   query=None,                                      │ │
│ │                                         │   fragment=None                                    │ │
│ │                                         )                                                    │ │
│ │                          pool_timeout = None                                                 │ │
│ │                              redirect = False                                                │ │
│ │                          release_conn = False                                                │ │
│ │                     release_this_conn = True                                                 │ │
│ │                           response_kw = {'preload_content': False, 'decode_content': False}  │ │
│ │                               retries = Retry(total=0, connect=None, read=False,             │ │
│ │                                         redirect=None, status=None)                          │ │
│ │                                  self = <urllib3.connectionpool.HTTPConnectionPool object at │ │
│ │                                         0x7f4bf269bad0>                                      │ │
│ │                               timeout = Timeout(connect=None, read=None, total=None)         │ │
│ │                           timeout_obj = Timeout(connect=None, read=None, total=None)         │ │
│ │                                   url = '/v1/tasks'                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/ur │
│ llib3/util/retry.py:592 in increment                                                             │
│                                                                                                  │
│   589 │   │   )                                                                                  │
│   590 │   │                                                                                      │
│   591 │   │   if new_retry.is_exhausted():                                                       │
│ ❱ 592 │   │   │   raise MaxRetryError(_pool, url, error or ResponseError(cause))                 │
│   593 │   │                                                                                      │
│   594 │   │   log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)                  │
│   595                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             _pool = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f4bf269bad0>     │ │
│ │       _stacktrace = <traceback object at 0x7f4bf26be7c0>                                     │ │
│ │             cause = 'unknown'                                                                │ │
│ │           connect = None                                                                     │ │
│ │             error = NewConnectionError('<urllib3.connection.HTTPConnection object at         │ │
│ │                     0x7f4bf26996a0>: Failed to establish a new connection: [Errno 111]       │ │
│ │                     Connection refused')                                                     │ │
│ │           history = (                                                                        │ │
│ │                     │   RequestHistory(                                                      │ │
│ │                     │   │   method='POST',                                                   │ │
│ │                     │   │   url='/v1/tasks',                                                 │ │
│ │                     │   │   error=NewConnectionError('<urllib3.connection.HTTPConnection     │ │
│ │                     object at 0x7f4bf26996a0>: Failed to establish a new connection: [Errno  │ │
│ │                     111] Connection refused'),                                               │ │
│ │                     │   │   status=None,                                                     │ │
│ │                     │   │   redirect_location=None                                           │ │
│ │                     │   ),                                                                   │ │
│ │                     )                                                                        │ │
│ │            method = 'POST'                                                                   │ │
│ │         new_retry = Retry(total=-1, connect=None, read=False, redirect=None, status=None)    │ │
│ │             other = None                                                                     │ │
│ │              read = False                                                                    │ │
│ │          redirect = None                                                                     │ │
│ │ redirect_location = None                                                                     │ │
│ │          response = None                                                                     │ │
│ │              self = Retry(total=0, connect=None, read=False, redirect=None, status=None)     │ │
│ │            status = None                                                                     │ │
│ │      status_count = None                                                                     │ │
│ │             total = -1                                                                       │ │
│ │               url = '/v1/tasks'                                                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
MaxRetryError: HTTPConnectionPool(host='localhost', port=9091): Max retries exceeded with url: /v1/tasks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at
0x7f4bf26996a0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/su │
│ rfkit/cli/main.py:1348 in solve                                                                  │
│                                                                                                  │
│   1345 │                                                                                         │
│   1346 │   typer.echo(f"Solving task '{task.description}' with agent '{agent}'...")              │
│   1347 │   solve_v1 = V1SolveTask(task=task.to_v1())                                             │
│ ❱ 1348 │   runt.solve_task(agent, solve_v1, follow_logs=follow, attach=kill)                     │
│   1349 │                                                                                         │
│   1350 │   if kill and not follow:                                                               │
│   1351 │   │   typer.echo(f"Killing agent {agent}...")                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             _device = <agentdesk.device.Desktop object at 0x7f4bf34b7e30>                    │ │
│ │    _remote_task_svr = 'http://localhost:9070'                                                │ │
│ │               _view = <function view at 0x7f4bf2660040>                                      │ │
│ │               agent = 'surfpizza-visvesvaraya-ovpyy'                                         │ │
│ │          agent_file = './agent.yaml'                                                         │ │
│ │       agent_runtime = 'docker'                                                               │ │
│ │          agent_type = None                                                                   │ │
│ │       agent_version = None                                                                   │ │
│ │           AgentType = <class 'surfkit.types.AgentType'>                                      │ │
│ │               dconf = DockerConnectConfig(timeout=None)                                      │ │
│ │         description = 'Search for common varieties of french ducks'                          │ │
│ │             Desktop = <class 'agentdesk.device.Desktop'>                                     │ │
│ │              device = 'sharp-borg'                                                           │ │
│ │     device_provider = None                                                                   │ │
│ │         device_type = None                                                                   │ │
│ │  DockerAgentRuntime = <class 'surfkit.runtime.agent.docker.DockerAgentRuntime'>              │ │
│ │ DockerConnectConfig = <class 'surfkit.runtime.agent.docker.DockerConnectConfig'>             │ │
│ │      find_open_port = <function find_open_port at 0x7f4bf6351c60>                            │ │
│ │              follow = True                                                                   │ │
│ │            instance = <surfkit.runtime.agent.base.AgentInstance object at 0x7f4bf2699b50>    │ │
│ │       instance_name = <function instance_name at 0x7f4bf261d620>                             │ │
│ │           instances = [<surfkit.runtime.agent.base.AgentInstance object at 0x7f4bf2699b50>]  │ │
│ │                kill = True                                                                   │ │
│ │          local_port = 9070                                                                   │ │
│ │           max_steps = 30                                                                     │ │
│ │              params = {}                                                                     │ │
│ │                runt = <surfkit.runtime.agent.docker.DockerAgentRuntime object at             │ │
│ │                       0x7f4bf2da47a0>                                                        │ │
│ │            solve_v1 = V1SolveTask(                                                           │ │
│ │                       │   task=V1Task(                                                       │ │
│ │                       │   │   id='7654cee8-70d0-478e-bef7-a5b7dd35b793',                     │ │
│ │                       │   │   description='Search for common varieties of french ducks',     │ │
│ │                       │   │   max_steps=30,                                                  │ │
│ │                       │   │   device=V1Device[ConnectConfig](                                │ │
│ │                       │   │   │   name='Desktop',                                            │ │
│ │                       │   │   │   config=ConnectConfig(                                      │ │
│ │                       │   │   │   │   agentd_url='35.239.77.162',                            │ │
│ │                       │   │   │   │   vm=None,                                               │ │
│ │                       │   │   │   │   storage_uri='file://.media',                           │ │
│ │                       │   │   │   │   type_min_interval=0.05,                                │ │
│ │                       │   │   │   │   type_max_interval=0.25,                                │ │
│ │                       │   │   │   │   move_mouse_duration=1.0,                               │ │
│ │                       │   │   │   │   mouse_tween='easeInOutQuad',                           │ │
│ │                       │   │   │   │   store_img=False,                                       │ │
│ │                       │   │   │   │   requires_proxy=True,                                   │ │
│ │                       │   │   │   │   proxy_type='process',                                  │ │
│ │                       │   │   │   │   proxy_port=8000,                                       │ │
│ │                       │   │   │   │   private_ssh_key='-----BEGIN RSA PRIVATE                │ │
│ │                       KEY-----\nMIIEpAIBAAKCAQEArYnKiElQBSlM+4zh5X4ORN2GU9hGOkAS'+1599,      │ │
│ │                       │   │   │   │   ssh_port=22                                            │ │
│ │                       │   │   │   )                                                          │ │
│ │                       │   │   ),                                                             │ │
│ │                       │   │   device_type=None,                                              │ │
│ │                       │   │   status='defined',                                              │ │
│ │                       │   │   threads=[],                                                    │ │
│ │                       │   │   prompts=[],                                                    │ │
│ │                       │   │   assigned_to='surfpizza-visvesvaraya-ovpyy',                    │ │
│ │                       │   │   assigned_type=None,                                            │ │
│ │                       │   │   created=1716240841.7505963,                                    │ │
│ │                       │   │   started=0.0,                                                   │ │
│ │                       │   │   completed=0.0,                                                 │ │
│ │                       │   │   error=None,                                                    │ │
│ │                       │   │   output=None,                                                   │ │
│ │                       │   │   parameters={},                                                 │ │
│ │                       │   │                                                                  │ │
│ │                       version='9dc95fc2310213f129e9172572740f4a87440aaf5e482fa99e5f6e56272c… │ │
│ │                       │   │   remote='http://localhost:9070',                                │ │
│ │                       │   │   owner_id=None,                                                 │ │
│ │                       │   │   tags=[],                                                       │ │
│ │                       │   │   labels={},                                                     │ │
│ │                       │   │   episode_id=None                                                │ │
│ │                       │   ),                                                                 │ │
│ │                       │   agent=None                                                         │ │
│ │                       )                                                                      │ │
│ │        starting_url = None                                                                   │ │
│ │                Task = <class 'taskara.task.Task'>                                            │ │
│ │                task = <taskara.task.Task object at 0x7f4bf2957800>                           │ │
│ │            task_svr = <taskara.runtime.base.Tracker object at 0x7f4bfc362150>                │ │
│ │             tracker = None                                                                   │ │
│ │             Tracker = <class 'taskara.runtime.base.Tracker'>                                 │ │
│ │      tracker_remote = None                                                                   │ │
│ │     tracker_runtime = None                                                                   │ │
│ │            trackers = [<taskara.runtime.base.Tracker object at 0x7f4bfc362150>]              │ │
│ │                 typ = <surfkit.types.AgentType object at 0x7f4bf275fbf0>                     │ │
│ │               types = [<surfkit.types.AgentType object at 0x7f4bf275fbf0>]                   │ │
│ │            v1device = V1Device[ConnectConfig](                                               │ │
│ │                       │   name='Desktop',                                                    │ │
│ │                       │   config=ConnectConfig(                                              │ │
│ │                       │   │   agentd_url='35.239.77.162',                                    │ │
│ │                       │   │   vm=None,                                                       │ │
│ │                       │   │   storage_uri='file://.media',                                   │ │
│ │                       │   │   type_min_interval=0.05,                                        │ │
│ │                       │   │   type_max_interval=0.25,                                        │ │
│ │                       │   │   move_mouse_duration=1.0,                                       │ │
│ │                       │   │   mouse_tween='easeInOutQuad',                                   │ │
│ │                       │   │   store_img=False,                                               │ │
│ │                       │   │   requires_proxy=True,                                           │ │
│ │                       │   │   proxy_type='process',                                          │ │
│ │                       │   │   proxy_port=8000,                                               │ │
│ │                       │   │   private_ssh_key='-----BEGIN RSA PRIVATE                        │ │
│ │                       KEY-----\nMIIEpAIBAAKCAQEArYnKiElQBSlM+4zh5X4ORN2GU9hGOkAS'+1599,      │ │
│ │                       │   │   ssh_port=22                                                    │ │
│ │                       │   )                                                                  │ │
│ │                       )                                                                      │ │
│ │         V1SolveTask = <class 'surfkit.server.models.V1SolveTask'>                            │ │
│ │                view = True                                                                   │ │
│ │                  vm = <agentdesk.vm.base.DesktopVM object at 0x7f4bf2bc20c0>                 │ │
│ │                 vms = [<agentdesk.vm.base.DesktopVM object at 0x7f4bf2bc20c0>]               │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/su │
│ rfkit/runtime/agent/docker.py:164 in solve_task                                                  │
│                                                                                                  │
│   161 │   │   instance = instances[0]                                                            │
│   162 │   │                                                                                      │
│   163 │   │   print(f"Container '{name}' found.")                                                │
│ ❱ 164 │   │   response = requests.post(                                                          │
│   165 │   │   │   f"http://localhost:{instance.port}/v1/tasks",                                  │
│   166 │   │   │   json=task.model_dump(),                                                        │
│   167 │   │   )                                                                                  │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      attach = True                                                                           │ │
│ │ follow_logs = True                                                                           │ │
│ │    instance = <surfkit.runtime.agent.base.AgentInstance object at 0x7f4bf269b470>            │ │
│ │   instances = [<surfkit.runtime.agent.base.AgentInstance object at 0x7f4bf269b470>]          │ │
│ │        name = 'surfpizza-visvesvaraya-ovpyy'                                                 │ │
│ │    owner_id = None                                                                           │ │
│ │        self = <surfkit.runtime.agent.docker.DockerAgentRuntime object at 0x7f4bf2da47a0>     │ │
│ │        task = V1SolveTask(                                                                   │ │
│ │               │   task=V1Task(                                                               │ │
│ │               │   │   id='7654cee8-70d0-478e-bef7-a5b7dd35b793',                             │ │
│ │               │   │   description='Search for common varieties of french ducks',             │ │
│ │               │   │   max_steps=30,                                                          │ │
│ │               │   │   device=V1Device[ConnectConfig](                                        │ │
│ │               │   │   │   name='Desktop',                                                    │ │
│ │               │   │   │   config=ConnectConfig(                                              │ │
│ │               │   │   │   │   agentd_url='35.239.77.162',                                    │ │
│ │               │   │   │   │   vm=None,                                                       │ │
│ │               │   │   │   │   storage_uri='file://.media',                                   │ │
│ │               │   │   │   │   type_min_interval=0.05,                                        │ │
│ │               │   │   │   │   type_max_interval=0.25,                                        │ │
│ │               │   │   │   │   move_mouse_duration=1.0,                                       │ │
│ │               │   │   │   │   mouse_tween='easeInOutQuad',                                   │ │
│ │               │   │   │   │   store_img=False,                                               │ │
│ │               │   │   │   │   requires_proxy=True,                                           │ │
│ │               │   │   │   │   proxy_type='process',                                          │ │
│ │               │   │   │   │   proxy_port=8000,                                               │ │
│ │               │   │   │   │   private_ssh_key='-----BEGIN RSA PRIVATE                        │ │
│ │               KEY-----\nMIIEpAIBAAKCAQEArYnKiElQBSlM+4zh5X4ORN2GU9hGOkAS'+1599,              │ │
│ │               │   │   │   │   ssh_port=22                                                    │ │
│ │               │   │   │   )                                                                  │ │
│ │               │   │   ),                                                                     │ │
│ │               │   │   device_type=None,                                                      │ │
│ │               │   │   status='defined',                                                      │ │
│ │               │   │   threads=[],                                                            │ │
│ │               │   │   prompts=[],                                                            │ │
│ │               │   │   assigned_to='surfpizza-visvesvaraya-ovpyy',                            │ │
│ │               │   │   assigned_type=None,                                                    │ │
│ │               │   │   created=1716240841.7505963,                                            │ │
│ │               │   │   started=0.0,                                                           │ │
│ │               │   │   completed=0.0,                                                         │ │
│ │               │   │   error=None,                                                            │ │
│ │               │   │   output=None,                                                           │ │
│ │               │   │   parameters={},                                                         │ │
│ │               │   │                                                                          │ │
│ │               version='9dc95fc2310213f129e9172572740f4a87440aaf5e482fa99e5f6e56272cf82a',    │ │
│ │               │   │   remote='http://localhost:9070',                                        │ │
│ │               │   │   owner_id=None,                                                         │ │
│ │               │   │   tags=[],                                                               │ │
│ │               │   │   labels={},                                                             │ │
│ │               │   │   episode_id=None                                                        │ │
│ │               │   ),                                                                         │ │
│ │               │   agent=None                                                                 │ │
│ │               )                                                                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/api.py:115 in post                                                                        │
│                                                                                                  │
│   112 │   :rtype: requests.Response                                                              │
│   113 │   """                                                                                    │
│   114 │                                                                                          │
│ ❱ 115 │   return request("post", url, data=data, json=json, **kwargs)                            │
│   116                                                                                            │
│   117                                                                                            │
│   118 def put(url, data=None, **kwargs):                                                         │
│                                                                                                  │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮               │
│ │   data = None                                                                  │               │
│ │   json = {                                                                     │               │
│ │          │   'task': {                                                         │               │
│ │          │   │   'id': '7654cee8-70d0-478e-bef7-a5b7dd35b793',                 │               │
│ │          │   │   'description': 'Search for common varieties of french ducks', │               │
│ │          │   │   'max_steps': 30,                                              │               │
│ │          │   │   'device': {                                                   │               │
│ │          │   │   │   'name': 'Desktop',                                        │               │
│ │          │   │   │   'config': {                                               │               │
│ │          │   │   │   │   'agentd_url': '35.239.77.162',                        │               │
│ │          │   │   │   │   'vm': None,                                           │               │
│ │          │   │   │   │   'storage_uri': 'file://.media',                       │               │
│ │          │   │   │   │   'type_min_interval': 0.05,                            │               │
│ │          │   │   │   │   'type_max_interval': 0.25,                            │               │
│ │          │   │   │   │   'move_mouse_duration': 1.0,                           │               │
│ │          │   │   │   │   'mouse_tween': 'easeInOutQuad',                       │               │
│ │          │   │   │   │   'store_img': False,                                   │               │
│ │          │   │   │   │   'requires_proxy': True,                               │               │
│ │          │   │   │   │   'proxy_type': 'process',                              │               │
│ │          │   │   │   │   ... +3                                                │               │
│ │          │   │   │   }                                                         │               │
│ │          │   │   },                                                            │               │
│ │          │   │   'device_type': None,                                          │               │
│ │          │   │   'status': 'defined',                                          │               │
│ │          │   │   'threads': [],                                                │               │
│ │          │   │   'prompts': [],                                                │               │
│ │          │   │   'assigned_to': 'surfpizza-visvesvaraya-ovpyy',                │               │
│ │          │   │   'assigned_type': None,                                        │               │
│ │          │   │   ... +12                                                       │               │
│ │          │   },                                                                │               │
│ │          │   'agent': None                                                     │               │
│ │          }                                                                     │               │
│ │ kwargs = {}                                                                    │               │
│ │    url = 'http://localhost:9091/v1/tasks'                                      │               │
│ ╰────────────────────────────────────────────────────────────────────────────────╯               │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/api.py:59 in request                                                                      │
│                                                                                                  │
│    56 │   # avoid leaving sockets open which can trigger a ResourceWarning in some               │
│    57 │   # cases, and look like a memory leak in others.                                        │
│    58 │   with sessions.Session() as session:                                                    │
│ ❱  59 │   │   return session.request(method=method, url=url, **kwargs)                           │
│    60                                                                                            │
│    61                                                                                            │
│    62 def get(url, params=None, **kwargs):                                                       │
│                                                                                                  │
│ ╭────────────────────────────────────── locals ───────────────────────────────────────╮          │
│ │  kwargs = {                                                                         │          │
│ │           │   'data': None,                                                         │          │
│ │           │   'json': {                                                             │          │
│ │           │   │   'task': {                                                         │          │
│ │           │   │   │   'id': '7654cee8-70d0-478e-bef7-a5b7dd35b793',                 │          │
│ │           │   │   │   'description': 'Search for common varieties of french ducks', │          │
│ │           │   │   │   'max_steps': 30,                                              │          │
│ │           │   │   │   'device': {                                                   │          │
│ │           │   │   │   │   'name': 'Desktop',                                        │          │
│ │           │   │   │   │   'config': {                                               │          │
│ │           │   │   │   │   │   'agentd_url': '35.239.77.162',                        │          │
│ │           │   │   │   │   │   'vm': None,                                           │          │
│ │           │   │   │   │   │   'storage_uri': 'file://.media',                       │          │
│ │           │   │   │   │   │   'type_min_interval': 0.05,                            │          │
│ │           │   │   │   │   │   'type_max_interval': 0.25,                            │          │
│ │           │   │   │   │   │   'move_mouse_duration': 1.0,                           │          │
│ │           │   │   │   │   │   'mouse_tween': 'easeInOutQuad',                       │          │
│ │           │   │   │   │   │   'store_img': False,                                   │          │
│ │           │   │   │   │   │   'requires_proxy': True,                               │          │
│ │           │   │   │   │   │   'proxy_type': 'process',                              │          │
│ │           │   │   │   │   │   ... +3                                                │          │
│ │           │   │   │   │   }                                                         │          │
│ │           │   │   │   },                                                            │          │
│ │           │   │   │   'device_type': None,                                          │          │
│ │           │   │   │   'status': 'defined',                                          │          │
│ │           │   │   │   'threads': [],                                                │          │
│ │           │   │   │   'prompts': [],                                                │          │
│ │           │   │   │   'assigned_to': 'surfpizza-visvesvaraya-ovpyy',                │          │
│ │           │   │   │   'assigned_type': None,                                        │          │
│ │           │   │   │   ... +12                                                       │          │
│ │           │   │   },                                                                │          │
│ │           │   │   'agent': None                                                     │          │
│ │           │   }                                                                     │          │
│ │           }                                                                         │          │
│ │  method = 'post'                                                                    │          │
│ │ session = <requests.sessions.Session object at 0x7f4bf2606f00>                      │          │
│ │     url = 'http://localhost:9091/v1/tasks'                                          │          │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯          │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/sessions.py:589 in request                                                                │
│                                                                                                  │
│   586 │   │   │   "allow_redirects": allow_redirects,                                            │
│   587 │   │   }                                                                                  │
│   588 │   │   send_kwargs.update(settings)                                                       │
│ ❱ 589 │   │   resp = self.send(prep, **send_kwargs)                                              │
│   590 │   │                                                                                      │
│   591 │   │   return resp                                                                        │
│   592                                                                                            │
│                                                                                                  │
│ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮  │
│ │ allow_redirects = True                                                                      │  │
│ │            auth = None                                                                      │  │
│ │            cert = None                                                                      │  │
│ │         cookies = None                                                                      │  │
│ │            data = None                                                                      │  │
│ │           files = None                                                                      │  │
│ │         headers = None                                                                      │  │
│ │           hooks = None                                                                      │  │
│ │            json = {                                                                         │  │
│ │                   │   'task': {                                                             │  │
│ │                   │   │   'id': '7654cee8-70d0-478e-bef7-a5b7dd35b793',                     │  │
│ │                   │   │   'description': 'Search for common varieties of french ducks',     │  │
│ │                   │   │   'max_steps': 30,                                                  │  │
│ │                   │   │   'device': {                                                       │  │
│ │                   │   │   │   'name': 'Desktop',                                            │  │
│ │                   │   │   │   'config': {                                                   │  │
│ │                   │   │   │   │   'agentd_url': '35.239.77.162',                            │  │
│ │                   │   │   │   │   'vm': None,                                               │  │
│ │                   │   │   │   │   'storage_uri': 'file://.media',                           │  │
│ │                   │   │   │   │   'type_min_interval': 0.05,                                │  │
│ │                   │   │   │   │   'type_max_interval': 0.25,                                │  │
│ │                   │   │   │   │   'move_mouse_duration': 1.0,                               │  │
│ │                   │   │   │   │   'mouse_tween': 'easeInOutQuad',                           │  │
│ │                   │   │   │   │   'store_img': False,                                       │  │
│ │                   │   │   │   │   'requires_proxy': True,                                   │  │
│ │                   │   │   │   │   'proxy_type': 'process',                                  │  │
│ │                   │   │   │   │   ... +3                                                    │  │
│ │                   │   │   │   }                                                             │  │
│ │                   │   │   },                                                                │  │
│ │                   │   │   'device_type': None,                                              │  │
│ │                   │   │   'status': 'defined',                                              │  │
│ │                   │   │   'threads': [],                                                    │  │
│ │                   │   │   'prompts': [],                                                    │  │
│ │                   │   │   'assigned_to': 'surfpizza-visvesvaraya-ovpyy',                    │  │
│ │                   │   │   'assigned_type': None,                                            │  │
│ │                   │   │   ... +12                                                           │  │
│ │                   │   },                                                                    │  │
│ │                   │   'agent': None                                                         │  │
│ │                   }                                                                         │  │
│ │          method = 'post'                                                                    │  │
│ │          params = None                                                                      │  │
│ │            prep = <PreparedRequest [POST]>                                                  │  │
│ │         proxies = {}                                                                        │  │
│ │             req = <Request [POST]>                                                          │  │
│ │            self = <requests.sessions.Session object at 0x7f4bf2606f00>                      │  │
│ │     send_kwargs = {                                                                         │  │
│ │                   │   'timeout': None,                                                      │  │
│ │                   │   'allow_redirects': True,                                              │  │
│ │                   │   'proxies': OrderedDict(),                                             │  │
│ │                   │   'stream': False,                                                      │  │
│ │                   │   'verify': True,                                                       │  │
│ │                   │   'cert': None                                                          │  │
│ │                   }                                                                         │  │
│ │        settings = {'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None} │  │
│ │          stream = None                                                                      │  │
│ │         timeout = None                                                                      │  │
│ │             url = 'http://localhost:9091/v1/tasks'                                          │  │
│ │          verify = None                                                                      │  │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯  │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/sessions.py:703 in send                                                                   │
│                                                                                                  │
│   700 │   │   start = preferred_clock()                                                          │
│   701 │   │                                                                                      │
│   702 │   │   # Send the request                                                                 │
│ ❱ 703 │   │   r = adapter.send(request, **kwargs)                                                │
│   704 │   │                                                                                      │
│   705 │   │   # Total elapsed time of the request (approximately)                                │
│   706 │   │   elapsed = preferred_clock() - start                                                │
│                                                                                                  │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮                   │
│ │         adapter = <requests.adapters.HTTPAdapter object at 0x7f4bf26992b0> │                   │
│ │ allow_redirects = True                                                     │                   │
│ │           hooks = {'response': []}                                         │                   │
│ │          kwargs = {                                                        │                   │
│ │                   │   'timeout': None,                                     │                   │
│ │                   │   'proxies': OrderedDict(),                            │                   │
│ │                   │   'stream': False,                                     │                   │
│ │                   │   'verify': True,                                      │                   │
│ │                   │   'cert': None                                         │                   │
│ │                   }                                                        │                   │
│ │         request = <PreparedRequest [POST]>                                 │                   │
│ │            self = <requests.sessions.Session object at 0x7f4bf2606f00>     │                   │
│ │           start = 1716240841.9524841                                       │                   │
│ │          stream = False                                                    │                   │
│ ╰────────────────────────────────────────────────────────────────────────────╯                   │
│                                                                                                  │
│ /home/user/.cache/pypoetry/virtualenvs/surfpizza-Ek0KzNMu-py3.12/lib/python3.12/site-packages/re │
│ quests/adapters.py:519 in send                                                                   │
│                                                                                                  │
│   516 │   │   │   │   # This branch is for urllib3 v1.22 and later.                              │
│   517 │   │   │   │   raise SSLError(e, request=request)                                         │
│   518 │   │   │                                                                                  │
│ ❱ 519 │   │   │   raise ConnectionError(e, request=request)                                      │
│   520 │   │                                                                                      │
│   521 │   │   except ClosedPoolError as e:                                                       │
│   522 │   │   │   raise ConnectionError(e, request=request)                                      │
│                                                                                                  │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮               │
│ │    cert = None                                                                 │               │
│ │ chunked = False                                                                │               │
│ │    conn = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f4bf269bad0> │               │
│ │ proxies = OrderedDict()                                                        │               │
│ │ request = <PreparedRequest [POST]>                                             │               │
│ │    self = <requests.adapters.HTTPAdapter object at 0x7f4bf26992b0>             │               │
│ │  stream = False                                                                │               │
│ │ timeout = Timeout(connect=None, read=None, total=None)                         │               │
│ │     url = '/v1/tasks'                                                          │               │
│ │  verify = True                                                                 │               │
│ ╰────────────────────────────────────────────────────────────────────────────────╯               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionError: HTTPConnectionPool(host='localhost', port=9091): Max retries exceeded with url: /v1/tasks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object 
at 0x7f4bf26996a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
SSH proxy with PID 299186 terminated.
No process found with PID 298123.
user@computer:~/twerkspace/kentaur/surfpizza$ poetry run surfkit list trackers
Name              Runtime      Port  Status
----------------  ---------  ------  --------
mystifying-haibt  docker       9070  running

user@computer:~/twerkspace/kentaur/surfpizza$ docker ps
CONTAINER ID   IMAGE                                                                 COMMAND                  CREATED       STATUS       PORTS                                         NAMES
abf1d5a55444   us-central1-docker.pkg.dev/agentsea-dev/guisurfer/surfkit-ui:latest   "docker-entrypoint.s…"   3 hours ago   Up 3 hours   0.0.0.0:37831->3000/tcp, :::37831->3000/tcp   brave_swanson
df6943c29936   f4063f113a1b                                                          "poetry run python -…"   3 hours ago   Up 3 hours   0.0.0.0:9070->9070/tcp, :::9070->9070/tcp     mystifying-haibt
user@computer:~/twerkspace/kentaur/surfpizza$ docker logs df6
2024-05-20 18:18:59 [1] [INFO] Started server process [1]
2024-05-20 18:18:59 [1] [INFO] Waiting for application startup.
2024-05-20 18:18:59 [1] [INFO] Application startup complete.
2024-05-20 18:18:59 [1] [INFO] Uvicorn running on http://0.0.0.0:9070 (Press CTRL+C to quit)
2024-05-20 18:51:21 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989
2024-05-20 18:51:21 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989: 404
2024-05-20 18:51:21 [1] [INFO] 172.17.0.1:49632 - "GET /v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989 HTTP/1.1" 404
2024-05-20 18:51:21 [1] [INFO] Received request: POST http://localhost:9070/v1/tasks
2024-05-20 18:51:21 [1] [INFO] Returned response POST http://localhost:9070/v1/tasks: 200
2024-05-20 18:51:21 [1] [INFO] 172.17.0.1:49644 - "POST /v1/tasks HTTP/1.1" 200
2024-05-20 18:51:21 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989/threads
2024-05-20 18:51:21 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989/threads: 200
2024-05-20 18:51:21 [1] [INFO] 172.17.0.1:49646 - "GET /v1/tasks/45e9136e-0c9a-4feb-9ae6-fcbc6fbac989/threads HTTP/1.1" 200
2024-05-20 18:51:31 [1] [INFO] 172.17.0.1:49684 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 18:51:31 [1] [INFO] 172.17.0.1:49684 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 18:55:10 [1] [INFO] 172.17.0.1:38002 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 18:55:10 [1] [INFO] 172.17.0.1:38002 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:11:36 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/a160fab6-581f-4023-a040-726cbac45677
2024-05-20 20:11:36 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/a160fab6-581f-4023-a040-726cbac45677: 404
2024-05-20 20:11:36 [1] [INFO] 172.17.0.1:50214 - "GET /v1/tasks/a160fab6-581f-4023-a040-726cbac45677 HTTP/1.1" 404
2024-05-20 20:11:36 [1] [INFO] Received request: POST http://localhost:9070/v1/tasks
2024-05-20 20:11:36 [1] [INFO] Returned response POST http://localhost:9070/v1/tasks: 200
2024-05-20 20:11:36 [1] [INFO] 172.17.0.1:50224 - "POST /v1/tasks HTTP/1.1" 200
2024-05-20 20:11:36 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/a160fab6-581f-4023-a040-726cbac45677/threads
2024-05-20 20:11:36 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/a160fab6-581f-4023-a040-726cbac45677/threads: 200
2024-05-20 20:11:36 [1] [INFO] 172.17.0.1:50236 - "GET /v1/tasks/a160fab6-581f-4023-a040-726cbac45677/threads HTTP/1.1" 200
2024-05-20 20:11:37 [1] [INFO] 172.17.0.1:50238 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:11:37 [1] [INFO] 172.17.0.1:50240 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:14:08 [1] [INFO] 172.17.0.1:43226 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:14:08 [1] [INFO] 172.17.0.1:43242 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:14:12 [1] [INFO] 172.17.0.1:43242 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 20:14:12 [1] [INFO] 172.17.0.1:43242 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 21:34:01 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793
2024-05-20 21:34:01 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793: 404
2024-05-20 21:34:01 [1] [INFO] 172.17.0.1:59788 - "GET /v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793 HTTP/1.1" 404
2024-05-20 21:34:01 [1] [INFO] Received request: POST http://localhost:9070/v1/tasks
2024-05-20 21:34:01 [1] [INFO] Returned response POST http://localhost:9070/v1/tasks: 200
2024-05-20 21:34:01 [1] [INFO] 172.17.0.1:59796 - "POST /v1/tasks HTTP/1.1" 200
2024-05-20 21:34:01 [1] [INFO] Received request: GET http://localhost:9070/v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793/threads
2024-05-20 21:34:01 [1] [INFO] Returned response GET http://localhost:9070/v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793/threads: 200
2024-05-20 21:34:01 [1] [INFO] 172.17.0.1:59804 - "GET /v1/tasks/7654cee8-70d0-478e-bef7-a5b7dd35b793/threads HTTP/1.1" 200
2024-05-20 21:34:03 [1] [INFO] 172.17.0.1:59822 - "OPTIONS /v1/tasks HTTP/1.1" 400
2024-05-20 21:34:03 [1] [INFO] 172.17.0.1:59806 - "OPTIONS /v1/tasks HTTP/1.1" 400
user@computer:~/twerkspace/kentaur/surfpizza$ cat ~/.agentsea/logs/
foo.log                       surfpizza-bhaskara-141a0.log  surfpizza-knuth-ynqll.log     
surfpizza-bell-vqj21.log      surfpizza-boyd-yw0da.log      test0-johnson-npvg3.log       
user@computer:~/twerkspace/kentaur/surfpizza$ cat ~/.agentsea/logs/
foo.log                       surfpizza-bhaskara-141a0.log  surfpizza-knuth-ynqll.log     
surfpizza-bell-vqj21.log      surfpizza-boyd-yw0da.log      test0-johnson-npvg3.log       
user@computer:~/twerkspace/kentaur/surfpizza$ cat ~/.agentsea/logs/surfpizza-viszc^C
(reverse-i-search)`agent': cat ~/.^Centsea/logs/surfpizza-bell-vqj21.log 
user@computer:~/twerkspace/kentaur/surfpizza$ poetry run surfkit list agents
Name                          Kind       Type       Runtime    Status      Port
----------------------------  ---------  ---------  ---------  --------  ------
surfpizza-visvesvaraya-ovpyy  TaskAgent  SurfPizza  docker     running     9091
surfpizza-knuth-ynqll         TaskAgent  SurfPizza  process    running     9090
surfpizza-liskov-jrnhm        TaskAgent  SurfPizza  docker     running     9090
surfpizza-almeida-7s3wm       TaskAgent  SurfPizza  docker     running     9090

user@computer:~/twerkspace/kentaur/surfpizza$ docker ps
CONTAINER ID   IMAGE                                                                 COMMAND                  CREATED       STATUS       PORTS                                         NAMES
abf1d5a55444   us-central1-docker.pkg.dev/agentsea-dev/guisurfer/surfkit-ui:latest   "docker-entrypoint.s…"   3 hours ago   Up 3 hours   0.0.0.0:37831->3000/tcp, :::37831->3000/tcp   brave_swanson
df6943c29936   f4063f113a1b                                                          "poetry run python -…"   3 hours ago   Up 3 hours   0.0.0.0:9070->9070/tcp, :::9070->9070/tcp     mystifying-haibt