Create and configure an agent

Guidelines for the configuration of ATRIA by use cases constructors when developing an experience by means of an agent

Introduction

An agent is a configuration entity in ATRIA that represents an integration point for external channels, services, or platforms.

Each agent defines how ATRIA communicates with and manages sessions for a specific external system, specifying connection details, session parameters, and operational metadata.

Agents are referenced by applications to enable channel or service connectivity within the platform.

Guidelines to configure an agent

1. Create a new agent

  • Build the agent for your use case (json file), using the available agent fields.

  • When the agent json file is generated, execute this command to include it:

    curl --location --request POST 'https://svc-<env>.auracognitive.com/aura-services/v2/configuration/agents/' \
      --header 'Content-Type: application/json' \
      --header 'Accept: application/json' \
      --header 'Authorization: APIKEY XXX' \
      --data-raw '<NEW AGENT JSON>'
    

1.1. Modify/update an agent

If once created, certain modifications are required, follow these instructions:

  • Make the required changes in the agent json file using the available agent fields.

  • When the agent is modified, execute this command to update it:

    curl --location --request PUT 'https://svc-<env>.auracognitive.com/aura-services/v2/configuration/agents/<agentID>' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: APIKEY XXX' \
      --data '<AGENT JSON WITH MODIFICATIONS>'
    

1.2. Delete an agent

  • Execute the following command:

    curl --location --request DELETE 'https://svc-<env>.auracognitive.com/aura-services/v2/configuration/agents/<agentId>' \
      --header 'Accept: application/json' \
      --header 'Authorization: APIKEY XXX'
    

2. Include the agent in the application

If the application for your use case does not exist, first create it following the guidelines for the configuration of an application.

Once the application is created, assign the created agent in the field agents.

If you update or delete an agent, ensure that any application referencing it is also updated accordingly.
Remember that agents must exist to be inserted in an application.

Example to update the list of agents in an application:

curl --location --request PATCH 'https://svc-<env>.auracognitive.com/aura-services/v1/applications/<applicationId>' \
  --header 'Accept: application/json' \
  --header 'Authorization: APIKEY XXX' \
  --data '{
    "id": "<applicationId>",
    "agents": [
      "<agentId1>",
      "<agentId2>"
    ]
  }'

Agent fields

The fields for the characterization of an agent are summarized below, as defined in the API swagger Aura Configuration ATRIA Agents:

Field Type Mandatory Description
id string Yes Unique identifier (UUID) for the agent.
name string Yes Name that uniquely identifies the agent in Aura.
description string No Description of the agent.
communication object Yes Parameters for the configuration of the communication flow. See communication configuration.
flowConfig object No Configuration of the agent flow.
deploymentName string No Name of the deployment where the agent is running.
If the endpoint field is not present in communication, this field will be used to route requests to the agent.
metadata object No Document metadata (version, createdAt, updatedAt, etc). See metadata.

Communication configuration (communication)

Field Type Mandatory Description
communicationType string Yes Type of communication. Only http is currently supported.
endpoint string No HTTP endpoint where the agent listens.
headers object No HTTP headers associated with the agent.
timeout number No Timeout for agent communication.
retries number No Number of retries for communication.

Metadata (metadata)

Field Type Mandatory Description
version string No Configuration version when the document was created.
createdAt string No Creation date (ISO 8601).
updatedAt string No Last update date (ISO 8601).

Example: Minimal agent configuration

{
  "id": "b1e2c3d4-5678-1234-9abc-def012345678",
  "name": "example-agent",
  "communication": {
    "communicationType": "http",
    "endpoint": "https://agent.example.com/webhook"
  }
}

Example: Full agent configuration

{
  "id": "b1e2c3d4-5678-1234-9abc-def012345678",
  "name": "example-agent",
  "description": "Agent for integration with Example Service",
  "communication": {
    "communicationType": "http",
    "endpoint": "https://agent.example.com/webhook",
    "headers": {
      "Authorization": "Bearer <token>"
    },
    "timeout": 30,
    "retries": 3
  },
  "flowConfig": {},
  "deploymentName": "example-deployment",
  "metadata": {
    "version": "1.0.0",
    "createdAt": "2024-05-30T10:00:00Z",
    "updatedAt": "2024-05-30T12:00:00Z"
  }
}

Note:

  • The id, name, and communication fields are mandatory.
  • The communicationType must be http.
  • If an agent is deleted, applications referencing it will be updated.