Skip to main content

stopSwarm

client.swarm.stopSwarm(swarmId: string, data?: Record<string, unknown>): Promise<void>

Stop a swarm.

Deactivates a swarm, halting all in-progress tasks and agent activities. The swarm will gracefully shut down and return to an idle state.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
dataRecord<string, unknown>NoOptional stop parameters

Returns

Promise<void> — A promise that resolves when the swarm has stopped

Example

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

const client = new CodeBoltClient();

const result = await client.swarm.stopSwarm('swarmId');
console.log(result);