Skip to content

Fix non-existent workflow builder API references in multi-agent workflows docs#511

Merged
elbruno merged 2 commits intomainfrom
copilot/fix-workflow-builder-api-references
Mar 24, 2026
Merged

Fix non-existent workflow builder API references in multi-agent workflows docs#511
elbruno merged 2 commits intomainfrom
copilot/fix-workflow-builder-api-references

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Two sections in 04-AgentsWithMAF/03-multi-agent-workflows.md reference APIs that don't exist in microsoft.agents.ai.workflows. The actual AgentWorkflowBuilder surface is: BuildSequential, BuildConcurrent, CreateHandoffBuilderWith, CreateGroupChatBuilderWith.

Changes

  • Part 4 (Handoff Workflow): Replace AgentWorkflowBuilder.BuildHandoff() (doesn't exist) with CreateHandoffBuilderWith().WithHandoffs().Build()
  • Part 6 (Custom Workflow Graphs → Conditional Handoff Workflows): Remove entirely fictitious WorkflowBuilder / AddAgent / AddEdge / AddConditionalEdge APIs. Replace with the actual CreateHandoffBuilderWith pattern—conditional routing is expressed via agent instructions; WithHandoff() constrains the allowed paths.
// Part 4 — corrected
Workflow handoff = AgentWorkflowBuilder.CreateHandoffBuilderWith(generalSupport)
    .WithHandoffs(generalSupport, [billingSpecialist, technicalSupport])
    .WithHandoff(billingSpecialist, generalSupport)
    .Build();

// Part 6 — replaces the WorkflowBuilder graph API that never existed
Workflow customWorkflow = AgentWorkflowBuilder.CreateHandoffBuilderWith(intakeAgent)
    .WithHandoffs(intakeAgent, [simpleAgent, complexAgent])
    .WithHandoff(simpleAgent, responderAgent)
    .WithHandoff(complexAgent, responderAgent)
    .Build();

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

…lows doc

- Part 4: Replace BuildHandoff() (doesn't exist) with CreateHandoffBuilderWith()
- Part 6: Replace WorkflowBuilder/AddAgent/AddEdge/AddConditionalEdge (none exist)
  with correct CreateHandoffBuilderWith pattern for conditional routing;
  rename section to 'Conditional Handoff Workflows'

Co-authored-by: elbruno <3533489+elbruno@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/Generative-AI-for-beginners-dotnet/sessions/cd369b57-b002-4040-8151-4016e796b18f
Copilot AI changed the title [WIP] Fix references to workflow builder API in tutorials Fix non-existent workflow builder API references in multi-agent workflows docs Mar 24, 2026
Copilot AI requested a review from elbruno March 24, 2026 13:49
@elbruno
Copy link
Copy Markdown
Collaborator

elbruno commented Mar 24, 2026

@copilot check if any other workflow sample or docs needs to be updated, and apply the changes

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot check if any other workflow sample or docs needs to be updated, and apply the changes

Checked all other docs and samples in the repo for incorrect workflow API usage (BuildHandoff, WorkflowBuilder, AddAgent, AddEdge, AddConditionalEdge). No additional files need updating — the two fixes in commit 8835715 covered everything. All other files (04-model-context-protocol.md, MAF-MultiAgents/README.md, MAF-MultiModel/README.md, and all .cs samples) correctly use BuildSequential, BuildConcurrent, or CreateHandoffBuilderWith.

@elbruno elbruno marked this pull request as ready for review March 24, 2026 14:06
@elbruno elbruno merged commit 97cf36b into main Mar 24, 2026
6 checks passed
@elbruno elbruno deleted the copilot/fix-workflow-builder-api-references branch March 24, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot find workflow builder API referenced in tutorials

2 participants