How to create and configure a function for an AI agent
Functions define specific actions the agent can execute, such as querying a database, sending notifications, or collecting user data.
- In the function block on the chatbot builder, rename it if needed.
- Click Manage function.
- Fill in the fields:
- Name: unique identifier used internally (e.g., queryOrder, sendNotification). - Description: explain what the function does, what data it needs, and what it returns. A clear description guides agent behavior. - Extra instructions: additional prompt to guide the AI when executing the function (e.g., "Confirm full name before sending notification."). - Parameters: for each parameter, set the name (e.g., customerEmail), type (string, integer, boolean, array), whether it is required, and a description of how the agent should handle it.
- In the right panel, preview the generated JSON in real time.
- To fill in the fields automatically, click Generate with AI, describe the function in plain language, confirm with OK, and click Apply JSON.
- Review and click Save.
The function is integrated into the agent. Whenever the AI identifies a need for this action, it will call it automatically.