Create a skill
Base URL
https://{kibana_url}
POST
/api/agent_builder/skills
POST
/s/{space_id} /api/agent_builder/skills
Auth
Stack
Experimental
9.4+
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Experimental since 9.4
This functionality is experimental and is not ready for production usage. Experimental features may change or be removed at any time. Elastic will work to fix any issues, but experimental features are not subject to the support SLA of official GA features. Specific Support terms apply.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Create a new user-defined skill. To learn more about Agent Builder skills, refer to the skills documentation .
Privileges
agentBuilder:manageSkills
Expand all
space_id
string
optional
An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.
A required header to protect against CSRF attacks
{
}
content
string
required
Skill instructions content (markdown).
description
string
required
Description of what the skill does.
id
string
required
Unique identifier for the skill.
name
string
required
Human-readable name for the skill.
referenced_content
object [] · max items: 100
+
Show 3 properties
content
string
required
Content of the reference.
name
string
required
Name of the referenced content.
relativePath
string
required
Relative path of the referenced content.
tool_ids
string [] · max items: 100 · default: []
Tool IDs from the tool registry that this skill references.
200
Indicates a successful response
application/json
Thank you for your feedback.
Base URL
https://{kibana_url}
Examples
Example
2 languages
Create skill request
2 languages
Request
Console
1 / 2 languages
‹
›
1
2
3
4
5
6
7
8
POST kbn:/api/agent_builder/skills
{
"id": "my-custom-skill",
"name": "Custom Analysis Skill",
"description": "A skill for performing custom data analysis.",
"content": "You are an expert data analyst.",
"tool_ids": ["platform.core.search"]
}
1
2
3
4
5
6
7
8
9
10
11
12
curl \
-X POST "https://${KIBANA_URL}/api/agent_builder/skills" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{
"id": "my-custom-skill",
"name": "Custom Analysis Skill",
"description": "A skill for performing custom data analysis.",
"content": "You are an expert data analyst.",
"tool_ids": ["platform.core.search"]
}'
Request
Console
1 / 2 languages
‹
›
Example request to create a user-defined skill
Show more
1
2
3
4
5
6
7
8
9
10
POST kbn:/api/agent_builder/skills
{
"content": "You are an expert data analyst. Use the available tools to query and analyze data.",
"description": "A skill for performing custom data analysis.",
"id": "my-custom-skill",
"name": "Custom Analysis Skill",
"tool_ids": [
"platform.core.search"
]
}
Generated from the API spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl \
-X POST "https://${KIBANA_URL}/api/agent_builder/skills" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{
"content": "You are an expert data analyst. Use the available tools to query and analyze data.",
"description": "A skill for performing custom data analysis.",
"id": "my-custom-skill",
"name": "Custom Analysis Skill",
"tool_ids": [
"platform.core.search"
]
}'
Generated from the API spec
Response
Example response returning the created skill
Show more
1
2
3
4
5
6
7
8
9
10
11
{
"content": "You are an expert data analyst. Use the available tools to query and analyze data.",
"description": "A skill for performing custom data analysis.",
"experimental": false,
"id": "my-custom-skill",
"name": "Custom Analysis Skill",
"readonly": false,
"tool_ids": [
"platform.core.search"
]
}