Academy
How to Use Autonomous Nodes
Managing AI Responses
In this lesson

Transitioning from an Autonomous Node to a Controlled Workflow in Botpress

Autonomous nodes in Botpress provide flexibility, but some scenarios require full control over outputs, such as sensitive tasks or specialized workflows. This lesson outlines how to transition users from an autonomous node to a controlled workflow, ensuring consistent and reliable interactions.

Creating a Controlled Workflow

  1. Setting Up the Workflow
    • Add a new workflow, such as "HITL" (Human in the Loop).
    • Define the workflow structure using logic and fixed inputs. For example:
      • Add a text card displaying a fixed message like, "Hello, this is fixed input text."
      • Include user input handling and loops to create interactive elements.
    • The workflow ensures complete control over the responses, allowing for database calls or displaying specific information.
  2. Customizing Workflow Behavior
    • Since workflows bypass LLM logic, they are ideal for tasks requiring precise handling, such as financial transactions or human agent escalation.

Transitioning to the Workflow

  1. Keyword-Based Transition
    • Add a "Transition" card to the autonomous node.
    • Define a condition, such as keyword matching (e.g., event.preview == "hitl").
    • Link the card to the desired workflow by selecting "Execute Workflow" and connecting it to "HITL."
    • This method is useful for testing and debugging as it bypasses LLM interpretation.
  2. Instruction-Based Transition
    • Open the "Instructions" card and add a behavior snippet. For example:
      • "If a user wants to talk to a human agent, transition them to the HITL workflow."
    • Connect the workflow by adding it as a card to the autonomous node.
    • This method integrates seamlessly into the bot's logic and is suited for real-world applications.

Benefits of Controlled Workflows

  • Consistency: Ensures outputs are predictable and accurate, free from LLM variability.
  • Sensitivity: Handles tasks requiring precision, such as pricing, transactions, or escalation to human agents.
  • Flexibility: Allows the autonomous node to act as a concierge, routing users to specialized workflows when needed.
Summary
This lesson explains how to transition users from an autonomous node to a controlled workflow in Botpress, providing 100% control over outputs for specialized tasks.
all lessons in this course