---
type: api
title: Create a skill
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-agent-builder-skills
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-agent-builder-skills
products:
  - Kibana
---

# Create a skill

Availability: Experimental

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/agent_builder/skills`
- `POST` `/s/{space_id}/api/agent_builder/skills`

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Create a new user-defined skill. To learn more about Agent Builder skills, refer to the [skills documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/skills).

## Required authorization

- Privileges: `agentBuilder:manageSkills`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `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) — optional
  - `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: []) — optional
  Tool IDs from the tool registry that this skill references.

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
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"]
}
```

#### curl

```curl
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"]
  }'
```

## Response examples

#### Create skill response

Example response returning the created skill

```json
{
  "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"
  ]
}
```

