# Skills API

> Packaged capabilities your assistants use: instructions, connected tool servers and recurring workflows.

Part of the AGNT API reference. AGNT (https://agnt.ai) is the developer platform behind OpenAssistant (https://openassistant.us). Docs index: https://agnt.ai/llms.txt. Web page: https://agnt.ai/reference/api/skills

Base URL: `https://api.agnt.ai`. Auth: `Authorization: Bearer ak_live_...`.

## GET /skills

List skills

Returns the skills available to the caller, with how each is installed for them.

**Query parameters**

- `kind` (enum) One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
- `q` (string): Search name and title
- `page` (integer)
- `limit` (integer)

**Responses**

- `200`: Skills
  - `ok` (boolean)
  - `skills` (object[])
    - `id` (string): Skill id
    - `name` (string): Unique slug
    - `title` (string)
    - `description` (string)
    - `whenToUse` (string): When the assistant should reach for it
    - `instructions` (string)
    - `kind` (enum): knowledge: instructions only. mcp: a connected tool server. workflow: a recurring task. plugin and cli: code (account keys only). One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
    - `status` (enum) One of: `active`, `draft`, `archived`.
    - `access` (enum) One of: `public`, `private`.
    - `contentVisibility` (enum): opaque hides the instructions from users who can run the skill One of: `transparent`, `opaque`.
    - `approvalMode` (enum) One of: `auto`, `manual`.
    - `version` (number)
    - `tags` (string[])
    - `modelTier` (enum): For workflows: tier of the tasks it starts; null inherits One of: `low`, `medium`, `high`, `ultra`, `null`.
    - `defaultEffort` (enum): For workflows: Reasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. null inherits the account default. One of: `low`, `medium`, `high`, `xhigh`, `max`, `null`.
    - `installation` (object | null): How the skill is installed for the caller
      - `id` (string)
      - `source` (string): own for skills you created
      - `status` (enum) One of: `live`, `paused`.
    - `createdAt` (string)
    - `updatedAt` (string)
  - `total` (integer)
  - `page` (integer)

```bash
curl 'https://api.agnt.ai/skills' \
  -H "Authorization: Bearer ak_live_..."
```

Example response:

```json
{
  "ok": true,
  "skills": [
    {
      "id": "6660c4a1f2e3b7d8a9c01234",
      "name": "Ava",
      "title": "Send Brightline the contract renewal",
      "description": "Draft it, get Maria to sign off, send it."
    }
  ],
  "total": 42,
  "page": 1
}
```

## POST /skills

Create a skill

Creates a skill. Every kind takes `name`, `title`, `description` and `instructions`. `kind: "workflow"` adds `triggers` and run limits; `kind: "mcp"` takes `mcpServerUrl`, `mcpTransport` and `mcpAuthType`. With an account key alone the skill is available app-wide; with `X-User-Email` it is created for that user only.

**Request body** (JSON)

- `name` (string): Unique slug. Required, except for kind mcp with mcpServerUrl.
- `title` (string): Display name. Required, except for kind mcp with mcpServerUrl.
- `description` (string): What the skill does, up to 5000 characters. Required, except for kind mcp with mcpServerUrl, task templates and cli skills.
- `whenToUse` (string): When the assistant should use it
- `instructions` (string): The content the assistant follows. For kind workflow: what each run does.
- `kind` (enum): Defaults to agent. knowledge: instructions only. mcp: a connected tool server. workflow: recurring or event-driven work; each firing creates a task. plugin and cli: code (account keys only). One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
- `access` (enum) One of: `public`, `private`.
- `contentVisibility` (enum) One of: `transparent`, `opaque`.
- `approvalMode` (enum) One of: `auto`, `manual`.
- `tags` (string[])
- `modelTier` (enum): For workflows: tier of the tasks it starts; null inherits One of: `low`, `medium`, `high`, `ultra`, `null`.
- `defaultEffort` (enum): For workflows: Reasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. null inherits the account default. One of: `low`, `medium`, `high`, `xhigh`, `max`, `null`.
- `scheduleType` (enum): kind workflow. Inferred from triggers when omitted: recurring with a cron trigger, trigger-based with webhook, timestamp or condition triggers. One of: `now`, `recurring`, `trigger-based`.
- `triggers` (object[]): kind workflow: when it fires. Each firing creates a task.
  - `on` (enum, required): cron: a fixed schedule. webhook: a calendar or email event. timestamp: relative to a time on the matched event. condition: when a polled condition becomes true. inactivity: when an expected event did not happen. system: when another workflow or task completes or fails. compound: several sub-triggers with and / or. manual: only when run by hand. One of: `cron`, `webhook`, `timestamp`, `condition`, `inactivity`, `system`, `compound`, `manual`.
  - `schedule` (object): For cron
    - `frequency` (enum, required) One of: `minutely`, `hourly`, `daily`, `weekly`, `monthly`.
    - `interval` (integer): Every Nth minute, hour, day, week or month
    - `days` (string[]): Weekdays to run on; the string working-days is also accepted
    - `hour` (integer)
    - `minute` (integer)
    - `dayOfMonth` (integer): For monthly
  - `timezone` (string): IANA timezone for schedule, such as America/New_York
  - `category` (enum): For webhook, timestamp and inactivity: which kind of source One of: `calendar`, `email`.
  - `event` (enum): For webhook One of: `event.scheduled`, `event.rescheduled`, `event.attendeesUpdated`, `event.metadataUpdated`, `event.cancelled`, `email.received`, `email.sent`, `task.completed`, `task.failed`, `task.created`, `workflow.triggered`, `workflow.completed`, `workflow.failed`.
  - `conditionPrompt` (string): For webhook: a plain-language filter the event must also satisfy
  - `delayOffset` (object): For webhook and system: fire this long after the match
    - `value` (integer)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `timestampField` (string): For timestamp: the event field to anchor to, such as startTime
  - `timestampOffset` (object): For timestamp: negative is before the anchor
    - `offset` (number)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `naturalCondition` (string): For condition: the condition in plain language
  - `pollInterval` (object): For condition
    - `value` (number)
    - `unit` (enum) One of: `minutes`, `hours`.
  - `inactivityWindow` (object): For inactivity
    - `offset` (number)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `systemEvent` (enum): For system One of: `task.completed`, `task.failed`, `task.created`, `workflow.triggered`, `workflow.completed`, `workflow.failed`.
  - `sourceWorkflow` (string): For system: the workflow whose event this listens to
  - `compoundOperator` (enum): For compound One of: `and`, `or`.
  - `subTriggers` (object[]): For compound: triggers in this same shape
- `maxRuns` (integer | null): kind workflow: stop after this many runs
- `recurrenceEndsAt` (string | null): kind workflow: stop after this time
- `maxConcurrent` (integer): kind workflow: runs allowed at once
- `cooldownMs` (integer): kind workflow: minimum gap between firings
- `overflowBehavior` (enum): kind workflow: what a firing does while maxConcurrent runs are going One of: `queue`, `drop`, `replace`.
- `mcpServerUrl` (string): kind mcp: the MCP server URL. With it, name, title and description are optional and are taken from the server when omitted.
- `mcpTransport` (enum): kind mcp: transport for a remote server One of: `streamable-http`, `sse`.
- `mcpAuthType` (enum): kind mcp: how users authenticate to the server One of: `none`, `oauth`, `api_key`.
- `mcpRequiredScopes` (string[]): kind mcp with oauth: scopes to request

**Responses**

- `201`: Skill
  - `ok` (boolean)
  - `skill` (object)
    - `id` (string): Skill id
    - `name` (string): Unique slug
    - `title` (string)
    - `description` (string)
    - `whenToUse` (string): When the assistant should reach for it
    - `instructions` (string)
    - `kind` (enum): knowledge: instructions only. mcp: a connected tool server. workflow: a recurring task. plugin and cli: code (account keys only). One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
    - `status` (enum) One of: `active`, `draft`, `archived`.
    - `access` (enum) One of: `public`, `private`.
    - `contentVisibility` (enum): opaque hides the instructions from users who can run the skill One of: `transparent`, `opaque`.
    - `approvalMode` (enum) One of: `auto`, `manual`.
    - `version` (number)
    - `tags` (string[])
    - `modelTier` (enum): For workflows: tier of the tasks it starts; null inherits One of: `low`, `medium`, `high`, `ultra`, `null`.
    - `defaultEffort` (enum): For workflows: Reasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. null inherits the account default. One of: `low`, `medium`, `high`, `xhigh`, `max`, `null`.
    - `installation` (object | null): How the skill is installed for the caller
      - `id` (string)
      - `source` (string): own for skills you created
      - `status` (enum) One of: `live`, `paused`.
    - `createdAt` (string)
    - `updatedAt` (string)
- `400`: Invalid body
- `403`: Not allowed for this caller, such as an end user creating a plugin or code skill
- `409`: A skill with this name exists

```bash
curl 'https://api.agnt.ai/skills' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "vendor-approval-policy",
  "title": "Vendor approval policy",
  "description": "Harborview rules for approving vendor quotes",
  "kind": "knowledge",
  "instructions": "Quotes over 5,000 USD need sign-off from Maria Chen before you accept them."
}'
```

Example response:

```json
{
  "ok": true,
  "skill": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "name": "Ava",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
```

## GET /skills/{skillId}

Retrieve a skill

Retrieves a skill by id or name.

**Path parameters**

- `skillId` (string, required)

**Responses**

- `200`: Skill
  - Same fields as the `201` response of `POST /skills`.
- `404`: Skill not found

```bash
curl 'https://api.agnt.ai/skills/<skillId>' \
  -H "Authorization: Bearer ak_live_..."
```

Example response:

```json
{
  "ok": true,
  "skill": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "name": "Ava",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
```

## PATCH /skills/{skillId}

Update a skill

Updates a skill you created. Only the fields you send change. `skillId` is the id or the name.

**Path parameters**

- `skillId` (string, required)

**Request body** (JSON)

- `name` (string): Unique slug. Required, except for kind mcp with mcpServerUrl.
- `title` (string): Display name. Required, except for kind mcp with mcpServerUrl.
- `description` (string): What the skill does, up to 5000 characters. Required, except for kind mcp with mcpServerUrl, task templates and cli skills.
- `whenToUse` (string): When the assistant should use it
- `instructions` (string): The content the assistant follows. For kind workflow: what each run does.
- `kind` (enum): Defaults to agent. knowledge: instructions only. mcp: a connected tool server. workflow: recurring or event-driven work; each firing creates a task. plugin and cli: code (account keys only). One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
- `access` (enum) One of: `public`, `private`.
- `contentVisibility` (enum) One of: `transparent`, `opaque`.
- `approvalMode` (enum) One of: `auto`, `manual`.
- `tags` (string[])
- `modelTier` (enum): For workflows: tier of the tasks it starts; null inherits One of: `low`, `medium`, `high`, `ultra`, `null`.
- `defaultEffort` (enum): For workflows: Reasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. null inherits the account default. One of: `low`, `medium`, `high`, `xhigh`, `max`, `null`.
- `status` (enum) One of: `active`, `draft`, `archived`.
- `scheduleType` (enum): kind workflow. Inferred from triggers when omitted: recurring with a cron trigger, trigger-based with webhook, timestamp or condition triggers. One of: `now`, `recurring`, `trigger-based`.
- `triggers` (object[]): kind workflow: when it fires. Each firing creates a task.
  - `on` (enum, required): cron: a fixed schedule. webhook: a calendar or email event. timestamp: relative to a time on the matched event. condition: when a polled condition becomes true. inactivity: when an expected event did not happen. system: when another workflow or task completes or fails. compound: several sub-triggers with and / or. manual: only when run by hand. One of: `cron`, `webhook`, `timestamp`, `condition`, `inactivity`, `system`, `compound`, `manual`.
  - `schedule` (object): For cron
    - `frequency` (enum, required) One of: `minutely`, `hourly`, `daily`, `weekly`, `monthly`.
    - `interval` (integer): Every Nth minute, hour, day, week or month
    - `days` (string[]): Weekdays to run on; the string working-days is also accepted
    - `hour` (integer)
    - `minute` (integer)
    - `dayOfMonth` (integer): For monthly
  - `timezone` (string): IANA timezone for schedule, such as America/New_York
  - `category` (enum): For webhook, timestamp and inactivity: which kind of source One of: `calendar`, `email`.
  - `event` (enum): For webhook One of: `event.scheduled`, `event.rescheduled`, `event.attendeesUpdated`, `event.metadataUpdated`, `event.cancelled`, `email.received`, `email.sent`, `task.completed`, `task.failed`, `task.created`, `workflow.triggered`, `workflow.completed`, `workflow.failed`.
  - `conditionPrompt` (string): For webhook: a plain-language filter the event must also satisfy
  - `delayOffset` (object): For webhook and system: fire this long after the match
    - `value` (integer)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `timestampField` (string): For timestamp: the event field to anchor to, such as startTime
  - `timestampOffset` (object): For timestamp: negative is before the anchor
    - `offset` (number)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `naturalCondition` (string): For condition: the condition in plain language
  - `pollInterval` (object): For condition
    - `value` (number)
    - `unit` (enum) One of: `minutes`, `hours`.
  - `inactivityWindow` (object): For inactivity
    - `offset` (number)
    - `unit` (enum) One of: `minutes`, `hours`, `days`.
  - `systemEvent` (enum): For system One of: `task.completed`, `task.failed`, `task.created`, `workflow.triggered`, `workflow.completed`, `workflow.failed`.
  - `sourceWorkflow` (string): For system: the workflow whose event this listens to
  - `compoundOperator` (enum): For compound One of: `and`, `or`.
  - `subTriggers` (object[]): For compound: triggers in this same shape
- `maxRuns` (integer | null): kind workflow: stop after this many runs
- `recurrenceEndsAt` (string | null): kind workflow: stop after this time
- `maxConcurrent` (integer): kind workflow: runs allowed at once
- `cooldownMs` (integer): kind workflow: minimum gap between firings
- `overflowBehavior` (enum): kind workflow: what a firing does while maxConcurrent runs are going One of: `queue`, `drop`, `replace`.
- `mcpServerUrl` (string): kind mcp: the MCP server URL. With it, name, title and description are optional and are taken from the server when omitted.
- `mcpTransport` (enum): kind mcp: transport for a remote server One of: `streamable-http`, `sse`.
- `mcpAuthType` (enum): kind mcp: how users authenticate to the server One of: `none`, `oauth`, `api_key`.
- `mcpRequiredScopes` (string[]): kind mcp with oauth: scopes to request

**Responses**

- `200`: Skill
  - Same fields as the `201` response of `POST /skills`.
- `403`: Not your skill
- `404`: Skill not found

```bash
curl 'https://api.agnt.ai/skills/<skillId>' \
  -X PATCH \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "instructions": "Quotes over 10,000 USD need sign-off from Maria Chen before you accept them."
}'
```

Example response:

```json
{
  "ok": true,
  "skill": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "name": "Ava",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
```

## PUT /skills/{skillId}

Update a skill

Updates a skill you created. Only the fields you send change. `skillId` is the id or the name.

**Path parameters**

- `skillId` (string, required)

**Request body** (JSON)

- Same fields as the request body of `PATCH /skills/{skillId}`.

**Responses**

- `200`: Skill
  - Same fields as the `201` response of `POST /skills`.
- `403`: Not your skill
- `404`: Skill not found

```bash
curl 'https://api.agnt.ai/skills/<skillId>' \
  -X PUT \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "instructions": "Quotes over 10,000 USD need sign-off from Maria Chen before you accept them."
}'
```

Example response:

```json
{
  "ok": true,
  "skill": {
    "id": "6660c4a1f2e3b7d8a9c01234",
    "name": "Ava",
    "title": "Send Brightline the contract renewal",
    "description": "Draft it, get Maria to sign off, send it."
  }
}
```

## POST /skills/{skillId}/publish

Publish a skill

Saves the skill's current content as a new version. Pass `deploy` to make that version live in `environment`. `skillId` must be the id.

**Path parameters**

- `skillId` (string, required)

**Request body** (JSON)

- `environment` (string, required): Environment slug
- `deploy` (boolean)
- `note` (string): Release note

**Responses**

- `200`: Published
  - `ok` (boolean)
  - `publish` (object)
    - `versionNumber` (number)
    - `etag` (string)
    - `skill` (object)
      - `id` (string): Skill id
      - `name` (string): Unique slug
      - `title` (string)
      - `description` (string)
      - `whenToUse` (string): When the assistant should reach for it
      - `instructions` (string)
      - `kind` (enum): knowledge: instructions only. mcp: a connected tool server. workflow: a recurring task. plugin and cli: code (account keys only). One of: `knowledge`, `mcp`, `cli`, `agent`, `prompt`, `plugin`, `workflow`, `task_template`.
      - `status` (enum) One of: `active`, `draft`, `archived`.
      - `access` (enum) One of: `public`, `private`.
      - `contentVisibility` (enum): opaque hides the instructions from users who can run the skill One of: `transparent`, `opaque`.
      - `approvalMode` (enum) One of: `auto`, `manual`.
      - `version` (number)
      - `tags` (string[])
      - `modelTier` (enum): For workflows: tier of the tasks it starts; null inherits One of: `low`, `medium`, `high`, `ultra`, `null`.
      - `defaultEffort` (enum): For workflows: Reasoning effort: how much thinking the assistant applies on each run, independent of modelTier. low, medium, high, xhigh (extra high) or max. null inherits the account default. One of: `low`, `medium`, `high`, `xhigh`, `max`, `null`.
      - `installation` (object | null): How the skill is installed for the caller
        - `id` (string)
        - `source` (string): own for skills you created
        - `status` (enum) One of: `live`, `paused`.
      - `createdAt` (string)
      - `updatedAt` (string)
- `400`: Missing environment, skillId is a name rather than an id, or the publish failed
- `404`: Skill not found

```bash
curl 'https://api.agnt.ai/skills/<skillId>/publish' \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "environment": "production"
}'
```

Example response:

```json
{
  "ok": true,
  "publish": {
    "versionNumber": 1,
    "etag": "etag",
    "skill": {
      "id": "6660c4a1f2e3b7d8a9c01234",
      "name": "Ava",
      "title": "Send Brightline the contract renewal",
      "description": "Draft it, get Maria to sign off, send it."
    }
  }
}
```
