Skip to main content

Swarm

Tools for managing swarms, teams, roles, and vacancies in multi-agent systems.

Tools

swarm_list

Lists all available swarms in the system.

Parameters:

ParameterTypeRequiredDescription
---No parameters required

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_list", {});

swarm_create

Creates a new swarm for organizing and managing agents, teams, roles, and vacancies.

Parameters:

ParameterTypeRequiredDescription
namestringYesThe name of the swarm
descriptionstringNoOptional description of the swarm
allow_external_agentsbooleanNoWhether to allow external agents to join
max_agentsnumberNoMaximum number of agents allowed in the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_create", {
name: "development-swarm",
description: "A swarm for development agents",
allow_external_agents: true,
max_agents: 50
});

swarm_get

Gets details of a specific swarm by its ID.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm to retrieve

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get", {
swarm_id: "swarm-123"
});

swarm_get_agents

Gets all agents registered in a specific swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_agents", {
swarm_id: "swarm-123"
});

swarm_register_agent

Registers an agent to a swarm with specified capabilities and configuration.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm to register the agent to
namestringYesThe name of the agent
agent_idstringNoOptional agent ID (will be generated if not provided)
capabilitiesstring[]NoOptional capabilities of the agent
agent_typestringNoType of agent: "internal" or "external"
connection_endpointstringNoOptional connection endpoint for external agents
connection_protocolstringNoOptional connection protocol: "websocket" or "http"
metadataobjectNoOptional metadata for the agent

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_register_agent", {
swarm_id: "swarm-123",
name: "code-reviewer",
capabilities: ["code-review", "testing"],
agent_type: "internal",
metadata: { priority: "high" }
});

swarm_unregister_agent

Unregisters an agent from a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
agent_idstringYesThe ID of the agent to unregister

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_unregister_agent", {
swarm_id: "swarm-123",
agent_id: "agent-456"
});

swarm_create_team

Creates a new team within a swarm for organizing agents.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm to create the team in
namestringYesThe name of the team
created_bystringYesThe ID of the agent creating the team
descriptionstringNoOptional description of the team
max_membersnumberNoMaximum number of members allowed in the team
metadataobjectNoOptional metadata for the team

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_create_team", {
swarm_id: "swarm-123",
name: "backend-team",
description: "Team for backend development",
max_members: 10,
created_by: "agent-456"
});

swarm_list_teams

Lists all teams in a specific swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_list_teams", {
swarm_id: "swarm-123"
});

swarm_get_team

Gets details of a specific team including its members.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
team_idstringYesThe ID of the team to retrieve

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_team", {
swarm_id: "swarm-123",
team_id: "team-789"
});

swarm_join_team

Adds an agent to a team within a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
team_idstringYesThe ID of the team to join
agent_idstringYesThe ID of the agent joining the team

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_join_team", {
swarm_id: "swarm-123",
team_id: "team-789",
agent_id: "agent-456"
});

swarm_leave_team

Removes an agent from a team within a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
team_idstringYesThe ID of the team to leave
agent_idstringYesThe ID of the agent leaving the team

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_leave_team", {
swarm_id: "swarm-123",
team_id: "team-789",
agent_id: "agent-456"
});

swarm_delete_team

Deletes a team from a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
team_idstringYesThe ID of the team to delete

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_delete_team", {
swarm_id: "swarm-123",
team_id: "team-789"
});

swarm_create_role

Creates a new role within a swarm with specified permissions and constraints.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm to create the role in
namestringYesThe name of the role
created_bystringYesThe ID of the agent creating the role
descriptionstringNoOptional description of the role
permissionsstring[]NoOptional permissions associated with the role
max_assigneesnumberNoMaximum number of agents that can be assigned this role
metadataobjectNoOptional metadata for the role

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_create_role", {
swarm_id: "swarm-123",
name: "lead-developer",
description: "Lead developer role with elevated permissions",
permissions: ["approve-pr", "deploy", "manage-team"],
max_assignees: 3,
created_by: "agent-456"
});

