Skip to main content

Capability API

Capability API

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createCreates a new capability.
createExecutorCreates a new capability executor.
getDetailRetrieves detailed information for a specific capability.
getExecutorsRetrieves all capability executors.
getStatsRetrieves aggregate statistics about capabilities.
getTypesRetrieves the list of available capability types.
listRetrieves all registered capabilities.
refreshRefreshes the capability registry.

Methods


create

client.capability.create(data: CreateCapabilityRequest): Promise<Capability>

Creates a new capability.

Registers a new capability in the system, defining a skill or action that agents can use.

ParameterTypeRequiredDescription
dataCreateCapabilityRequestYesThe capability creation payload

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

Full reference →


createExecutor

client.capability.createExecutor(data: CreateCapabilityExecutorRequest): Promise<CapabilityExecutor>

Creates a new capability executor.

Registers an executor implementation that can handle invocations of a specific capability.

ParameterTypeRequiredDescription
dataCreateCapabilityExecutorRequestYesThe executor creation payload

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

Full reference →


getDetail

client.capability.getDetail(name: string): Promise<Capability>

Retrieves detailed information for a specific capability.

Returns the full definition of a capability including its configuration, executors, and usage documentation.

ParameterTypeRequiredDescription
namestringYesThe unique name of the capability

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

Full reference →


getExecutors

client.capability.getExecutors(params?: Record<string, unknown>): Promise<CapabilityExecutor[]>

Retrieves all capability executors.

Returns the list of executor implementations that are registered to handle capability invocations.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering

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

Full reference →


getStats

client.capability.getStats(): Promise<CapabilityStats>

Retrieves aggregate statistics about capabilities.

Returns summary metrics about the capability system including total counts, usage rates, and executor distribution.

No parameters.

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

Full reference →


getTypes

client.capability.getTypes(): Promise<string[]>

Retrieves the list of available capability types.

Returns the distinct type identifiers that capabilities can belong to, useful for categorizing or filtering capabilities.

No parameters.

Returns: Promise<string[]> — A promise that resolves to an array of type name strings

Full reference →


list

client.capability.list(params?: Record<string, unknown>): Promise<Capability[]>

Retrieves all registered capabilities.

Returns the complete list of capabilities available in the system, representing the skills and actions that agents can perform.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

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

Full reference →


refresh

client.capability.refresh(data?: Record<string, unknown>): Promise<unknown>

Refreshes the capability registry.

Forces a re-scan and reload of all registered capabilities, picking up any newly added or modified capability definitions.

ParameterTypeRequiredDescription
dataRecord<string, unknown>NoOptional configuration for the refresh operation

Returns: Promise<unknown> — A promise that resolves when the refresh is complete

Full reference →