Table of Contents

Property Delegates

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

Delegates

Gets or sets the registry of agents this agent can delegate tasks to.

public AgentRegistry Delegates { get; set; }

Property Value

AgentRegistry

Examples

Setting up agent delegation:

using LMKit.Model;
using LMKit.Agents;

using var model = new LM("path/to/model.gguf");

// Create specialized agents
var codeAgent = new Agent(
    new AgentIdentity("Code Expert", "Write and review code."),
    model
);

var writeAgent = new Agent(
    new AgentIdentity("Technical Writer", "Write documentation."),
    model
);

// Create a coordinator that can delegate
var coordinator = new Agent(model);
coordinator.Identity = new AgentIdentity(
    "Project Coordinator",
    "Coordinate tasks between specialists."
);

// Set up delegation
coordinator.Delegates = new AgentRegistry();
coordinator.Delegates.Register("code_expert", codeAgent);
coordinator.Delegates.Register("writer", writeAgent);
coordinator.EnableDelegation();

Remarks

Delegation enables multi-agent workflows where specialized agents handle specific subtasks. When configured, call EnableDelegation() to register the delegation tool automatically.