Listen as agent

Establishes a server streaming connection that delivers tasks to taskable agents for execution. This method creates a persistent connection from Tasks API to an agent, allowing the server to push tasks to the agent as they become available. The agent receives a stream of tasks that match its selector criteria (entity IDs). The stream delivers three types of requests: - ExecuteRequest: Contains a new task for the agent to execute - CancelRequest: Indicates a task should be canceled - CompleteRequest: Indicates a task should be completed This is the primary method for taskable agents to receive and process tasks in real-time. Agents should maintain this connection and process incoming tasks according to their capabilities. When an agent receives a task, it should update the task status using the UpdateStatus endpoint to provide progress information back to Tasks API. This is a long polling API that will block until a new task is ready for delivery. If no new task is available then the server will hold on to your request for up to 5 minutes, after that 5 minute timeout period you will be expected to reinitiate a new request.

Request

This endpoint expects an object.
agentSelectorobjectOptional
Selector criteria to determine which Agent Tasks the agent receives

Response

Requests for the agent to comply with.
executeRequestobject or null
The request to execute a task. Contains the unique ID of the task to execute.
cancelRequestobject or null
The request to cancel a task. Contains the task, and the assignee of the request to cancel the task.
completeRequestobject or null
The request to complete a task. Contains the unique ID of the task to complete.

Errors