22
33from __future__ import annotations
44
5- from typing import Dict , List , Optional
5+ from typing import Dict , List , Union , Optional
6+ from datetime import datetime
67from typing_extensions import Literal
78
89import httpx
910
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
1112from .._types import NOT_GIVEN , Body , Query , Headers , NotGiven
1213from .._utils import maybe_transform , async_maybe_transform
1314from .._compat import cached_property
2021)
2122from .._base_client import make_request_options
2223from ..types .task_view import TaskView
24+ from ..types .task_status import TaskStatus
2325from ..types .task_list_response import TaskListResponse
2426from ..types .task_create_response import TaskCreateResponse
2527from ..types .task_get_logs_response import TaskGetLogsResponse
@@ -280,8 +282,9 @@ def update(
280282 def list (
281283 self ,
282284 * ,
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 ,
285288 page_number : int | NotGiven = NOT_GIVEN ,
286289 page_size : int | NotGiven = NOT_GIVEN ,
287290 session_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -293,32 +296,26 @@ def list(
293296 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
294297 ) -> TaskListResponse :
295298 """
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.
297300
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
300303 works on, such as filling out a form, extracting data, or navigating to specific
301304 pages.
302305
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-
309306 Returns:
310307
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
313310 - Page information for navigation
314- - Optional detailed data based on your parameters
315311
316312 Args:
317- filter_by: Enumeration of possible task filters
313+ filter_by: Enumeration of possible task execution states
318314
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).
322319
323320 extra_headers: Send extra headers
324321
@@ -337,6 +334,8 @@ def list(
337334 timeout = timeout ,
338335 query = maybe_transform (
339336 {
337+ "after" : after ,
338+ "before" : before ,
340339 "filter_by" : filter_by ,
341340 "page_number" : page_number ,
342341 "page_size" : page_size ,
@@ -778,8 +777,9 @@ async def update(
778777 async def list (
779778 self ,
780779 * ,
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 ,
783783 page_number : int | NotGiven = NOT_GIVEN ,
784784 page_size : int | NotGiven = NOT_GIVEN ,
785785 session_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -791,32 +791,26 @@ async def list(
791791 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
792792 ) -> TaskListResponse :
793793 """
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.
795795
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
798798 works on, such as filling out a form, extracting data, or navigating to specific
799799 pages.
800800
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-
807801 Returns:
808802
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
811805 - Page information for navigation
812- - Optional detailed data based on your parameters
813806
814807 Args:
815- filter_by: Enumeration of possible task filters
808+ filter_by: Enumeration of possible task execution states
816809
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).
820814
821815 extra_headers: Send extra headers
822816
@@ -835,6 +829,8 @@ async def list(
835829 timeout = timeout ,
836830 query = await async_maybe_transform (
837831 {
832+ "after" : after ,
833+ "before" : before ,
838834 "filter_by" : filter_by ,
839835 "page_number" : page_number ,
840836 "page_size" : page_size ,
0 commit comments