Skip to content

.NET: Unable to test handoffs workflow using DevUI #3011

@debarghyaroy012

Description

@debarghyaroy012

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<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();
  1. Then add DevUI dependencies.
  2. Start the service.
  3. You will encounter the below error:
    The workflow factory returned workflow with name '', but expected name is 'HandoffsTutorWorkflow'.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions