Get Task by ID
tasks.retrieve(strtask_id, TaskRetrieveParams**kwargs) -> TaskRetrieveResponse
GET/tasks/{task_id}
Get a task by its unique ID.
Get Task by ID
import os
from agentex import Agentex
client = Agentex(
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
)
task = client.tasks.retrieve(
task_id="task_id",
)
print(task.id){
"id": "id",
"agents": [
{
"id": "id",
"acp_type": "sync",
"created_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"agent_input_type": "text",
"production_deployment_id": "production_deployment_id",
"registered_at": "2019-12-27T18:11:19.117Z",
"registration_metadata": {
"foo": "bar"
},
"status": "Ready",
"status_reason": "status_reason"
}
],
"cleaned_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"name": "name",
"params": {
"foo": "bar"
},
"status": "CANCELED",
"status_reason": "status_reason",
"task_metadata": {
"foo": "bar"
},
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"agents": [
{
"id": "id",
"acp_type": "sync",
"created_at": "2019-12-27T18:11:19.117Z",
"description": "description",
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"agent_input_type": "text",
"production_deployment_id": "production_deployment_id",
"registered_at": "2019-12-27T18:11:19.117Z",
"registration_metadata": {
"foo": "bar"
},
"status": "Ready",
"status_reason": "status_reason"
}
],
"cleaned_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"name": "name",
"params": {
"foo": "bar"
},
"status": "CANCELED",
"status_reason": "status_reason",
"task_metadata": {
"foo": "bar"
},
"updated_at": "2019-12-27T18:11:19.117Z"
}