Skip to main content

approveSpawnRequest

client.swarm.approveSpawnRequest(swarmId: string, requestId: string, data?: SpawnRequestActionBody): Promise<void>

Approve a spawn request.

Approves a pending spawn request, authorizing the creation of new agent instances. The agents will be spawned according to the request specifications.

Parameters​

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
requestIdstringYesThe unique identifier of the spawn request
dataSpawnRequestActionBodyNoOptional approval information

Returns​

Promise<void> — A promise that resolves when the request is approved

Example​

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

const client = new CodeBoltClient();

const result = await client.swarm.approveSpawnRequest('swarmId', 'requestId');
console.log(result);