2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Dict , List , Optional
5
+ from typing import Dict , List , Union , Optional
6
+ from datetime import datetime
6
7
from typing_extensions import Literal
7
8
8
9
import httpx
9
10
10
- from ..types import task_list_params , task_create_params , task_update_params
11
+ from ..types import TaskStatus , task_list_params , task_create_params , task_update_params
11
12
from .._types import NOT_GIVEN , Body , Query , Headers , NotGiven
12
13
from .._utils import maybe_transform , async_maybe_transform
13
14
from .._compat import cached_property
20
21
)
21
22
from .._base_client import make_request_options
22
23
from ..types .task_view import TaskView
24
+ from ..types .task_status import TaskStatus
23
25
from ..types .task_list_response import TaskListResponse
24
26
from ..types .task_create_response import TaskCreateResponse
25
27
from ..types .task_get_logs_response import TaskGetLogsResponse
@@ -280,8 +282,9 @@ def update(
280
282
def list (
281
283
self ,
282
284
* ,
283
- filter_by : Optional [Literal ["started" , "paused" , "stopped" , "finished" , "successful" , "unsuccessful" ]]
284
- | NotGiven = NOT_GIVEN ,
285
+ after : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
286
+ before : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
287
+ filter_by : Optional [TaskStatus ] | NotGiven = NOT_GIVEN ,
285
288
page_number : int | NotGiven = NOT_GIVEN ,
286
289
page_size : int | NotGiven = NOT_GIVEN ,
287
290
session_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -293,32 +296,26 @@ def list(
293
296
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
294
297
) -> TaskListResponse :
295
298
"""
296
- Get a paginated list of all AI agent tasks for the authenticated user.
299
+ Get a paginated list of all Browser Use Agent tasks for the authenticated user.
297
300
298
- AI agent tasks are the individual jobs that your agents perform within a
299
- session. Each task represents a specific instruction or goal that the agent
301
+ Browser Use Agent tasks are the individual jobs that your agents perform within
302
+ a session. Each task represents a specific instruction or goal that the agent
300
303
works on, such as filling out a form, extracting data, or navigating to specific
301
304
pages.
302
305
303
- You can control what data is included for each task:
304
-
305
- - Task steps: Detailed actions the agent took
306
- - User uploaded files: Files you provided for the task
307
- - Output files: Files generated by the agent during the task
308
-
309
306
Returns:
310
307
311
- - A paginated list of agent tasks
312
- - Total count of tasks
308
+ - A paginated list of Browser Use Agent tasks
309
+ - Total count of Browser Use Agent tasks
313
310
- Page information for navigation
314
- - Optional detailed data based on your parameters
315
311
316
312
Args:
317
- filter_by: Enumeration of possible task filters
313
+ filter_by: Enumeration of possible task execution states
318
314
319
- Attributes: STARTED: All started tasks PAUSED: All paused tasks STOPPED: All
320
- stopped tasks FINISHED: All finished tasks SUCCESSFUL: All successful tasks
321
- UNSUCCESSFUL: All unsuccessful tasks
315
+ Attributes: STARTED: Task has been started and is currently running. PAUSED:
316
+ Task execution has been temporarily paused (can be resumed) FINISHED: Task has
317
+ finished and the agent has completed the task. STOPPED: Task execution has been
318
+ manually stopped (cannot be resumed).
322
319
323
320
extra_headers: Send extra headers
324
321
@@ -337,6 +334,8 @@ def list(
337
334
timeout = timeout ,
338
335
query = maybe_transform (
339
336
{
337
+ "after" : after ,
338
+ "before" : before ,
340
339
"filter_by" : filter_by ,
341
340
"page_number" : page_number ,
342
341
"page_size" : page_size ,
@@ -778,8 +777,9 @@ async def update(
778
777
async def list (
779
778
self ,
780
779
* ,
781
- filter_by : Optional [Literal ["started" , "paused" , "stopped" , "finished" , "successful" , "unsuccessful" ]]
782
- | NotGiven = NOT_GIVEN ,
780
+ after : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
781
+ before : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
782
+ filter_by : Optional [TaskStatus ] | NotGiven = NOT_GIVEN ,
783
783
page_number : int | NotGiven = NOT_GIVEN ,
784
784
page_size : int | NotGiven = NOT_GIVEN ,
785
785
session_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -791,32 +791,26 @@ async def list(
791
791
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
792
792
) -> TaskListResponse :
793
793
"""
794
- Get a paginated list of all AI agent tasks for the authenticated user.
794
+ Get a paginated list of all Browser Use Agent tasks for the authenticated user.
795
795
796
- AI agent tasks are the individual jobs that your agents perform within a
797
- session. Each task represents a specific instruction or goal that the agent
796
+ Browser Use Agent tasks are the individual jobs that your agents perform within
797
+ a session. Each task represents a specific instruction or goal that the agent
798
798
works on, such as filling out a form, extracting data, or navigating to specific
799
799
pages.
800
800
801
- You can control what data is included for each task:
802
-
803
- - Task steps: Detailed actions the agent took
804
- - User uploaded files: Files you provided for the task
805
- - Output files: Files generated by the agent during the task
806
-
807
801
Returns:
808
802
809
- - A paginated list of agent tasks
810
- - Total count of tasks
803
+ - A paginated list of Browser Use Agent tasks
804
+ - Total count of Browser Use Agent tasks
811
805
- Page information for navigation
812
- - Optional detailed data based on your parameters
813
806
814
807
Args:
815
- filter_by: Enumeration of possible task filters
808
+ filter_by: Enumeration of possible task execution states
816
809
817
- Attributes: STARTED: All started tasks PAUSED: All paused tasks STOPPED: All
818
- stopped tasks FINISHED: All finished tasks SUCCESSFUL: All successful tasks
819
- UNSUCCESSFUL: All unsuccessful tasks
810
+ Attributes: STARTED: Task has been started and is currently running. PAUSED:
811
+ Task execution has been temporarily paused (can be resumed) FINISHED: Task has
812
+ finished and the agent has completed the task. STOPPED: Task execution has been
813
+ manually stopped (cannot be resumed).
820
814
821
815
extra_headers: Send extra headers
822
816
@@ -835,6 +829,8 @@ async def list(
835
829
timeout = timeout ,
836
830
query = await async_maybe_transform (
837
831
{
832
+ "after" : after ,
833
+ "before" : before ,
838
834
"filter_by" : filter_by ,
839
835
"page_number" : page_number ,
840
836
"page_size" : page_size ,
0 commit comments