AI Agent
Overview
The AI Agent action allows you to build an intelligent bot workflow that collects customer input, processes it using a configured AI provider, and responds accordingly. You can extend the AI Agent with tools that connect to external services like Google Sheets, assign conversations, close conversations, and update customer fields.
Step 1: Add the AI Agent to Your Workflow
Use the search box to find and filter available messaging nodes.
Drag the AI Agent node onto the canvas to add it to your bot workflow.
Enter the response text for the AI Agent and click Text to select the data type.
Click Create Agent to finalize the initial AI Agent setup.
Step 2: Collect Customer Input
You can collect customer messages using one of two actions before passing them to the AI Agent.
Option A: Ask for Text
The Ask for Text action collects the customer's message as plain text and passes it to the AI Agent.
Use the search box to find Ask for Text and add it to your workflow.
Click Variables to insert dynamic values into your message.
Click the Flow tab to view and manage all stored responses.
Search for variables and click the variable reference to insert the AI Agent response into your message.
Enter an error message in the error field to handle invalid input.
Click Save Changes to apply the configuration.
Connect the Ask for Text output to the AI Agent action. This passes the collected customer message to the AI Agent for processing.
Option B: AI Smart Ask
The AI Smart Ask action understands customer input and can provide interactive response options such as a list or buttons, based on the content and context provided.
Add AI Smart Ask to your workflow.
Click Variables to insert dynamic customer data into your message.
Click the Flow tab to view and manage all action responses.
Click the variable reference to insert the AI Agent response into your message.
Click Save Changes to preserve your configuration.
Connect the AI Smart Ask output to the AI Agent action. The AI Agent analyzes the customer's response and sends a relevant reply using buttons or a list.
Step 3: Configure the AI Agent
Click the dropdown arrow to expand the AI model settings.
Click Edit Agent to open the configuration panel.
Basic Tab
Click the Basic tab to view and save the response to a variable.
Model Tab
Click the Model tab to configure AI provider and model settings.
Click the AI provider dropdown and select your provider (for example, OpenAI or OwnAI).
Select your preferred AI model (for example, GPT-4o).
Adjust the Temperature slider to control response randomness and creativity.
Click the checkbox to show additional configuration options:
Select Plain Text as the response format.
Select Medium from the Response Verbosity dropdown to set a balanced output level.
Click Show Additional Options to add the advanced settings.
System Prompt and User Message
Enter your instructions in the System Prompt field. The AI Agent uses this prompt to guide the conversation.
Enter a custom message in the Override User Message field. This message is sent to the AI Agent instead of the user's original message.
Click Variables and select lastMessage.text to configure the message variable if needed.
Knowledge Base
If you want the AI Agent to reference documents when responding, enable the Knowledge Base toggle.
Click the Search Documents field to find and select the documents to add.
The AI Agent will use these documents as a reference when generating responses.
Conversation Memory
Toggle Enable Conversation Memory to allow the AI to load and reference previous messages in the conversation.
Save Configuration
Click Save Configuration to store all AI Agent settings.
Step 4: Add Tools
Tools extend the AI Agent's capabilities by connecting it to external actions. Click the Tools tab to view and configure available tools.
Click Add Tool, then click the Select an Action dropdown to choose the action for each tool.
Tool 1: Google Sheets — Append Row
Use this tool to save customer details collected by the AI Agent into a Google Sheet.
Before selecting the connection: Integrate Google Sheets with your connected Google account and create the connection in the Apps section first.
In the AI Agent's system prompt, instruct the agent to trigger this tool. For example:
"Once you collect the customer's Name, Phone Number, and Requirement, use the Google Sheet Append Row tool to add these details as a new row in the connected Google Sheet."
Configuration steps:
Select Google Sheets — Append Row from the action dropdown.
Select your Google Sheets connection from the Select Connection dropdown.
Click Select Spreadsheet and choose your target spreadsheet.
Click Select Sheet (Tab) and choose the sheet tab (for example, Sheet1).
Click Add New Field to define the data fields:
Enter the Field Name (for example, customer name).
Enter a Description explaining the field's purpose.
Select Extracted by AI from the dropdown to indicate the data source.
Repeat to add additional fields (for example, user_email).
Click Create Tool & Continue to save.
Tool 2: Google Sheets — Read Sheet
Use this tool to allow the AI Agent to read data from a Google Sheet.
Click Add Tool and select Google Sheets — Read Sheet from the action dropdown.
Select your connection from the Select Connection dropdown.
Select your target spreadsheet and sheet tab.
Click Create Tool & Continue to save.
Tool 3: Assign Conversation
Use this tool to automatically assign a conversation to a specific user or team.
Click Add Tool and select Ownchat — Assign Conversation from the action dropdown.
Click the Select Assign To dropdown and choose User or Team.
Click Select Assign User and select the user (for example, Poornima).
Click Create Tool & Continue to save.
Tool 4: Close Conversation
Use this tool to automatically close a conversation when the AI Agent determines it is complete.
Click Add Tool and select Ownchat — Close Conversation from the action dropdown.
Click Create Tool & Continue to save.
Tool 5: Update Customer Fields
Use this tool to update customer data fields collected during the conversation.
Click Add Tool and select Ownchat — Update Customer Fields from the action dropdown.
Click Add New Field to add a custom field.
Select a Customer Field from the dropdown to fetch a field from the Field Collection.
Enter the required value and click Add Field to define the parameter.
Click Create Tool & Continue to save.
Step 5: Review and Publish
After adding all tools, click the Basic tab update button to confirm the AI Agent configuration.
Review the list of tools that have been added to the AI Agent.
Click Publish to deploy your bot configuration to production.
Summary
Step
Action
1
Add AI Agent node to the canvas and create the agent
2
Add Ask for Text or AI Smart Ask to collect customer input
3
Configure the AI Agent — provider, model, prompt, knowledge base, and memory
4
Add tools: Google Sheets Append, Google Sheets Read, Assign Conversation, Close Conversation, Update Customer Fields
5
Review tools and click Publish to deploy
Last updated