Skip to main content

leaveTeam

client.swarm.leaveTeam(swarmId: string, teamId: string, data?: LeaveTeamRequest): Promise<void>

Leave a team within a swarm.

Removes an agent from a team, ending their membership. The agent will no longer participate in team activities but remains in the swarm.

Parameters​

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
teamIdstringYesThe unique identifier of the team to leave
dataLeaveTeamRequestNoOptional leave request information

Returns​

Promise<void> — A promise that resolves when the agent has left the team

Example​

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

const client = new CodeBoltClient();

const result = await client.swarm.leaveTeam('swarmId', 'teamId');
console.log(result);