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.

A skill is a named block of Markdown instructions that gets appended to an agent’s system prompt. Skills are stored in a library and can be reused across agents. When a session starts, every attached skill is materialized as ~/.claude/skills/<slug>/SKILL.md inside the sandbox so the agent can read it directly.

Create a skill

Send a POST to /api/v1/skills with a name, optional description, and content (the Markdown body):
curl -X POST https://your-lap-deployment/api/v1/skills \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "PR reviewer",
    "description": "Guidelines for reviewing pull requests",
    "content": "## PR review checklist\n\n- Check for test coverage\n- Verify no secrets are committed\n- Confirm the PR description explains the why"
  }'
The response is an ApiSkill object:
{
  "id": "sk_01abc...",
  "name": "PR reviewer",
  "description": "Guidelines for reviewing pull requests",
  "content": "## PR review checklist\n\n...",
  "created_at": "2024-01-15T10:00:00.000Z"
}
Save the id — you’ll use it to attach the skill to agents.

Skill fields

FieldTypeRequiredDescription
namestringYesDisplay name shown in the library
descriptionstringNoShort summary of what the skill does
contentstringYesMarkdown instructions appended to the agent’s system prompt

List skills

curl https://your-lap-deployment/api/v1/skills \
  -H "Authorization: Bearer $MASTER_KEY"
Returns { "data": [...] } with all skills you own, ordered newest first.

Attach a skill to an agent

At agent create time

Pass a skill_ids array when creating an agent. Every ID in the list must exist in your library:
curl -X POST https://your-lap-deployment/api/v1/managed_agents/agents \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "pr-review-bot",
    "model": "anthropic/claude-sonnet-4-6",
    "harness_id": "claude-agent-sdk",
    "prompt": "You are a senior engineer.",
    "skill_ids": ["sk_01abc..."]
  }'

To an existing agent

Use POST /api/v1/managed_agents/agents/{id}/skill. You can reference a library skill by ID or provide the content inline. By library ID:
curl -X POST https://your-lap-deployment/api/v1/managed_agents/agents/{agent_id}/skill \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "skill_id": "sk_01abc..." }'
Inline (saves to library automatically):
curl -X POST https://your-lap-deployment/api/v1/managed_agents/agents/{agent_id}/skill \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Security scanner",
    "content": "## Security guidelines\n\nNever log secrets. Sanitize all inputs."
  }'
Inline content is saved to the skill library by default so it can be reattached to other agents. To skip saving, pass "save_to_library": false — the skill will only exist on this agent’s prompt. Multiple skills can be stacked on one agent. Each is appended as a distinct block, ordered by attach time.

Detach a skill

Remove a specific skill from an agent’s prompt:
curl -X DELETE \
  "https://your-lap-deployment/api/v1/managed_agents/agents/{agent_id}/skill?skill_id=sk_01abc..." \
  -H "Authorization: Bearer $MASTER_KEY"
To detach all skills at once, omit the skill_id query parameter:
curl -X DELETE \
  "https://your-lap-deployment/api/v1/managed_agents/agents/{agent_id}/skill" \
  -H "Authorization: Bearer $MASTER_KEY"

Update a skill

curl -X PATCH https://your-lap-deployment/api/v1/skills/{skill_id} \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "content": "Updated checklist content here." }'
You can update name, description, and content independently — only the fields you send are changed.
Updating a skill in the library does not automatically update agents that already have it attached. Detach and reattach the skill to pick up the new content.

Delete a skill

curl -X DELETE https://your-lap-deployment/api/v1/skills/{skill_id} \
  -H "Authorization: Bearer $MASTER_KEY"
Returns 204 No Content on success. Deleting a library skill does not remove its content from agents that already have it attached — the Markdown is embedded in the agent’s prompt at attach time.

Example: “PR reviewer” end to end

BASE="https://your-lap-deployment"
KEY="$MASTER_KEY"

# 1. Create the skill
SKILL_ID=$(curl -s -X POST "$BASE/api/v1/skills" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "PR reviewer",
    "description": "Code review guidelines",
    "content": "## PR review checklist\n\n- Confirm test coverage\n- Check for hardcoded secrets\n- Verify the PR description explains the change"
  }' | jq -r '.id')

# 2. Create an agent with the skill attached
AGENT_ID=$(curl -s -X POST "$BASE/api/v1/managed_agents/agents" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"name\": \"pr-review-bot\",
    \"model\": \"anthropic/claude-sonnet-4-6\",
    \"harness_id\": \"claude-agent-sdk\",
    \"prompt\": \"You are a senior engineer.\",
    \"skill_ids\": [\"$SKILL_ID\"]
  }" | jq -r '.id')

echo "Agent $AGENT_ID created with skill $SKILL_ID"