Deploy an AI Agent
Once you have set up an AI Agent, you can deploy it using Flows. This will allow your customers to interact with your AI Agent.
Step one: Set up a flow with a trigger
Click your name in the bottom left-hand corner of your screen, then click Manage integrations.
Click Flows in the top right-hand corner of your screen.
Click New flow > Create from scratch.
Give your flow a name.
Under 'Trigger', select Conversation.
Select the channel that you want your AI Agent to run on.
Under 'Select a trigger event', select Conversation created from the drop-down.
The 'Participant type' should be Contact.
Save the trigger configuration.
Send a test message to the channel, and click Update test data to pull it in.
Click Save.
Step two: Set up the flow action
Click Add new action.
Under 'Select an action', click LLM Bot.
Select Create a new conversation to process with an LLM bot.
In the 'Agent Id' field, click and select the name of your AI Agent.
Click Next.
Click Run test.
In the top right-hand corner of your flow, click Save draft.
Step three: Check the conversation and send a new test message
Return to the Settings page by clicking the your name in the bottom left-hand corner, then clicking Settings.
Go to AI > Actions > AI Agents.
Click the three dots on the right-hand side of your AI Agent, then click Chats.
You'll be able to see a list of the chats that you AI Agent has had, including it's response to the test message you sent earlier.
Click the three dots on the right-hand side of the latest chat, then click View.
Here you will be able to see how the AI Agent handled your message.
Send another message to your channel, this time asking the AI Agent to connect you to a human agent. The AI Agent should handle this with a response, which will be visible in the 'chat' view, and on the back end will handover to a human agent.
Return to the flow that you saved as a draft.
Step four: Configure 'handover' and 'resolved' branches
Under the Create a new conversation to process with an LLM bot action, check the test output. You should be able to see the following:
"status": "handover"
.Click Add new action.
Under 'Select an action', click Conditional.
Give 'Branch A' the name 'Human handover'.
Click the curly brackets in the 'Variable' field, and find the correct variable by clicking Steps > Create a new conversation to process with an LLM bot > event > llmBotChat > status. The variable you are looking for will look something like
status: handover
.From the 'Select operator' dropdown,
select (String) equals
.Click the the 'Value' field, and enter the text
handover
.Give 'Branch B' the name 'Resolved'.
Click the curly brackets in the 'Variable' field, and find the correct variable by clicking Steps > Create a new conversation to process with an LLM bot > event > llmBotChat > status. The variable you are looking for will look something like
status: handover
.From the 'Select operator' dropdown,
select (String) equals
.Click the the 'Value' field, and enter the text
resolved
.Click Next.
Click Run test and check the response.
Within the 'Human Handover' branch, click Add new action.
Select Assign Agent to Inbox.
Click Next.
Within the 'Resolved' branch, click Add new action.
Select Terminate.
Select Success as the operation.
In the 'Reason' field, enter 'No human needed'.
Step five: Terminate the flow
Add a final action by clicking Add new action.
Select Terminate.
Select Fail.
In the 'Reason' field, click the curly brackets in the 'Variable' field, and find the correct variable by clicking Steps > Create a new conversation to process with an LLM bot > event > llmBotChat > status. The variable you are looking for will look something like
status: handover
.Save the step.
Publish your flow.
Last updated