Create an AgentΒΆ

Initially, you must create an agent through the registration API:

curl -X 'POST' "${NLU_HOST}/nlu/v1/agents" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "meu_agente",
    "description": "Meu primeiro agente"
  }'

The agent ID ${agent_id} can be retrieved in the API response, for example:

{
  "id": "613b6c9938e7c013690385b1",
  "name": "meu_agente",
  "create_time": "2021-09-10 11:32:57.282000",
  "description": "Meu primeiro agente"
}

In this example, we can do:

export agent_id=613b6c9938e7c013690385b1

The agent ID will be used in other API calls.

For more information, refer to Create agent.