Skip to main content

updateAgentStatus

client.swarm.updateAgentStatus(swarmId: string, agentId: string, data: AgentStatusUpdateRequest): Promise<void>

Update the status of an agent in a swarm.

Changes the operational status of an agent, such as marking it as available, busy, offline, or in error. Status updates affect agent assignment and task distribution.

Parameters​

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
agentIdstringYesThe unique identifier of the agent
dataAgentStatusUpdateRequestYesThe status update information

Returns​

Promise<void> — A promise that resolves when the status is updated

Example​

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

const client = new CodeBoltClient();

const result = await client.swarm.updateAgentStatus('swarmId', 'agentId', /* AgentStatusUpdateRequest */);
console.log(result);