Extra Β· Magentic Workflows (Microsoft Agent Framework)
Tier 2 Β· Extra β modular. You can attempt this in any order with the other Extras. Prerequisite: the Foundations end-state (a deployed, grounded Northfield IQ Assistant). Complete Foundations, or run the bootstrap skip-path:
azd up && ./scripts/setup-foundations.sh && python scripts/validate-foundations.py.Specific prereq: the Advanced Β· Action Tools challenge β your Action sub-agent reuses the MCP action tool (
ACTION_MCP_URL) you wired there.
βοΈ Infra prerequisite: the
agent-frameworkSDK (in the extras pins) and DevUI for visualization β both run locally, no extra Azure provisioning. You only need your Foundations.env+ the Action Tools backend running.π€ Demo wow-factor: a manager agent plans live which specialist to call next β watch the plan light up in DevUI (green = done, purple = running) instead of a hard-coded if/else chain.
Why this challenge
Your assistant is one agent doing everything: triage, retrieval, action, escalation. That works until the jobs conflict β a good retriever makes a clumsy escalation-writer. The Microsoft Agent Framework (MAF) lets you compose specialized agents and have a Magentic manager plan, at runtime, which one to call for each part of a request. This is dynamic orchestration β the manager decides the route per task, unlike a fixed sequential/fan-out pipeline.
Youβll build four specialists and let the manager coordinate them:
| Sub-agent | Responsibility | Backed by |
|---|---|---|
| Triage | Classify the request, decide whatβs needed | model + instructions |
| Knowledge | Answer from the FAQ corpus | your Foundations AI Search knowledge base |
| Action | Execute a real operation (ticket/hold/booking) | the MCP action tool (ACTION_MCP_URL) |
| Escalation | Draft a human-handoff when confidence is low | model + instructions |
request
|
v
+------------------------+
| Magentic manager |
| plans + routes (live) |
+-----+-----+-----+-----+
| | | |
v v v v
+--------+ +-----------+ +--------+ +------------+
| Triage | | Knowledge | | Action | | Escalation |
+--------+ +-----------+ +--------+ +------------+
Step 1 β Define the four specialist agents (MAF)
Goal: Four single-responsibility agents exist as MAF ChatAgents with focused instructions.
Tasks:
-
pip install agent-framework(extras pin). Search before you implement: querymicrosoft-docsandfoundry-mcp(thefoundry-workflowsskill) for the current MAFChatAgent/ Magentic builder API β MAF is fast-moving. -
Create Triage, Knowledge, Action, Escalation as separate agents, each with a tight system prompt scoped to its one job.
-
Give Knowledge your AI Search knowledge base and Action the MCP tool at
ACTION_MCP_URL(reuse the Action Tools wiring). Triage and Escalation are model-only.
Success Criteria:
- Four distinct agents instantiate, each with single-responsibility instructions.
- Knowledge is grounded in the FAQ corpus; Action holds the MCP tool.
Checkpoint:
python validate.py --step 1
# expected: "β
Step 1 PASS β 4 specialist agents defined (Triage, Knowledge, Action, Escalation)"
Step 2 β Compose them under a Magentic manager
Goal: A Magentic workflow where the manager plans which specialist handles each part of a request.
Tasks:
- Build a Magentic workflow (manager/planner) and register the four specialists as participants.
-
Write the manager instructions: triage first; route knowledge questions to Knowledge; route do-something requests to Action; if confidence is low or the request is out of scope, hand to Escalation.
- Run a composite prompt that needs two specialists, e.g. βI canβt log into the portal and I need to drop CS101 β help.β (Knowledge for the login FAQ + Action for the course hold/drop).
Success Criteria:
- The manager invokes more than one specialist for a composite request.
- The Action path still respects the human-approval loop from Action Tools.
Checkpoint:
python validate.py --step 2
# expected: "β
Step 2 PASS β Magentic workflow routes to β₯2 specialists on a composite request"
Step 3 β Visualize the plan in DevUI
Goal: Watch the managerβs plan execute live.
Tasks:
- Launch DevUI and point it at your workflow.
-
Submit the composite request and watch the plan graph: nodes go purple while running, green when done, as the manager fans out to specialists.
- Submit a low-confidence / out-of-scope request (βCan you change my final grade?β) and confirm it routes to Escalation.
Success Criteria:
- DevUI renders the plan with live status colors per sub-agent.
- An out-of-scope request is routed to Escalation, not actioned.
Checkpoint: DevUI state β screenshot the plan graph mid-run (a running + a completed node) and the Escalation route. (python validate.py --all re-runs Steps 1β2 headless.)
What you built
A multi-agent Northfield assistant where a Magentic manager plans the route at runtime across four specialists β dynamic orchestration you can watch in DevUI, not a brittle hand-coded pipeline.