Vorsto Docs
  • Get Started
  • Getting Started
    • Create Agent
    • Configure Agent
    • Functions
    • Parameters
  • API
    • Authentication
    • Request
    • Object Response
    • Text Response
    • API Web Hook
    • IP Whitelisting
  • 3rd Party Models
    • GPT
    • Gemini
Powered by GitBook
On this page
  • API request format
  • API response format
  • item

Was this helpful?

  1. Getting Started

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.

PreviousConfigure AgentNextParameters

Last updated 6 months ago

Was this helpful?

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

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"
}
// Request with no parameters

{
    "function": "refresh_cache"
}

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

no

data_display_type

string

no

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

The "type" field is uses the message field to instruct the agent on next steps for chain processes. Hence, do not set the "type" field when the data field is being returned.

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"
}
//Text Response  passed with additional instriuctions to the agent
{
  "type": "instruct",
  "message": "User profile registered, is the user eligible for credit?"
}
//Response with data from your platform
{
  "message": "here is a list of items in our inventory",
  "data_display_type": "card",
  "data": [
              {
                "title": "My First Item",
                "image": "https://link/to/my/image.extension",
                "information": "Brief information", 
                "metadata": [
                  {
                    "key1": "value1"
                  },
                  {
                    "key2": "value2"
                  }
                ], 
                "actions": [
                    {
                      "text": "Select",
                      "instruct": "User selected My First Item, Proceed to next instruction",
                    },
                    {
                      "text": "Select",
                      "link": "http://link/to/item",
                    }
                ], 
              }
          ]
}

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

Array of

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

items
items
configured api web hook url