For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to configure a custom function

Accessing the functions section

To create a new custom function in AIsuru, follow these steps:

  1. Go to your Agent's management panel;

  2. Select "Functions" in the sidebar;

  3. Click the "Advanced functions" tab at the top of the page;

  4. Press "New function" to start the configuration.

Configuring a new function

On the new function creation screen, you'll need to fill in the following fields:

Basic information

  • Name: enter a unique, descriptive name for your function. This name is used internally by the system to identify the function.

    • Limit: the name can be at most 64 characters

    • Format: use only letters, numbers, and underscores (_), no spaces or special characters

    • Valid examples: get_weather, search_products, send_customer_email

  • Description: provide a complete description of the function — you should always specify:

    • What the function does

    • When to use it

    • What output it should return and how to format it

This description is essential because it helps the generative AI understand when and how to use the function in a conversation.

Note: If you use OpenAI models (like GPT-4o and GPT-4o mini), the description can't exceed 1,024 characters. If you need a longer description, we recommend using other models for Q&A, or moving part of the description into the instructions.

Function description examples

Example of a function for sending emails

Example of a function for searching products in a catalog

Webhook configuration

  • Webhook: enter the full web address that will be called when the function is triggered. For example, if you use Zapier, you'll need to enter the address Zapier provides (this is called a webhook).

  • HTTP method: select the appropriate HTTP method for your webhook request. The choice depends on the action the function needs to perform:

    • GET (default) -> to retrieve information, like reading an article online

    • POST -> to send new information, like submitting a form

    • PATCH -> to partially modify existing information, like updating only some fields in an online profile;

    • DELETE -> to delete information, like removing an account

✅ If you don't need to pass parameters or other information, you can stop here.

Request details

If you need to send additional information to your service (like a name, a date, or an email address), you may need to specify more details:

  • HTTP headers: here you can add extra information needed for your request. This may include access codes or other details required by the service you're using. Press "Add" to add information to the request header.

  • Query string template: define the format of the information to send in the URL. Use {parameter} to indicate where variable values should go. E.g. location={city}&period={date}. City and date are variables (or "parameters").

  • HTTP body template: specify the information to send in the request body. Same as above, use {parameter} to indicate where variable values should go.

Contextual information

Send extension headers: select the additional conversation information you want to include in the request:

  • Session ID;

  • User tags;

  • Current date and time;

  • Location;

  • Context;

  • User email.

Parameter definition

In the "Parameters" section, you can define the dynamic values (variables) that your function will accept.

To add a parameter, click "Add" and specify:

  • Name: the parameter name that will be used (the one you put in curly braces, for example "city" if you wrote "location={city}" in the request details);

  • Description: a detailed description of what the parameter represents; more detail means greater accuracy from the AI;

  • Type: specify whether the parameter is a string, number, integer, or boolean;

  • Possible values: click the "add" button to enter possible values;

  • Required: this field tells the AI whether the parameter is mandatory or optional: if you're asking for weather data, the city is probably required, while the scale (Celsius or Fahrenheit) might be optional.

These parameters represent values that the AI can ask the user for or infer from the conversation.

Testing the function

Before deploying your function, we recommend testing it:

  1. On your function's configuration page, press "Test"

  2. Enter sample values for the defined parameters

  3. Click "Run test" to verify the function performs as expected

This step lets you identify and fix any issues before putting the function into production.

Last updated