swarm_list_roles

Lists all roles defined in a specific swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_list_roles", {
swarm_id: "swarm-123"
});

swarm_get_role

Gets details of a specific role including its assignees.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
role_idstringYesThe ID of the role to retrieve

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_role", {
swarm_id: "swarm-123",
role_id: "role-101"
});

swarm_assign_role

Assigns a role to an agent within a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
role_idstringYesThe ID of the role to assign
agent_idstringYesThe ID of the agent to assign the role to

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_assign_role", {
swarm_id: "swarm-123",
role_id: "role-101",
agent_id: "agent-456"
});

swarm_unassign_role

Unassigns a role from an agent within a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
role_idstringYesThe ID of the role to unassign
agent_idstringYesThe ID of the agent to unassign the role from

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_unassign_role", {
swarm_id: "swarm-123",
role_id: "role-101",
agent_id: "agent-456"
});

swarm_get_agents_by_role

Gets all agents that have been assigned a specific role.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
role_idstringYesThe ID of the role

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_agents_by_role", {
swarm_id: "swarm-123",
role_id: "role-101"
});

swarm_delete_role

Deletes a role from a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
role_idstringYesThe ID of the role to delete

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_delete_role", {
swarm_id: "swarm-123",
role_id: "role-101"
});

swarm_create_vacancy

Creates a new vacancy for a role within a swarm that agents can apply for.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm to create the vacancy in
role_idstringYesThe ID of the role associated with the vacancy
titlestringYesThe title of the vacancy
created_bystringYesThe ID of the agent creating the vacancy
descriptionstringNoOptional description of the vacancy
requirementsstring[]NoOptional requirements for the vacancy
metadataobjectNoOptional metadata for the vacancy

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_create_vacancy", {
swarm_id: "swarm-123",
role_id: "role-101",
title: "Senior Code Reviewer Needed",
description: "Looking for an experienced agent to handle code reviews",
requirements: ["code-review", "testing", "documentation"],
created_by: "agent-456"
});

swarm_list_vacancies

Lists all vacancies in a specific swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_list_vacancies", {
swarm_id: "swarm-123"
});

swarm_apply_vacancy

Allows an agent to apply for a vacancy in a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
vacancy_idstringYesThe ID of the vacancy to apply for
agent_idstringYesThe ID of the agent applying
messagestringNoOptional application message

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_apply_vacancy", {
swarm_id: "swarm-123",
vacancy_id: "vacancy-202",
agent_id: "agent-456",
message: "I have extensive experience in code review and testing"
});

swarm_close_vacancy

Closes a vacancy in a swarm with a specified reason.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
vacancy_idstringYesThe ID of the vacancy to close
reasonstringYesThe reason for closing the vacancy

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_close_vacancy", {
swarm_id: "swarm-123",
vacancy_id: "vacancy-202",
reason: "Position has been filled"
});

swarm_update_status

Updates the status of an agent in a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm
agent_idstringYesThe ID of the agent
statusstringYesThe new status: "active", "idle", "busy", or "offline"
current_taskstringNoOptional current task the agent is working on
metadataobjectNoOptional metadata for the status update

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_update_status", {
swarm_id: "swarm-123",
agent_id: "agent-456",
status: "busy",
current_task: "Reviewing PR #42",
metadata: { estimated_completion: "2 hours" }
});

swarm_get_status_summary

Gets a status summary for a swarm including counts of agents by status.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_status_summary", {
swarm_id: "swarm-123"
});

swarm_get_default_job_group

Gets the default job group ID associated with a swarm.

Parameters:

ParameterTypeRequiredDescription
swarm_idstringYesThe ID of the swarm

Example:

const result = await codebolt.tools.executeTool("codebolt.swarm", "swarm_get_default_job_group", {
swarm_id: "swarm-123"
});