Table of Contents

Class NameBasedDelegationRouter

Namespace
LMKit.Agents.Delegation
Assembly
LM-Kit.NET.dll

A simple delegation router that selects agents by exact name match.

This is the default router used when no custom routing logic is needed.

public sealed class NameBasedDelegationRouter : IDelegationRouter
Inheritance
NameBasedDelegationRouter
Implements
Inherited Members

Examples

Using the singleton router (the default for most delegation managers):

using LMKit.Agents;
using LMKit.Agents.Delegation;

var registry = new AgentRegistry(); registry.Register("writer", writerAgent); registry.Register("editor", editorAgent);

var manager = new DelegationManager(registry, NameBasedDelegationRouter.Instance);

var result = await manager.DelegateAsync( DelegationRequest.To("writer", "Draft a 50-word headline."));

Properties

Instance

Gets the singleton instance.

Methods

CanHandle(Agent, DelegationRequest)

Checks if the agent's name matches the request target.

SelectAgentAsync(DelegationRequest, AgentRegistry, CancellationToken)

Selects an agent by matching the target name in the request.

Share