Skills
A Skill gives an agent instructions for its task. The agent uses its bound AI resource for the model and base instructions. The runtime adds the Skill's Markdown to those instructions.
Create a Skill
POST https://app.predictabledialogs.com/v1/skills
Creates a Skill and attaches it to the specified agent. The runtime uses it as the default Skill for a new chat turn.
For a complete setup:
- Create an agent with
POST /v1/agents. Save the returneddata.id. - Create an AI resource with
POST /v1/ai, then attach it to the agent. - Create the Skill using the agent's
data.id. You can also create the Skill before attaching the AI resource.
| Field | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | The agent's data.id from the Agents API. |
skillMarkdown | string | Yes | Nonblank Markdown instructions, up to 20,000 characters. |
Example request
curl -X POST https://app.predictabledialogs.com/v1/skills \
-H "Authorization: Bearer $PD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agentId": "cmp0ss8n40005wlwnh9wi6u99",
"skillMarkdown": "## Support\nAsk for the order number before helping with order status."
}'
Response
Returns 201 Created with the new Skill and its generated name.
{
"data": {
"id": "cmp0ws9yx000iwqpfq37mts20",
"agentId": "cmp0ss8n40005wlwnh9wi6u99",
"name": "My-Website-Chatbot-primary-skill",
"skillMarkdown": "## Support\nAsk for the order number before helping with order status."
}
}
| Status | Meaning |
|---|---|
400 | The agent ID or Skill Markdown is invalid. |
401 | The bearer token is missing or invalid. |
403 | The delegated OAuth token lacks the pd:write scope. |
404 | The agent could not be found in the token's organization. |
409 | The agent already has an enabled required Skill. The existing Skill is preserved. |
429 | The request exceeded the rate limit. |