Create a skill Experimental; added in 9.4.0

POST /api/agent_builder/skills

Spaces method and path for this operation:

post /s/{space_id}/api/agent_builder/skills

Refer to Spaces for more information.

Create a new user-defined skill. To learn more about Agent Builder skills, refer to the skills documentation.

[Required authorization] Route required privileges: agentBuilder:manageSkills.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • 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 array[object]

    Not more than 100 elements.

    Hide referenced_content attributes Show referenced_content attributes object
    • 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 array[string]

    Tool IDs from the tool registry that this skill references.

    Not more than 100 elements. Default value is [] (empty).

Responses

  • 200 application/json

    Indicates a successful response

POST /api/agent_builder/skills
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"]
  }'
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"]
}
Request example
Example request to create a user-defined skill
{
  "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"
  ]
}
Response examples (200)
Example response returning the created skill
{
  "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"
  ]
}