Skip to main content

joinTeam

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

Join a team within a swarm.

Adds an agent to a team as a member. The agent will be associated with the team and can participate in team-specific tasks and activities.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
teamIdstringYesThe unique identifier of the team to join
dataJoinTeamRequestNoOptional join request information

Returns

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

Example

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

const client = new CodeBoltClient();

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