Update an agent skill
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"tools": [
{
"key": "get-weather",
"version": 1
},
{
"key": "search-docs"
}
],
"tags": [
"documents"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}"
payload = {
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"tools": [{
"key": "get-weather",
"version": 1
}, { "key": "search-docs" }],
"tags": ["documents"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
maintainerId: '507f1f77bcf86cd799439011',
name: 'PDF extraction',
markdown: 'markdown',
maintainerTeamKey: 'example-team-key',
description: 'Extracts text and tables from PDF files.',
tools: [{key: 'get-weather', version: 1}, {key: 'search-docs'}],
tags: ['documents']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'maintainerId' => '507f1f77bcf86cd799439011',
'name' => 'PDF extraction',
'markdown' => 'markdown',
'maintainerTeamKey' => 'example-team-key',
'description' => 'Extracts text and tables from PDF files.',
'tools' => [
[
'key' => 'get-weather',
'version' => 1
],
[
'key' => 'search-docs'
]
],
'tags' => [
'documents'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}"
payload := strings.NewReader("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"_maintainer": {
"kind": "kind"
},
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "PDF extraction",
"markdown": "markdown",
"description": "Extracts text and tables from PDF files.",
"version": 2,
"tools": [
{
"key": "get-weather",
"version": 1
},
{
"key": "search-docs",
"version": 3
}
],
"key": "key",
"tags": [
"documents"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Update an agent skill
Update an existing agent skill. Creates a new version of the skill.
PATCH
/
api
/
v2
/
projects
/
{projectKey}
/
ai-configs
/
skills
/
{skillKey}
Update an agent skill
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"tools": [
{
"key": "get-weather",
"version": 1
},
{
"key": "search-docs"
}
],
"tags": [
"documents"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}"
payload = {
"maintainerId": "507f1f77bcf86cd799439011",
"name": "PDF extraction",
"markdown": "markdown",
"maintainerTeamKey": "example-team-key",
"description": "Extracts text and tables from PDF files.",
"tools": [{
"key": "get-weather",
"version": 1
}, { "key": "search-docs" }],
"tags": ["documents"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
maintainerId: '507f1f77bcf86cd799439011',
name: 'PDF extraction',
markdown: 'markdown',
maintainerTeamKey: 'example-team-key',
description: 'Extracts text and tables from PDF files.',
tools: [{key: 'get-weather', version: 1}, {key: 'search-docs'}],
tags: ['documents']
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'maintainerId' => '507f1f77bcf86cd799439011',
'name' => 'PDF extraction',
'markdown' => 'markdown',
'maintainerTeamKey' => 'example-team-key',
'description' => 'Extracts text and tables from PDF files.',
'tools' => [
[
'key' => 'get-weather',
'version' => 1
],
[
'key' => 'search-docs'
]
],
'tags' => [
'documents'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}"
payload := strings.NewReader("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/skills/{skillKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"maintainerId\": \"507f1f77bcf86cd799439011\",\n \"name\": \"PDF extraction\",\n \"markdown\": \"markdown\",\n \"maintainerTeamKey\": \"example-team-key\",\n \"description\": \"Extracts text and tables from PDF files.\",\n \"tools\": [\n {\n \"key\": \"get-weather\",\n \"version\": 1\n },\n {\n \"key\": \"search-docs\"\n }\n ],\n \"tags\": [\n \"documents\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"_maintainer": {
"kind": "kind"
},
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "PDF extraction",
"markdown": "markdown",
"description": "Extracts text and tables from PDF files.",
"version": 2,
"tools": [
{
"key": "get-weather",
"version": 1
},
{
"key": "search-docs",
"version": 3
}
],
"key": "key",
"tags": [
"documents"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Body
application/json
Agent skill fields to update
Replaces the AI tools pinned to the agent skill, in the order they reach the agent. Leave it out to keep the current tools, or send an empty array to remove them all. A change to the tools or their order creates a new version. Each tool key can appear once, and a skill can pin up to 20 tools by default. You need read access to each tool.
Show child attributes
Show child attributes
Example:
[ { "key": "get-weather", "version": 1 }, { "key": "search-docs" } ]
Response
Agent skill updated
Show child attributes
Show child attributes
Example:
{ "allowed": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ], "denied": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ] }