Skip to main content
Version: 1.0.2

Generate an agent

Now that we have a company, we can generate our agent. For the purposes of this tutorial, we'll be using a standard template supplied by us. You can find information on template lists and template creation in the following section: Templates. We'll use this template ID : XXXX.

In order to generate an agent, we need several pieces of information:

  • companyId: The company ID you previously stored.
  • templateId: The ID of the template you want to use. In our case, we'll use the one specified above.
  • name: The agent name, which will be used on the various interfaces provided.
curl -X POST
-H "Authorization: Bearer <APIKEY>"
-H "Content-Type: application/json"
-d '{"companyId": "", "templateId": "", "name": ""}'
{{baseUrl}}/api/agents

If everything works fine, API should return you this data.

{
"id": "ObjectID",
"name": "My First Agent",
"personalityId": "ObjectID",
"referee": {},
"scenarios": {},
"sentences": {},
"settings": {},
"setup": {},
"variables": {},
"partnerId": "ObjectID",
"companyId": "ObjectID",
"updatedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z"
}