Agent step
Handle user input, search the knowledge base, call tools, and follow exit conditions — all in one step

The Agent step is a flexible all-in-one tool that lets your agent have conversations using AI, access your knowledge base, route the conversation based on intent, and run external functions — all within a single step. Use it when you want the agent to handle an open-ended request without needing to manually define each path ahead of time.
Basic usage
To get started with the Agent step, simply add it to your canvas and connect it to the start step or a previous step. Then, select the Agent step and create a new agent.
Each Agent step requires a prompt - these are a set of instructions that tell the agent how to behave, and what actions its able to take. You can either manually write the prompt in the Instructions box, or click the lightning bolt icon to automatically generate a prompt.
Once your agent has a prompt, it can begin to have conversations with users! However, you'll need to connect Tools for it to be able to take any actions.
Accessing the knowledge base
When building customer support agents, it's important to give your agent access to your Knowledge base. This will allow the agent to look up answers to questions based on the data that you've imported.
To enable knowledge base access, toggle the Knowledge base toggle on the right sidebar. When enabled, the agent will automatically optimize a user's queries, lookup data, then convert that data into answers human-readable answers.
You can also set an LLM description by clicking on the Knowledge base option. This description provides context to your agent on when the Knowledge base should be queried.

Functions
Functions allow your agent to connect with external services and retrieve or update data. Based on the UI screenshot, configuring a function in an Agent Step involves several important components:
Function Configuration:
- Select Function: Choose from available functions in the dropdown menu
- LLM Description: This is critical - you need to tell the LLM when and how to use this function

Function Description:
The LLM Description
field is where you provide detailed instructions that help the LLM understand:
- When to call this function
- What the function does
- What information is needed to use it
For example, for an order lookup function:
LLM Description: "Use this function to retrieve a customer's order details from Shopify when they ask about their order status, delivery date, shipping address, or tracking information. This function requires a valid order ID to proceed. Only call this function when the customer explicitly mentions needing information about a specific order they've placed."
Input Variable Configuration:
For each input variable your function requires:
- Variable Name: Set a clear, descriptive name (shown as "orderID" in the UI example)
- Variable Description: Explain what this variable represents and how to collect it
- Default Value: Optionally provide a default value
Variable Description:
The description for each input variable helps the LLM understand:
- What information to collect
- How to validate it
- When to request it from the user
For example, for an Order ID variable:
LLM Variable Description: "This variable should contain the customer's order ID. Valid order IDs are 10-digit numbers that start with 'ORD-'. If the customer doesn't provide their order ID initially, ask them for it. If they don't know their order ID, ask if they have a confirmation email where they can find it."
Default Value: You can optionally set a default value, but for user-specific information like order IDs, this field is typically left empty.
Function Examples:
Order Lookup Function
Function Name: Get Order by ID
LLM Description: "Use this function to retrieve a customer's order details from Shopify when they ask about their order status, delivery date, shipping address, or tracking information. The function requires a valid order ID to proceed."Input Variable Name: orderID
LLM Variable Description: "The customer's order ID. This should be a 10-digit number that starts with 'ORD-'. Ask the customer to provide this number if they haven't already."
Inventory Check Function
Function Name: Check Product Availability
LLM Description: "Use this function when a customer asks if a product is in stock, available in a specific size or color, or when it might be back in stock. This function requires a product ID or SKU number to check availability."Input Variable Name: productSKU
LLM Variable Description: "The SKU or product ID of the item the customer is inquiring about. Valid SKUs are alphanumeric codes that typically start with 'P-' followed by numbers. If the customer mentions a product name but not the SKU, ask them for more specific information about which product they're interested in."
Exit conditions
Exit conditions allow your agent to handle specific conversation flows and take appropriate actions:
- Automatic Routing: The agent detects user intent and automatically routes to the appropriate exit condition
- Variable Collection: You can require specific data to be collected before entering a exit condition
- Seamless Integration: Exit conditions work within natural conversation, without requiring specific commands
To create an exit condition:
- Open your Agent step editor
- Add a new exit condition with a descriptive name
- Define a description that explains when this exit condition should be triggered
- Optionally add required variables that must be collected
- Connect the exit condition to subsequent steps in your flow

Exit condition Examples:
Order Return Exit Condition
Exit Condition Name: Process Order Return
LLM Description: "Trigger this path when the user wants to return an item they purchased, expresses dissatisfaction with their order, mentions that an item is defective, or asks about the return policy. The user might use phrases like 'I want to return', 'how do I send this back', 'my product is broken', or 'does this have a warranty'."Required Variable: orderID
LLM Variable Description: "This variable should contain the order ID that the customer wants to return. Valid order IDs are 10-digit numbers. If the user doesn't provide their order ID initially, ask them for it. Make sure to verify that the provided ID matches the expected format before proceeding with the return pr
This description helps the LLM understand exactly when to trigger the return process. It includes both direct mentions of returns and indirect signals of return intent, providing a comprehensive set of triggers for the exit condition. The variable description ensures the agent knows how to collect and validate the required information before proceeding.
Promo Code Exit Condition
Exit Condition Name: Get a Promo Code
Description: "Trigger this path when the user asks for a promo code or a discount, or says things are too expensive. Look for phrases like 'do you have any discounts', 'that's too much money', 'any coupon codes', or 'how can I save on my order'."Required Variable: email
Variable Description: "The user's email address where we'll send promotional materials. Only accept inputs that follow a valid email format (contains @ symbol and appropriate domain extension). If the user is hesitant, explain that we need their email to deliver the promo code and track usage. Do not proceed with providing the discount code until a valid email is collected."
This description helps the LLM recognize when a user is seeking a discount, either directly or indirectly. The required variable description provides clear guidance on what constitutes a valid email address and how to handle user hesitation, ensuring you collect quality customer data before providing them with the promotional code.
Advanced Usage
For even more powerful implementations:
- Multiple Agent steps: Chain several Agent steps together for complex workflows
- Custom Functions: Develop your own functions to connect with any service your business uses
- Prompt Refinement: Continuously refine your agent's instructions based on conversation logs and user feedback
Updated about 11 hours ago