AIsuru functions
AIsuru offers a set of built-in, ready-to-use functions that let your Agent interact with the outside world. These functions are already configured and can be enabled easily — but they do require careful setup in the Agent's instructions to be used effectively.
Overview of available functions
AIsuru offers seven main built-in functions:
Context variables: let the Agent dynamically manage conversation topics;
Artifacts: create and download interactive content in various formats (HTML, CSS, JavaScript, JSON, markdown, svg, etc.) directly in the chat;
Send email: lets the Agent send email communications to registered users;
Convert OpenAPI to functions: automatically generates functions from OpenAPI specifications;
Create function from file: lets the Agent access a file during conversations;
Perplexity Search: lets the Agent perform intelligent web searches with AI-synthesized results;
Emotions: lets your Agent express emotions through facial expressions and animations when displayed with a 3D avatar.
You can start using them right away — just enable the toggle for the function you want to use inside your Agent!
Keep in mind, though, that to simplify the interaction and improve the user experience, you'll need to explain to the Agent how and when to use them in its instructions.
Let's look at each one in detail 👇
1. Context variables
Context variables let your Agent dynamically manage conversation contexts.
This function is particularly useful for:
Automatically applying specific contexts based on the user's responses;
Removing contexts when they're no longer relevant;
Naturally guiding the conversation between different topics.
How it works
The generative AI can:
Set a new context when it detects a topic change;
Remove a context when the topic is no longer relevant;
Use multiple contexts at the same time to respond accurately.
Setting it up in the instructions
It's important to guide the Agent in its use of context variables through the instructions, specifying:
Which contexts it can apply (be precise about the context to apply);
When to apply the different contexts;
How to handle transitions between contexts: which contexts are compatible and when to remove ones that are no longer relevant.
For example:
2. Artifacts
What they are
Artifacts are content your Agent can create inside the chat with the user. This content can be used interactively, downloaded, and shared.
The Agent can create any type of file using artifacts, for example:
Interactive web pages: a single HTML file containing CSS and JS code;
Text files: such as txt and markdown;
CSV, SVG, and other file types.
How they work
Once the Artifacts function is enabled, your Agent can immediately start creating this content. To guide it more precisely, remember to explain in the instructions when it should use artifacts and how.
During the conversation, if the Agent creates an artifact, the user will see it in a separate panel on the right side of the page.
Interacting with artifacts
At the top of each artifact there's a toolbar with several buttons for managing the content. From left to right:
Code icon: shows the artifact's source code;
Eye icon: shows the formatted or rendered file (only available for Markdown and HTML files; for other file types you'll only see the code);
"Copy" button: copies the source code to the clipboard;
Additional options menu (down arrow): clicking the arrow next to the "Copy" button opens a menu with the following options:
Download as HTML or Markdown (HTML and Markdown files only);
Download as PDF (Markdown files only);
Open in a new window;
Print.
All these features make it easy to view, copy, share, or save any artifact generated during the conversation.
Limitations
Artifacts cannot be displayed if the user is interacting through a "Website Assistant" sharing layout.
3. Send email
The Send email function lets your Agent send email communications to all registered users on the platform (on aisuru.com or within your PaaS). This function uses the SMTP protocol and can be configured with any email provider that supports it.
3.1 How it works
The Agent can send emails automatically during conversations, using the SMTP credentials you've configured. The function automatically retrieves the user's email address from their registered account, so the user doesn't need to provide it during the conversation.
Important: This integration only works with users who have registered and logged in to the platform. It doesn't work with anonymous users.
3.2 SMTP configuration
To configure email sending in your Agent:
Go to the Functions section of your Agent;
Find the "Send Email" box and enable the function by pressing "edit parameters" when you hover over the box.
Choose your "SMTP configuration mode":
Inherit from tenant: the agent uses the tenant's SMTP configuration (disabled if not configured);
Custom SMTP configuration: enter SMTP credentials specific to this agent. If you choose this option, fill in the required fields.
Configuration fields
SMTP Server
The address of your email provider's server
smtp.gmail.com, smtp-mail.outlook.com
Port
The server's SMTP port
465 (SSL), 587 (STARTTLS), 25 (unencrypted)
Username
Your full email address
name@company.com
Password
The email account password or app password
•••••••••••••••••
Sender email
The address that will appear as the sender
name@company.com
Sender name
The name that will appear as the sender
Company Name
Socket security
The type of encryption used
SSL/TLS, STARTTLS
Press the "Save" button to confirm the settings.
3.3 Gmail / Google Workspace specific setup
If you use Gmail or Google Workspace, follow this detailed guide for a secure setup that complies with Google's policies:
3.3.1 SMTP credentials for Gmail
SMTP Server
smtp.gmail.com
Port
465 (SSL) or 587 (TLS)
Security method
SslOnConnect or StartTls (see port)
Username
full address (e.g. name@company.com)
Password
App password generated by Google*
Send limit
2,000 emails/day per account
3.3.2 Step-by-step guide for Gmail
Enable 2-Step Verification on your Google account;
Generate an App Password:
Enter a descriptive name for your app password (e.g., "AIsuru Mail");
Click Create and copy the generated password.
Configure in the AIsuru panel:
SMTP Server:
smtp.gmail.com;Port:
465(SSL)Username: your full email address;
Password: the app password you just copied;
Socket security: leave blank unless you're an advanced user. Options are None, Auto, SslOnConnect, StartTls, or StartTlsWhenAvailable. The default is Auto.
Save and test: you should receive a test email within a few seconds.
3.4 Other email providers
The email sending function can be configured with any provider that supports SMTP. Check your provider's documentation to get:
SMTP server and port;
Supported encryption type;
Authentication credentials.
3.5 Configuring in the Agent's instructions
It's essential to define in the Agent's Instructions how to use this function. Here's an example — make sure to adapt it to your specific use case:
3.6 Best practices
Define clear templates for different types of communication;
Set limits on sending frequency (maximum 2 emails per conversation);
Implement security checks in the instructions;
Handle personal data properly in accordance with privacy regulations;
Monitor usage to avoid overloading the SMTP server;
Test the configuration regularly to make sure it's working.
3.7 Security and compliance
Never share SMTP credentials in plain text;
Always use encrypted connections (SSL/TLS);
Periodically regenerate app passwords;
Monitor sending logs to detect misuse;
Respect your provider's sending limits to avoid blocks.
With this configuration, your Agent will be able to send emails securely and professionally, improving the user experience and providing a direct communication channel.
4. Convert OpenAPI to functions
The Convert OpenAPI to functions feature lets you automatically generate AIsuru functions from an existing OpenAPI specification.
How it works
This function lets you:
Upload a JSON OpenAPI file with the documentation of an existing API and its webhook;
Automatically generate all the functions needed to interact with the API;
Have functions ready to use with parameters, descriptions, and configurations already set up.
Setting up the OpenAPI conversion
To convert an OpenAPI specification to functions:
Go to the Functions section of your Agent;
Select the AIsuru Functions tab;
Find the Convert OpenAPI to functions box:
Enter the base URL of the webhook (i.e., the API — e.g.,
https://api.example.com);Click "Load OpenAPI JSON" and select the file to upload.
Best practices
Review the generated functions: check the created functions to make sure they're correct;
Test the functions: use the "Test" button to verify they work;
Update the instructions: explain to the Agent how and when to use the new functions.
5. Create function from file
The create-from-file function lets the Agent access files like Excel, PDF, HTML, or TXT during conversations, enabling it to use information contained in those documents.
How it works
This function lets you:
Upload a file (Excel, PDF, HTML, or TXT) smaller than 500,000 characters
Provide a description that explains to the generative AI how to use this file during conversations
Make the file accessible to the Agent as a source of information
Setting up the function from file
To create a new function from a file:
Go to the Functions section of your Agent
Select the Advanced functions tab
Click the Create function from file button
On the page that opens, you can:
Upload a file (Excel, PDF, HTML, or TXT) smaller than 500,000 characters
Enter a function description that explains to the generative AI how to use the file's content
The function description is essential: it must clearly indicate to the AI when to use this function and how to interpret the data in the file.
Example
If you upload a price list in Excel format, you might write a description like:
Best practices for creating functions from files
Use well-structured files to make it easier for the AI to read them
Provide detailed descriptions that guide the AI in using the file
Keep files under 500,000 characters for optimal performance
Update files periodically to keep information accurate
6. Perplexity Search
Perplexity Search lets your Agent perform intelligent web searches using Perplexity's AI, which combines real-time search with the ability to synthesize and analyze results.
How it works
Unlike a simple web search, Perplexity:
Searches for up-to-date information on the internet;
Analyzes and synthesizes the results;
Provides complete answers with source citations;
Returns both search results and an AI-synthesized response.
Setting up Perplexity Search
You can configure the API key in two ways:
Inherit from tenant: the API key is inherited from the tenant (PaaS) configuration. Any tenant administrator can modify this key at any time on the dedicated page. Changes apply automatically to all agents using the tenant configuration.
Custom API key: you can configure a specific API key for this agent.
Configuration steps
To enable this function:
In the AIsuru Functions section, find "Perplexity Search";
Enable the toggle to activate the function;
Choose the API key mode:
Select "Inherit from tenant" to use the centralized configuration;
Select "Custom API key" and enter your Perplexity API Key in the field;
Press "Save" to confirm the settings.
Instructions
Remember to update your Agent's instructions to explain how it should compose the query to pass to Perplexity (which will handle the actual search).
7. Emotions
AIsuru's Emotions function lets your Agent express emotions through facial expressions and animations when displayed with a 3D avatar. This system significantly improves interaction, making communication more natural and expressive.
How to enable the Emotions function
To enable this function:
Go to the management panel of your Agent
Navigate to the "Functions" section in the sidebar
Find the "Emotions" function under the "AIsuru Functions" tab
Enable the toggle to activate this feature
How Emotions works
When you enable the Emotions function, the behavior depends on the type of avatar you're using:
With an avatar: you'll immediately have access to 5 default emotions that the avatar can show (Happiness, Sadness, Anger, Surprise, Fear)
With custom GLB models: the model must include the desired animations and expressions
The function doesn't require any specific prompt to be activated. Once enabled, AIsuru's backend will automatically manage emotions by inserting the necessary tags into the Agent's responses based on the conversation context.
Displaying emotions
To see emotions in action, you need to view your Agent in an environment that supports 3D avatars, such as:
In AIsuru Virtual Spaces
Using layouts that support 3D avatars
Animation categorization system
The system automatically categorizes animations based on their name:
IDLE: base animations that loop continuously (the animation name contains "idle")
LOADING: animations that indicate a waiting state (the name contains "loading" or "wait")
ACTION: all other animations that show specific actions or emotions
Custom GLB models and animations
If you use a custom GLB model:
If the model has an RPM-compatible skeleton (Ready Player Me), standard animations will work automatically
The model must have at least one IDLE animation (the animation name must contain the word "idle") to work correctly
Animations are triggered by the backend based on the conversation context
For best results, the model should include animations for the basic emotions (happiness, sadness, anger, surprise, fear)
Advanced customization through instructions
For more detailed control over animations, you can add specific instructions in your Agent's Instructions (Settings > AI > Instructions).
Single animations
Looping animations
Where the loop values are:
[loop=0]: loops the animation indefinitely
[loop=1]: plays the animation once (default)
[loop=N]: repeats the animation N times
IDLE animations default to loop=0 (infinite).
Animation sequences
You can also specify a loop parameter for sequences:
Default emotions (for RPM avatars)
Agent instruction guide
You can guide the generative AI by adding specific instructions in your Agent's Instructions (Settings > AI > Instructions).
Example instructions for the Agent:
Example instructions for dance movements
If your model supports specific movements, you can create custom instructions like:
Best Practices
Enable the Emotions function from the Functions panel
Don't modify the instructions unless you need advanced customization
For an avatar created with AIsuru's avatar maker, the system will automatically use the 5 default emotions
For custom GLB models, make sure they have at least one IDLE animation and a compatible skeleton
For complex sequences, use advanced instructions with animation tags
Keep sequences to 3–5 animations for best performance
Test animations with different avatar types to verify compatibility
By enabling the Emotions function, your Agent will be able to communicate in a more expressive and engaging way, significantly improving the user experience in 3D environments.
Security considerations
For all these functions, it's essential to:
Carefully configure the Agent's instructions;
Limit access to sensitive resources;
Monitor function usage;
Implement verification mechanisms;
Comply with privacy and data protection regulations.
Performance optimization
To get the best results:
Combine different functions synergistically;
Keep instructions clear and up to date;
Regularly monitor function usage;
Collect user feedback;
Continuously refine configurations.
Last updated