Files
agent-framework/declarative-agents/workflow-samples/MathChat.yaml
T
Copilot fd253c0b0e Python: Move workflow-samples and agent-samples under declarative-agents directory (#5011)
* Move workflow-samples and agent-samples under declarative-agents and update all references

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c

Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>

* Fix relative paths in README files inside moved directories

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c

Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>
Co-authored-by: Shawn Henry <shahen@microsoft.com>
2026-04-02 09:34:33 +00:00

59 lines
1.4 KiB
YAML

#
# 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...