Skip to main content

createTeam

client.swarm.createTeam(swarmId: string, data: CreateTeamRequest): Promise<SwarmTeam>

Create a team in a swarm.

Creates a new team within the swarm, providing organizational structure for grouping agents. Teams can be assigned specific goals and tasks, with agents collaborating within the team context.

Parameters​

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
dataCreateTeamRequestYesThe team creation information

Returns​

Promise<SwarmTeam> — A promise that resolves to the created SwarmTeam object

Example​

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

const client = new CodeBoltClient();

const result = await client.swarm.createTeam('swarmId', /* CreateTeamRequest */);
console.log(result);