Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.litellm-agent-platform.ai/llms.txt

Use this file to discover all available pages before exploring further.

Skills are reusable instruction sets stored in a library and attached to agents. When you attach a skill to an agent, its content is appended to the agent’s system prompt as a <!-- skill:<id> --> block. The same skill can be attached to multiple agents; updating the skill library entry does not retroactively update attached agents.

Endpoints

MethodPathDescription
POST/api/v1/skillsCreate a skill
GET/api/v1/skillsList all skills
GET/api/v1/skills/{skill_id}Get a skill
PATCH/api/v1/skills/{skill_id}Update a skill
DELETE/api/v1/skills/{skill_id}Delete a skill
POST/api/v1/managed_agents/agents/{agent_id}/skillAttach a skill to an agent
DELETE/api/v1/managed_agents/agents/{agent_id}/skill?skill_id={skill_id}Detach a skill from an agent

Create a skill

POST /api/v1/skills
Headers
HeaderValue
AuthorizationBearer <MASTER_KEY>
Content-Typeapplication/json

Body parameters

name
string
required
Display name for the skill.
content
string
required
Skill instructions in plain text or Markdown. This content is injected verbatim into the agent’s system prompt.
description
string
Optional short description shown in the web UI skill library.
Returns 201 Created with the new ApiSkill object.

List skills

GET /api/v1/skills
Returns { data: ApiSkill[] } — all skills owned by the authenticated user, newest first.

Get a skill

GET /api/v1/skills/{skill_id}
Returns the ApiSkill object or 404 if not found.

Update a skill

PATCH /api/v1/skills/{skill_id}
All fields are optional. Only fields you include are updated.
name
string
New display name.
description
string | null
New description. Pass null to clear it.
content
string
New skill content. Does not retroactively update already-attached agents.
Returns the updated ApiSkill object.

Delete a skill

DELETE /api/v1/skills/{skill_id}
Returns 204 No Content. Does not remove the skill block from agent prompts that already have it attached.

Attach a skill to an agent

POST /api/v1/managed_agents/agents/{agent_id}/skill
Appends a skill block to the agent’s system prompt. You can attach by referencing an existing library skill, or by providing inline content.

Attach by skill ID

skill_id
string
required
ID of an existing skill in the library to attach.

Attach inline content

content
string
required
Skill instructions to inject. Unless save_to_library is false, the content is also saved to the skill library and can be reattached to other agents.
name
string
Name for the new library entry. Defaults to Skill <ISO timestamp> if omitted.
description
string
Description for the new library entry.
save_to_library
boolean
default:"true"
When false, the content is attached ephemerally — no skill library entry is written, and the attachment cannot be looked up or reattached later.

Response

{
  "agent": { /* updated ApiAgent */ },
  "skill": { /* ApiSkill — omitted when save_to_library: false */ }
}

Detach a skill from an agent

DELETE /api/v1/managed_agents/agents/{agent_id}/skill?skill_id={skill_id}
Strips the named skill block from the agent’s prompt. Omit skill_id to strip all skill blocks at once. Returns { "agent": { /* updated ApiAgent */ } }.

ApiSkill response fields

id
string
Unique skill ID.
name
string
Display name.
description
string | null
Optional description. null if not set.
content
string
Skill instructions injected into agent prompts.
created_at
string
ISO 8601 creation timestamp.

Example: create and attach a skill

curl -X POST "https://<your-platform-host>/api/v1/skills" \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "GitHub PR review checklist",
    "description": "Standard checklist for reviewing pull requests",
    "content": "When reviewing a PR, always check:\n1. Does the code have tests?\n2. Are there any security issues?\n3. Is the documentation updated?"
  }'
{
  "id": "skl_01m3abc",
  "name": "GitHub PR review checklist",
  "description": "Standard checklist for reviewing pull requests",
  "content": "When reviewing a PR, always check:\n1. Does the code have tests?\n2. Are there any security issues?\n3. Is the documentation updated?",
  "created_at": "2025-05-01T11:00:00.000Z"
}