Method AddWorker
- Namespace
- LMKit.Agents.Orchestration
- Assembly
- LM-Kit.NET.dll
AddWorker(Agent)
Adds a worker agent, registered under its default identity name.
public SupervisorOrchestrator AddWorker(Agent worker)
Parameters
workerAgentThe worker agent to add.
Returns
- SupervisorOrchestrator
This orchestrator for method chaining.
Remarks
Prefer AddWorker(string, Agent) when the supervisor's prompt references
a specific worker identifier. With this overload the worker is registered under its
persona/type name, which can desynchronize from the name the supervisor emits in the
delegate_to_agent tool call and cause "agent not found" failures at runtime.
AddWorker(string, Agent)
Adds a named worker agent. Recommended over AddWorker(Agent).
public SupervisorOrchestrator AddWorker(string name, Agent worker)
Parameters
namestringThe registry name used by the supervisor to delegate. Must match the identifier used in the supervisor prompt.
workerAgentThe worker agent to add.
Returns
- SupervisorOrchestrator
This orchestrator for method chaining.