microsoft / microsoft/agent-framework

.NET: Unable to test handoffs workflow using DevUI

Open
#3,011 2 comments 3 reactions 1 assignee Claimed by @victordibia View on GitHub
.NET devui
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

Please find the repro steps here:

1. Define a handoffs workflow and add it to service collection like below:
```
builder.AddWorkflow("HandoffsTutorWorkflow", (sp, key) =>
{
var client = sp.GetRequiredService();
ChatClientAgent historyTutor = new(client,
"You provide assistance with historical queries. Explain important events and context clearly. Only respond about history.",
"history_tutor",
"Specialist agent for historical questions");
ChatClientAgent mathTutor = new(client,
"You provide help with math problems. Explain your reasoning at each step and include examples. Only respond about math.",
"math_tutor",
"Specialist agent for math questions");
ChatClientAgent triageAgent = new(client,
"You determine which agent to use based on the user's homework question. ALWAYS handoff to another agent.",
"triage_agent",
"Routes messages to the appropriate specialist agent");
return AgentWorkflowBuilder.CreateHandoffBuilderWith(triageAgent)
.WithHandoffs(triageAgent, [mathTutor, historyTutor])
.WithHandoffs([mathTutor, historyTutor], triageAgent)
.Build();
}).AddAsAIAgent();
```

2. Then add DevUI dependencies.
3. Start the service.
4. You will encounter the below error:
The workflow factory returned workflow with name '', but expected name is 'HandoffsTutorWorkflow'.

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.