Skip to main content

Agents API

Agents API - agent management

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
changeAgentChanges the currently active agent.
createCustomLocalAgentCreates a custom local agent.
createFlowAgentCreates a flow-based agent.
createRemoteAgentCreates a remote agent.
deleteRemixAgentDeletes a remix agent.
getAgentConfigRetrieves the configuration for a specific agent by name.
getAgentConfigsRetrieves all agent configurations.
getAgentFromLocalRetrieves the agent stored in local storage.
getAgentPropertiesRetrieves the global agent properties.
getAllRemixAgentsRetrieves all remix agents.
getFeaturedAgentsRetrieves featured agents from the agent registry.
getInstalledRetrieves all installed agents.
getInstalledAgentsActionRetrieves action configurations for all installed agents.
getLocalAgentsRetrieves agents installed from local sources.
getRecommendedAgentsRetrieves recommended agents based on the current context.
getRemixAgentRetrieves a specific remix agent by name.
getRunningAgentsRetrieves all currently running agents.
installInstalls an agent from the remote registry.
installLocalInstalls an agent from a local file path.
saveRemixAgentSaves a remix agent.
startAgentStarts a new agent instance with the specified configuration.
stopAgentStops a running agent.
updateAgentUpdates an installed agent to a newer version.
updateAgentIndexUpdates the agent router index.
updateAgentPropertiesUpdates the global agent properties.
updateRemixAgentUpdates a remix agent.

Methods


changeAgent

client.agents.changeAgent(data: ChangeAgentRequest): Promise<Agent>

Changes the currently active agent.

Switches the runtime to use a different agent, stopping the current one if necessary. Use this when transitioning between different agent types during a workflow.

ParameterTypeRequiredDescription
dataChangeAgentRequestYesThe agent change configuration

Returns: Promise<Agent> — A promise that resolves to the newly active Agent instance

Full reference →


createCustomLocalAgent

client.agents.createCustomLocalAgent(data: CreateCustomLocalAgentRequest): Promise<Agent>

Creates a custom local agent.

Defines a new agent from scratch on the local filesystem with custom configuration, making it available for use in the runtime.

ParameterTypeRequiredDescription
dataCreateCustomLocalAgentRequestYesThe custom agent creation configuration

Returns: Promise<Agent> — A promise that resolves to the created Agent

Full reference →


createFlowAgent

client.agents.createFlowAgent(data: CreateFlowAgentRequest): Promise<Agent>

Creates a flow-based agent.

Defines a new agent that operates based on a visual flow definition, where behavior is determined by connected nodes in a flow graph.

ParameterTypeRequiredDescription
dataCreateFlowAgentRequestYesThe flow agent creation configuration

Returns: Promise<Agent> — A promise that resolves to the created Agent

Full reference →


createRemoteAgent

client.agents.createRemoteAgent(data: CreateRemoteAgentRequest): Promise<Agent>

Creates a remote agent.

Registers a new agent that runs on a remote server, allowing CodeBolt to delegate tasks to external agent services.

ParameterTypeRequiredDescription
dataCreateRemoteAgentRequestYesThe remote agent creation configuration

Returns: Promise<Agent> — A promise that resolves to the created Agent

Full reference →


deleteRemixAgent

client.agents.deleteRemixAgent(name: string): Promise<void>

Deletes a remix agent.

Permanently removes the specified remix agent from the system.

ParameterTypeRequiredDescription
namestringYesThe name of the remix agent to delete

Returns: Promise<void> — A promise that resolves when the remix agent has been deleted

Full reference →


getAgentConfig

client.agents.getAgentConfig(agentName: string): Promise<AgentConfig>

Retrieves the configuration for a specific agent by name.

Returns the full configuration object for the named agent, including its capabilities, settings, and metadata.

ParameterTypeRequiredDescription
agentNamestringYesThe name of the agent to look up

Returns: Promise<AgentConfig> — A promise that resolves to the AgentConfig for the specified agent

Full reference →


getAgentConfigs

client.agents.getAgentConfigs(): Promise<AgentConfig[]>

Retrieves all agent configurations.

Returns configuration objects for every registered agent in the system.

No parameters.

Returns: Promise<AgentConfig[]> — A promise that resolves to an array of AgentConfig objects

Full reference →


getAgentFromLocal

client.agents.getAgentFromLocal(): Promise<Agent>

Retrieves the agent stored in local storage.

Returns the agent configuration that has been persisted locally, typically the last-used or default agent for the current workspace.

No parameters.

Returns: Promise<Agent> — A promise that resolves to the locally stored Agent

Full reference →


getAgentProperties

client.agents.getAgentProperties(): Promise<AgentProperties>

Retrieves the global agent properties.

Returns system-wide properties that apply to all agents, such as default timeouts, resource limits, and shared configuration.

No parameters.

Returns: Promise<AgentProperties> — A promise that resolves to the AgentProperties object

Full reference →


getAllRemixAgents

client.agents.getAllRemixAgents(): Promise<RemixAgent[]>

Retrieves all remix agents.

Returns every remix agent that has been created in the system.

No parameters.

Returns: Promise<RemixAgent[]> — A promise that resolves to an array of RemixAgent objects

Full reference →


getFeaturedAgents

client.agents.getFeaturedAgents(): Promise<Agent[]>

Retrieves featured agents from the agent registry.

Returns a curated list of agents that are highlighted or promoted in the CodeBolt marketplace.

No parameters.

Returns: Promise<Agent[]> — A promise that resolves to an array of featured Agent objects

