This tool lets you extract values from a user’s response and save them as dynamic variables.

Steps

1

Add a Extract Dynamic Variable Tool

This would give your agent the ability to extract variable. The description is optional here.
2

Add Variables

Click “+Add” at the bottom and fill in the following details:
  • Variable Name – A short name to reference this variable.
  • Description – A brief explanation of what this value should be.
  • Variable Type – Choose from Text, Number, Enum, or Boolean.
  • Enum Options - Options to choose from. Only when type is enum

Variable Types

You can create variables of the following types:
  • Text - Any word or sentence. Examples: "headache", "John Smith"
  • Number - A numeric value. Examples: 42, 98.6
  • Enum - A value from a predefined list. Examples: "Yes", "No", "Maybe"
  • Boolean - True or false.
Click Save to add variable.
Add more variables as per requirement
3

Save the Extract Dynamic Variable Tool

Click the save button
4

Update prompt for function

It’s best to include in the prompt explicitly when is the best time to invoke the extract variable function. For example:
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.