# # This workflow demonstrates conversation between two agents: a student and a teacher. # The student attempts to solve the input problem and the teacher provides guidance. # # Example input: # How would you compute the value of PI? # kind: Workflow trigger: kind: OnConversationStart id: workflow_demo actions: - kind: InvokeAzureAgent id: question_student conversationId: =System.ConversationId agent: name: StudentAgent - kind: InvokeAzureAgent id: question_teacher conversationId: =System.ConversationId agent: name: TeacherAgent output: messages: Local.TeacherResponse - kind: SetVariable id: set_count_increment variable: Local.TurnCount value: =Local.TurnCount + 1 - kind: ConditionGroup id: check_completion conditions: - condition: =!IsBlank(Find("CONGRATULATIONS", Upper(MessageText(Local.TeacherResponse)))) id: check_turn_done actions: - kind: SendActivity id: sendActivity_done activity: GOLD STAR! - condition: =Local.TurnCount < 4 id: check_turn_count actions: - kind: GotoAction id: goto_student_agent actionId: question_student elseActions: - kind: SendActivity id: sendActivity_tired activity: Let's try again later...