samples: add McpDocsResearch declarative workflow showcasing agent-level MCP pattern#6054
Open
jluocsa wants to merge 3 commits into
Open
samples: add McpDocsResearch declarative workflow showcasing agent-level MCP pattern#6054jluocsa wants to merge 3 commits into
jluocsa wants to merge 3 commits into
Conversation
…vel MCP pattern Adds a three-agent sequential workflow to declarative-agents/workflow-samples/ that demonstrates the agent-level MCP pattern: QueryPlannerAgent -> MicrosoftLearnAgent (MCP-backed) -> CitationReviewerAgent. Complements the existing action-level pattern in dotnet/samples/03-workflows/Declarative/InvokeMcpTool/ and pairs with the existing agent-samples/foundry/MicrosoftLearnAgent.yaml definition.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new declarative workflow sample demonstrating the agent-level MCP (Model Context Protocol) pattern for Microsoft Learn research and citation review.
Changes:
- Introduces
McpDocsResearch.yamlworkflow chaining three agents (planner → MCP-backed search → citation reviewer). - Documents when to prefer agent-level MCP vs workflow-level MCP invocation.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new declarative workflow sample,
declarative-agents/workflow-samples/McpDocsResearch.yaml, that showcases the agent-level MCP pattern — where an MCP-backed agent reasons over MCP tools as part of its own turn, instead of the workflow invoking MCP directly.The workflow is a three-agent sequential pipeline:
agent-samples/foundry/MicrosoftLearnAgent.yamldefinition). It searches Microsoft Learn viahttps://learn.microsoft.com/api/mcpand drafts an evidence-rich answer.autoSend: true).Motivation
declarative-agents/workflow-samples/ships four samples today —CustomerSupport,DeepResearch,Marketing, andMathChat. None of them showcase MCP. The runtime samples folder does havedotnet/samples/03-workflows/Declarative/InvokeMcpTool/InvokeMcpTool.yaml, but that demonstrates the action-level pattern (workflow callsInvokeMcpTooldirectly). The agent-level pattern — where an MCP server is wired as a tool on the agent and the agent decides when to call it — is a meaningfully different design choice and currently has no end-to-end multi-agent example in the showcase folder.The new sample explicitly contrasts the two patterns in the header comments so readers can pick the right one for their scenario.
Why this shape
Marketing.yamlso the focus stays on the MCP wiring, not on workflow orchestration.MicrosoftLearnAgent.yamlin the middle position so no new agent definitions are needed; readers can run this workflow against the agent yaml already in the repo.InvokeAzureAgentplus theLocal.*/System.LastMessage.Text/UserMessage()/MessageText()patterns already established by the existing samples.Files changed
declarative-agents/workflow-samples/McpDocsResearch.yaml— new, 67 lines.How to test
Register agents named
QueryPlannerAgent,MicrosoftLearnAgent(configured with the MCP tool fromagent-samples/foundry/MicrosoftLearnAgent.yaml), andCitationReviewerAgentwith the runtime, then execute the workflow withDeclarativeWorkflowBuilder.Build("McpDocsResearch.yaml", options).Example input from the file header:
Out of scope (happy to add as follow-ups if reviewers want)
dotnet/samples/03-workflows/Declarative/McpDocsResearch/that registers the three agents and runs the workflow.