Full reference →


getInstalled

client.agents.getInstalled(): Promise<Agent[]>

Retrieves all installed agents.

Returns every agent that has been installed in the current CodeBolt environment, whether from the registry or locally.

No parameters.

Returns: Promise<Agent[]> — A promise that resolves to an array of installed Agent objects

Full reference →


getInstalledAgentsAction

client.agents.getInstalledAgentsAction(): Promise<AgentConfig[]>

Retrieves action configurations for all installed agents.

Returns the action capability definitions for each installed agent, describing what actions they can perform.

No parameters.

Returns: Promise<AgentConfig[]> — A promise that resolves to an array of AgentConfig objects

Full reference →


getLocalAgents

client.agents.getLocalAgents(): Promise<Agent[]>

Retrieves agents installed from local sources.

Returns only agents that were installed from the local filesystem, excluding those from the remote registry.

No parameters.

Returns: Promise<Agent[]> — A promise that resolves to an array of locally installed Agent objects

Full reference →


getRecommendedAgents

client.agents.getRecommendedAgents(): Promise<Agent[]>

Retrieves recommended agents based on the current context.

Returns agents that are suggested based on the current project type, user preferences, or usage patterns.

No parameters.

Returns: Promise<Agent[]> — A promise that resolves to an array of recommended Agent objects

Full reference →


getRemixAgent

client.agents.getRemixAgent(name: string): Promise<RemixAgent>

Retrieves a specific remix agent by name.

Returns the full definition of a remix agent, including its base agent reference and customizations.

ParameterTypeRequiredDescription
namestringYesThe name of the remix agent to retrieve

Returns: Promise<RemixAgent> — A promise that resolves to the RemixAgent object

Full reference →


getRunningAgents

client.agents.getRunningAgents(): Promise<Agent[]>

Retrieves all currently running agents.

Returns a list of agents that are actively executing in the runtime.

No parameters.

Returns: Promise<Agent[]> — A promise that resolves to an array of running Agent objects

Full reference →


install

client.agents.install(data: InstallAgentRequest): Promise<Agent>

Installs an agent from the remote registry.

Downloads and registers an agent from the CodeBolt agent marketplace, making it available for local use.

ParameterTypeRequiredDescription
dataInstallAgentRequestYesThe installation configuration

Returns: Promise<Agent> — A promise that resolves to the installed Agent

Full reference →


installLocal

client.agents.installLocal(data: InstallLocalAgentRequest): Promise<Agent>

Installs an agent from a local file path.

Loads and registers an agent from the local filesystem, making it available for use in the runtime.

ParameterTypeRequiredDescription
dataInstallLocalAgentRequestYesThe local installation configuration

Returns: Promise<Agent> — A promise that resolves to the installed Agent

Full reference →


saveRemixAgent

client.agents.saveRemixAgent(data: RemixAgent): Promise<RemixAgent>

Saves a remix agent.

Creates or saves a remix agent, which is a customized variant of an existing agent with modified prompts, settings, or capabilities.

ParameterTypeRequiredDescription
dataRemixAgentYesThe remix agent definition to save

Returns: Promise<RemixAgent> — A promise that resolves to the saved RemixAgent

Full reference →


startAgent

client.agents.startAgent(data: StartAgentRequest): Promise<Agent>

Starts a new agent instance with the specified configuration.

Initializes and launches an agent process in the CodeBolt runtime. The agent will be configured based on the provided request parameters including its type, capabilities, and execution context.

ParameterTypeRequiredDescription
dataStartAgentRequestYesThe agent start configuration

Returns: Promise<Agent> — A promise that resolves to the started Agent instance with its runtime details

Full reference →


stopAgent

client.agents.stopAgent(data: StopAgentRequest): Promise<void>

Stops a running agent.

Sends a stop signal to the specified agent, causing it to terminate gracefully.

ParameterTypeRequiredDescription
dataStopAgentRequestYesThe stop request configuration

Returns: Promise<void> — A promise that resolves when the agent has been stopped

Full reference →


updateAgent

client.agents.updateAgent(data: UpdateAgentRequest): Promise<Agent>

Updates an installed agent to a newer version.

Applies updates to an already-installed agent, pulling the latest version from the registry or local source.

ParameterTypeRequiredDescription
dataUpdateAgentRequestYesThe update configuration

Returns: Promise<Agent> — A promise that resolves to the updated Agent

Full reference →


updateAgentIndex

client.agents.updateAgentIndex(): Promise<void>

Updates the agent router index.

Forces a rebuild of the internal routing index that maps tasks to appropriate agents. Call this after installing or removing agents.

No parameters.

Returns: Promise<void> — A promise that resolves when the index has been updated

Full reference →


updateAgentProperties

client.agents.updateAgentProperties(data: AgentProperties): Promise<AgentProperties>

Updates the global agent properties.

Modifies system-wide agent settings that apply to all agent instances.

ParameterTypeRequiredDescription
dataAgentPropertiesYesThe updated agent properties

Returns: Promise<AgentProperties> — A promise that resolves to the updated AgentProperties

Full reference →


updateRemixAgent

client.agents.updateRemixAgent(name: string, data: RemixAgent): Promise<RemixAgent>

Updates a remix agent.

Modifies the configuration of an existing remix agent.

ParameterTypeRequiredDescription
namestringYesThe name of the remix agent to update
dataRemixAgentYesThe updated remix agent definition

Returns: Promise<RemixAgent> — A promise that resolves to the updated RemixAgent

Full reference →