The video above details how to build a functional chatbot on WhatsApp by leveraging the generative artificial intelligence of Tess AI. The objective is to guide the user from the initial setup to practical implementation, enabling the creation of a virtual agent capable of interacting with users in an automated and intelligent manner. The video is aimed at aspiring "Agent Builders" and anyone interested in exploring the potential of AI on WhatsApp.
I. Creation and Configuration of the Agent in Tess AI:
Access to the Tess AI Platform: The starting point is the Tess AI platform, where the user begins the process of creating their AI agent.
Selection of the AI Model: Tess AI offers a variety of generative AI models, each with distinct characteristics and capabilities. The video mentions examples such as Deepseek R1
, Deepseek R1 small V3
, and others. The choice of model will depend on the needs and type of interaction desired for the chatbot.
Definition of the Generic Prompt: The prompt is the initial instruction that defines the role and behavior of the agent. In the video, the importance of a generic prompt is emphasized to guide the agent to respond clearly and concisely, using only plain text and avoiding complex formatting such as Markdown or LaTeX. This is crucial to ensure that the responses are displayed correctly on WhatsApp, which may have limitations in rendering certain formats. Example of a prompt: "You are an AI agent named Tess. Follow these guidelines: respond using plain text only, without formatting."
Personalization Variables: The video mentions the possibility of including personalization variables in the prompt, such as creativity level (temperature) and the choice of the AI model. These variables allow the agent's behavior to be adjusted according to the user’s preferences.
Considerations on the Use of Tools: While the video does not focus on the use of "Tools" (external tools that the agent can access), it mentions that this option can be configured on the Tess AI platform.
II. Integration with the Make Automation Platform (formerly Integromat):
Automation Platform Choice: The video uses the Make platform as an example for integration with WhatsApp, highlighting its user-friendly interface and the availability of a specific module for WhatsApp. Alternatives like Zapier and n8n are mentioned, each with its advantages and disadvantages.
Module "WhatsApp > Watch Events": This module is the automation trigger. It "listens" for incoming messages on the configured WhatsApp number. Whenever a new message arrives, the trigger is activated, initiating the automation flow.
Webhook Configuration: The Webhook is an essential component for communication between WhatsApp and the automation platform. It acts as a "callback point," allowing Meta (the company responsible for WhatsApp) to notify the Make platform whenever a new message is received on the configured number. Webhook configuration is done in WhatsApp's Meta app and involves an operational verification process that is not detailed in the video, but will be covered in a future video.
Module "HTTP > Make a request": This module allows HTTP requests to be sent to the Tess AI API, requesting the execution of the agent and the generation of a response based on the received message. Configuring this module is considered the most technical part of the process.
III. Detailed Configuration of the HTTP Request for the Tess AI API:
The Tess API can be easily accessed here.
API URL: The Tess AI API URL, responsible for executing the agent, must be specified in the corresponding field of the HTTP module.
HTTP Method: The HTTP method used to send the request is POST
.
Request Headers: The headers provide additional information about the request. In this case, it's necessary to include an authorization header with the Tess AI API access token. The header format is: Authorization: Bearer <your_token>
.
Access Token Generation and Management: The video demonstrates how to generate an access token on the Tess AI platform for demonstration purposes, with the reminder that the token will be revoked later for security reasons. It is crucial that users create and manage their own access tokens securely.
Request Body: The request body contains the data that will be sent to the Tess AI API, including the agent ID, the AI model to be used, the user's message, and other configurations. The body format must be JSON (application/json)
.
JSON Structure: The video provides an example of how to structure the JSON in the request body, with variables properly separated by commas and the last variable without a comma. It is essential to pay attention to JSON syntax to avoid errors in the request.
Variable Replacement: It is essential to replace the variables in the JSON with the correct values, such as the agent ID (obtained from the agent's page URL in Tess AI) and the access token.
User Message: The message sent by the user on WhatsApp must be extracted from the "WhatsApp > Watch Events" trigger and inserted into the JSON as the value of the corresponding variable.
wait execution
and parse response
: The option wait execution: true
ensures that the Make platform waits for the response from Tess AI before proceeding with the automation flow. The option parse response: true
instructs the Make platform to interpret the response from Tess AI, which is also in JSON format, and break the data into individual variables for easier use in subsequent automation steps.
IV. Sending the Response Back to WhatsApp:
Module "WhatsApp > Send message": This module allows sending a text message to a specific phone number on WhatsApp.
Connecting to WhatsApp: It is necessary to configure a connection between the Make platform and the WhatsApp number that will be used to send the responses.
Defining the Recipient: The recipient of the message must be the phone number of the user who sent the original message. This information can be obtained from the trigger "WhatsApp > Watch Events."
Response Message: The response message must be extracted from the Tess AI API response (module "HTTP > Make a request") and inserted into the corresponding field of the "WhatsApp > Send message" module.
V. Tests and Adjustments:
Scenario Execution: The video demonstrates how to execute the scenario on the Make platform and test the integration with WhatsApp.
Response Verification: It is important to verify if the responses generated by the chatbot are coherent and relevant to user inquiries.
Prompt Adjustment: If the responses are unsatisfactory, it is possible to adjust the agent's prompt in Tess AI and test again.
Monitoring and Debugging: The Make platform provides monitoring and debugging tools that allow you to track the automation execution flow and identify possible errors.
VI. Additional Resources and Next Steps:
Blueprint Export: The video demonstrates how to export the scenario "blueprint" in Make, which is a file containing the complete configuration of the automation. This file can be imported into other scenarios, making it easier to create similar automations in the future.
Using the Tess AI API Documentation: The video emphasizes the importance of consulting the Tess AI API documentation to explore different AI models, configuration parameters, and advanced features.
Conversation Memory (Root ID): The video introduces the concept of the "root ID," which allows the chatbot to "remember" previous conversations. To implement this functionality, it is necessary to store the root ID generated during the first interaction with the user and use it in subsequent requests. This functionality will be covered in more detail in a future video.
This detailed summary provides a comprehensive overview of the process of creating a chatbot on WhatsApp with generative AI and Tess AI!