Thanks to visit codestin.com
Credit goes to github.com

Skip to content

.NET - Workflows - CustomAgentExecutors sample not working #4202

Description

@devops-mesh

The documentation/example for /samples/GettingStarted/Workflows/Agents/CustomAgentExecutors no longer works.
A missing implementation for ConfigureProtocol is required.
This appears to have replaced the previous ConfigureRoutes method (this was also missing).
Adding an implementation as seen below used to work correctly.

protected override RouteBuilder ConfigureRoutes(RouteBuilder routeBuilder)
{
	return routeBuilder.AddHandler<string, SloganResult>(this.Handle).AddHandler<FeedbackResult, SloganResult>(this.Handle);
}

An attempt to configure the new method inline with the previous ConfigureRoutes does not work.

protected override ProtocolBuilder ConfigureProtocol(ProtocolBuilder protocolBuilder)
{
	protocolBuilder.ConfigureRoutes(routeBuilder => routeBuilder.AddHandler<string, SloganResult>(this.HandleAsync).AddHandler<FeedbackResult, SloganResult>(this.HandleAsync));
	return protocolBuilder;
}

The initial slogan is generated, feedback is provided but no subsequent slogan is attempted.

If it is possible to update this example or provide the details of how the the above method is to be implemented and even if it is associated with the failure to "loop" until the conditions are satisfied that would be great.

https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/Workflows/Agents/CustomAgentExecutors

Metadata

Metadata

Assignees

Labels

.NETUsage: [Issues, PRs], Target: .NetbugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)workflowsUsage: [Issues, PRs], Target: Workflows

Type

Fields

No fields configured for Bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions