Skip to content

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

  1. Add an Input with type Text to receive the customer's message.
  2. Connect Next to an AI agent node (the Communication section) and select an agent. Leave Message as #userInput.
  3. Optionally fill in Context with what the agent should know at this step, such as customer type, name #member.name, or time #now.
  4. Optionally add Output fields, for example topic with a list of allowed topics.
  5. Add a Condition on #node.{id}.ai.needsHuman, where {id} is the AI agent node's ID.
  6. False branch → a Screen with text #node.{id}.ai.answer; connect its fallback back to Input so the next message goes to the agent again.
  7. True branch → Operator chat with a note, for example #node.{id}.ai.topic and #node.{id}.ai.transcript.
  8. 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)

Learn more