SwarmMember<T>

Models & Types · AiDotNet.Agentic.Agents

One participant in a Swarm: a named persona with its own chat model, instructions, tools, and the set of peers it is allowed to hand control to.

For Beginners

Picture a support desk where staff pass a customer between them. Each staff member (a member here) has their own expertise, their own tools, and a list of colleagues they can transfer the customer to. The conversation history travels with the customer.

How It Works

Unlike a worker under a SupervisorAgent (which runs as a self-contained subroutine), a swarm member shares one running conversation with its peers. When a member hands off, the next member continues the same conversation, so context flows directly between peers rather than being summarized through a coordinator.

Constructors

Constructor Summary
SwarmMember(string name, IChatClient<T> client, string systemPrompt, string description, ToolCollection tools, IReadOnlyList<string> handoffs) Initializes a new swarm member.

Properties

Property Summary
IChatClient<T> Client { get; } Gets the chat model the member uses while it is the active responder.
IReadOnlyList<string> Handoffs { get; } Gets the peers this member may hand off to: null means “any other member”, an empty list means “no handoffs”.
ToolCollection Tools { get; } Gets the member’s own (non-handoff) tools.
string Description { get; } Gets a short description of the member’s specialty.
string Name { get; } Gets the member’s unique name.
string SystemPrompt { get; } Gets the member’s instructions/persona, applied while it is active, or null.