Train an agent to route customer calls to the correct department.
main_task
serves dual purposes - it represents the overall objective and acts as a control mechanism for the conversation loop. The while main_task.is_incomplete()
construct creates a flexible, AI-driven loop that continues until the trainee decides to route the call.
main_task
’s success tool, allowing them to mark the overall task as complete when they’re ready to route the call, even though that task isn’t currently active. This demonstrates how tools can be used to give agents control over task state.