An AI agent in your scenario: the AI agent node
Video coming soon — step-by-step guide below
The AI agent answers customers in a messenger, while the scenario decides what happens next: display the response, ask a follow-up question, or hand the conversation over to an operator.
What you need
- An active AI agent in the panel with a configured prompt and knowledge base
- A bot with a connected messenger
- For operator handoff, a configured and enabled SMSBAT chat integration
Steps
- Add an Input with type
Textto receive the customer's message. - Connect
Nextto an AI agent node (the Communication section) and select an agent. Leave Message as#userInput. - Optionally fill in Context with what the agent should know at this step, such as customer type, name
#member.name, or time#now. - Optionally add Output fields, for example
topicwith a list of allowed topics. - Add a Condition on
#node.{id}.ai.needsHuman, where{id}is the AI agent node's ID. Falsebranch → a Screen with text#node.{id}.ai.answer; connect its fallback back to Input so the next message goes to the agent again.Truebranch → Operator chat with a note, for example#node.{id}.ai.topicand#node.{id}.ai.transcript.- Test the conversation in the messenger. Execute node in the builder does not call the AI.
For empty_message or template_error, the agent is not called and needsHuman=False does not mean an answer is available. These cases can be handled using ai.isSuccess, ai.hasAnswer, and ai.error; see the node reference for details.
Resulting scenario
Example with AI agent node ID 40:
Input -> AI agent -> Condition "#node.40.ai.needsHuman"
├─ False -> Screen "#node.40.ai.answer" -> Input
└─ True -> Operator chat (Note: #node.40.ai.transcript)