Skip to main content

removeAgent

client.swarm.removeAgent(swarmId: string, agentId: string): Promise<void>

Remove an agent from a swarm.

Unregisters an agent from the swarm, removing it from all teams and roles. The agent will no longer participate in swarm activities.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
agentIdstringYesThe unique identifier of the agent to remove

Returns

Promise<void> — A promise that resolves when the agent is removed

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.swarm.removeAgent('swarmId', 'agentId');
console.log(result);