Skip to content

Commit fff1cde

Browse files
committed
follow existing agent builder pattern
1 parent 2b75ed7 commit fff1cde

6 files changed

Lines changed: 170 additions & 202 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
requestBody:
2+
content:
3+
application/json:
4+
examples:
5+
createSkillRequestExample:
6+
description: "Example request to create a user-defined skill"
7+
value:
8+
id: my-custom-skill
9+
name: Custom Analysis Skill
10+
description: A skill for performing custom data analysis.
11+
content: "You are an expert data analyst. Use the available tools to query and analyze data."
12+
tool_ids:
13+
- platform.core.search
14+
responses:
15+
200:
16+
description: "Indicates a successful response"
17+
content:
18+
application/json:
19+
examples:
20+
createSkillResponseExample:
21+
description: "Example response returning the created skill"
22+
value:
23+
id: my-custom-skill
24+
name: Custom Analysis Skill
25+
description: A skill for performing custom data analysis.
26+
content: "You are an expert data analyst. Use the available tools to query and analyze data."
27+
tool_ids:
28+
- platform.core.search
29+
readonly: false
30+
experimental: false
31+
x-codeSamples:
32+
- lang: curl
33+
source: |
34+
curl \
35+
-X POST "https://${KIBANA_URL}/api/agent_builder/skills" \
36+
-H "Authorization: ApiKey ${API_KEY}" \
37+
-H "kbn-xsrf: true" \
38+
-H "Content-Type: application/json" \
39+
-d '{
40+
"id": "my-custom-skill",
41+
"name": "Custom Analysis Skill",
42+
"description": "A skill for performing custom data analysis.",
43+
"content": "You are an expert data analyst.",
44+
"tool_ids": ["platform.core.search"]
45+
}'
46+
- lang: Console
47+
source: |
48+
POST kbn:/api/agent_builder/skills
49+
{
50+
"id": "my-custom-skill",
51+
"name": "Custom Analysis Skill",
52+
"description": "A skill for performing custom data analysis.",
53+
"content": "You are an expert data analyst.",
54+
"tool_ids": ["platform.core.search"]
55+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
responses:
2+
200:
3+
description: "Indicates a successful response"
4+
content:
5+
application/json:
6+
examples:
7+
getSkillResponseExample:
8+
description: "Example response returning a skill by ID"
9+
value:
10+
id: my-custom-skill
11+
name: Custom Analysis Skill
12+
description: A skill for performing custom data analysis.
13+
content: "You are an expert data analyst. Use the available tools to query and analyze data."
14+
tool_ids:
15+
- platform.core.search
16+
readonly: false
17+
experimental: false
18+
x-codeSamples:
19+
- lang: curl
20+
source: |
21+
curl \
22+
-X GET "https://${KIBANA_URL}/api/agent_builder/skills/{skillId}" \
23+
-H "Authorization: ApiKey ${API_KEY}"
24+
- lang: Console
25+
source: |
26+
GET kbn:/api/agent_builder/skills/{skillId}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
responses:
2+
200:
3+
description: "Indicates a successful response"
4+
content:
5+
application/json:
6+
examples:
7+
listSkillsResponseExample:
8+
description: "Example response returning a list of skills"
9+
value:
10+
results:
11+
- id: built-in-skill-id
12+
name: Built-in Skill
13+
description: A built-in skill provided by the platform.
14+
readonly: true
15+
experimental: false
16+
referenced_content_count: 0
17+
- id: custom-skill-id
18+
name: Custom Skill
19+
description: A user-created skill for data analysis.
20+
readonly: false
21+
experimental: false
22+
tool_ids:
23+
- platform.core.search
24+
referenced_content_count: 1
25+
x-codeSamples:
26+
- lang: curl
27+
source: |
28+
curl \
29+
-X GET "https://${KIBANA_URL}/api/agent_builder/skills" \
30+
-H "Authorization: ApiKey ${API_KEY}"
31+
- lang: Console
32+
source: |
33+
GET kbn:/api/agent_builder/skills
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
requestBody:
2+
content:
3+
application/json:
4+
examples:
5+
updateSkillRequestExample:
6+
description: "Example request to update a user-defined skill"
7+
value:
8+
name: Updated Skill Name
9+
description: Updated description for the skill.
10+
content: "Updated skill instructions content."
11+
tool_ids:
12+
- platform.core.search
13+
- platform.core.execute_esql
14+
responses:
15+
200:
16+
description: "Indicates a successful response"
17+
content:
18+
application/json:
19+
examples:
20+
updateSkillResponseExample:
21+
description: "Example response returning the updated skill"
22+
value:
23+
id: my-custom-skill
24+
name: Updated Skill Name
25+
description: Updated description for the skill.
26+
content: "Updated skill instructions content."
27+
tool_ids:
28+
- platform.core.search
29+
- platform.core.execute_esql
30+
readonly: false
31+
experimental: false
32+
x-codeSamples:
33+
- lang: curl
34+
source: |
35+
curl \
36+
-X PUT "https://${KIBANA_URL}/api/agent_builder/skills/{skillId}" \
37+
-H "Authorization: ApiKey ${API_KEY}" \
38+
-H "kbn-xsrf: true" \
39+
-H "Content-Type: application/json" \
40+
-d '{
41+
"name": "Updated Skill Name",
42+
"description": "Updated description for the skill."
43+
}'
44+
- lang: Console
45+
source: |
46+
PUT kbn:/api/agent_builder/skills/{skillId}
47+
{
48+
"name": "Updated Skill Name",
49+
"description": "Updated description for the skill."
50+
}

x-pack/platform/plugins/shared/agent_builder/server/routes/oas_operations.ts

Lines changed: 0 additions & 190 deletions
This file was deleted.

0 commit comments

Comments
 (0)