Control the execution of an AI agent task.
Allows you to pause, resume, or stop tasks, and optionally stop the entire session. This is useful for:
Available actions:
Args:
Returns:
Raises:
Request model for updating task state
Attributes: action: The action to perform on the task
Successful Response
View model for representing a task with its execution details
Attributes: id: Unique identifier for the task session_id: ID of the session this task belongs to session: The session this task belongs to llm: The LLM model used for this task represented as a string task: The task prompt/instruction given to the agent status: Current status of the task execution started_at: Naive UTC timestamp when the task was started finished_at: Naive UTC timestamp when the task completed (None if still running) metadata: Optional additional metadata associated with the task set by the user is_scheduled: Whether this task was created as a scheduled task steps: List of execution steps done_output: Final output/result of the task user_uploaded_files: List of files uploaded by user for this task output_files: List of files generated as output by this task browser_use_version: Version of browser-use used for this task (older tasks may not have this set) is_success: Whether the task was successful (self-reported by the agent)