Skillset Abilitys

Execute Skillset Ability

Execute a skillset ability

post
/v1/skillset/{skillsetId}/ability/{abilityId}/execute

Description

Executes a specific ability from a skillset with the provided input. This endpoint processes the ability's instruction template using the given input and returns the execution result along with usage statistics. The response is streamed as JSON lines (JSONL) to support real-time progress updates during execution.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

skillsetIdstring* Required

The ID of the skillset containing the ability

abilityIdstring* Required

The ID of the ability to execute

Request Body * Required

Request Body Schema: application/json

inputstring

The input to process with the ability. This can be structured text such as JSON or YAML for precise parameter control, or unstructured natural language text. When unstructured text is provided, the system will automatically detect and extract the relevant parameters from the input.

contactIdstring

The ID of the contact to associate with the execution

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.skillset.ability.execute(

skillsetId, abilityId,
{
"input":"string",
"contactId":"string"
}
)
{
"usage":{
"token":"number"
},
"error":"string",
"result":"",
"messages":[
{
"type":"string",
"text":"string",
"meta":"object"
}
]
}
The ability was executed successfully