-
Notifications
You must be signed in to change notification settings - Fork 959
Open
Labels
Description
Please find the repro steps here:
- Define a handoffs workflow and add it to service collection like below:
builder.AddWorkflow("HandoffsTutorWorkflow", (sp, key) =>
{
var client = sp.GetRequiredService<IChatClient>();
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();
- Then add DevUI dependencies.
- Start the service.
- You will encounter the below error:
The workflow factory returned workflow with name '', but expected name is 'HandoffsTutorWorkflow'.
