Build a multi-prompt agent
1
Break down the conversation into steps
In each step, you can define a prompt.
2
Define state transition logic
Just like in the “Lead qualification” template, you can have this prompt to define when to transition to the next step. For example, if users say “yes” to a question, transition to
your_next_state state.3
Define when to call a function
Just like in the “Lead qualification” template, you can have this prompt to define when to call a function. For example, call
your_function_name function to book an appointment.