Table of Contents

Method Clear

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

Clear()

Removes all agents from the registry.

public void Clear()

Examples

Example: Resetting the registry

using LMKit.Agents;

var registry = new AgentRegistry();
// ... agents registered and used ...

Console.WriteLine($"Before clear: {registry.Count} agents");

// Remove all registrations
registry.Clear();

Console.WriteLine($"After clear: {registry.Count} agents");

// Registry is ready for new registrations

Remarks

This method removes all agent registrations but does not dispose the agents themselves. If agents hold resources that need to be released, dispose them separately before or after calling this method.

After calling this method, Count returns 0.