Skip to content

Assign Task

Assign a new task to an existing agent.

Parameters:

Name Type Description Default
request_body dict

JSON body with at least: - "agent_id": The ID of the agent to assign the task. - "description": The task description.

required

Returns:

Name Type Description
dict Dict[str, Any]

JSON response from the server, typically including task_id, agent_id, and status.

Sample usage:

from anoteai import Anote

api_key = 'INSERT_API_KEY_HERE'
anote = Anote(api_key=api_key)

task_request = {
  "agent_id": 123,
  "description": "Research the latest data on housing prices in San Francisco."
}

response = anote.assign_task(task_request)
print(response)
Response (JSON):

{
  "task_id": 456,
  "agent_id": 123,
  "description": "Research the latest data on housing prices in San Francisco.",
  "status": "assigned"
}