Functions

Configure your agent to perform special functions on your system like sending and getting data in a chain process. You can chain multiple functions to fully automate a process or flow.

Functions are only available when you select the text output. Functions can be long running so function responses are sent to your configured api web hook url

To configure a function, you need to define the function name, description, api and parameters.

The parameters are sent to the function api in a POST request.

The function API field requires your system api . See below the expected response of your api:

API request format

Sample Request from the Agent

When a function is configured, the agent sends hooks to the api which includes configured input parameters from the agent gotten from an interaction with a user . Each function can have different apis or same api as long as each request and response is handled properly

// Request with parameters

{
    "function": "create_user"
    "name": "name",
    "email": "email"
}

API response format

Name
Type
Required
Description

type

string

no

Setting this allows the AI to process your response and determine the next step in your process.

message

string

yes

Response message from your api. This will be returned as a response

data

Array of items

no

JSON Array of items from your software See data response parameter for actionable items

data_display_type

string

no

Default is card. This currently only supports "card" display for the embedded chat tool

item

Name
Type
Required
Decription

title

string

yes

name of the item

image

string

no

public image url of the item

information

string

no

information/description of item

metadata

Array

no

Array of key value pair of additional information

actions

Array

no

Array of text-url pair of clickable actions

Sample Response to the Agent

//Text Response
{
  "message": "User profile registered"
}

Next, explore how to setup your function parameters for your software.

Last updated

Was this helpful?