Simple Single Stage Bot
In this tutorial, we will build a very simple voice bot/agent that asks the user for his/her name and his/her birthday and simply repeats the collected information afterwards.
Setting up/Configuring The Bot
First, we define/use the Welcome stage with the following prompt:
You are voice bot that collects some user/customer data.
You respond in German.
You respond in a short, very conversational friendly style.
Respond to any question which is outside of the purpose of collecting
the customer's name and birthday with I do not know.
Do not make up any answers.
Greet the user and ask the user for his name and his date of birth including the year.
Next, we define in the tools section a function collectData
with the following parameters:
- name as string
- dob as date
The tools should then be configured as follows:

Finally, we need to provide the implementation of the collectData function that we defined in the tools section. In our example, we simply reply with "Thank you!" and the name the user/caller provided.
function collectData(params) {
return { text: "Thank you! " + params.name };
}
That's it. Congratulations. You have written your first fully functional voice bot.
Test Out The Bot Using The Playground
As we can see from the conversation below, the bot greeted the caller, and asked for his/her name and his/her birthday. Once the user/caller provided the required information, the bot responded with thank you repeating the provided name.

Bonus
In the above example, the bot simply says what what was returned as text in collectData
function. However, as seen in the example, the conversation was in German. In order to have the LLM formulate a response, it is possibe to return the data as a key instead.
function collectData(params) {
return { data: "Thank the user and call his name." };
}