Skip to main content

Skills API

The Skills API provides comprehensive management of procedural memory skills for AI agents. Skills are reusable trigger-action patterns that agents can discover, suggest, synthesize, and execute. The system supports both file-based and procedural memory skills with full CRUD operations and advanced features.

Authentication

All skills endpoints require authentication with API key:

Rate Limits

Basic Skill Operations

Create Skill

Create a new skill with trigger and action. Endpoint: POST /skills Request Body:
Parameters:
  • name (string, required): Unique skill name
  • trigger (string, required): What triggers this skill
  • action (string, required): What the skill does
  • domain (string, required): Skill domain/category
  • confidence (float, default: 0.5, min: 0.0, max: 1.0): Confidence score
  • tags (array, optional): Skill tags for categorization
  • examples (array, optional): Example trigger phrases
  • metadata (object, optional): Additional metadata
Response:
Example:

List Skills

Retrieve all skills with optional filtering. Endpoint: GET /skills Query Parameters:
  • domain (string): Filter by domain
  • trigger (string): Filter by trigger phrase
  • tags (string): Filter by tags (comma-separated)
  • verified (boolean): Filter by verification status
  • limit (integer, default: 20, max: 100): Results per page
  • offset (integer, default: 0): Pagination offset
  • sort (string, default: “usage_count desc”): Sort field and direction
Response:
Example:

Get Skill

Retrieve a specific skill by ID. Endpoint: GET /skills/{id} Response:
Example:

Update Skill

Update an existing skill. Endpoint: PUT /skills/{id} Request Body:
Response:

Delete Skill

Permanently delete a skill. Endpoint: DELETE /skills/{id} Response:

Skill Search and Discovery

Search Skills

Search skills by trigger phrases and domains. Endpoint: GET /skills/search Query Parameters:
  • trigger (string): Search trigger phrases
  • domain (string): Search within domain
  • limit (integer, default: 10, max: 50): Results per page
  • threshold (float, default: 0.7): Similarity threshold
Response:

Get Similar Skills

Find skills similar to a specific skill. Endpoint: GET /skills/{id}/similar Response:

Skill Operations

Use Skill

Increment usage count for a skill. Endpoint: POST /skills/{id}/use Request Body:
Response:

Execute Skill

Execute a skill with context and get results. Endpoint: POST /skills/{id}/execute Request Body:
Parameters:
  • context (object, required): Execution context
  • options (object, optional): Execution options
    • timeout_ms (integer): Execution timeout
    • include_explanation (boolean): Include execution explanation
    • max_tokens (integer): Maximum output tokens
Response:
Example:

LLM-Powered Skill Operations

Suggest Skills

Get LLM-powered skill suggestions based on trigger and context. Endpoint: POST /skills/suggest Request Body:
Parameters:
  • trigger (string, required): Skill trigger phrase
  • context (string, required): Context for suggestion
  • domain (string, optional): Target domain
  • limit (integer, default: 5, max: 10): Number of suggestions
Response:

Synthesize Skills

Merge multiple skills into a generalized skill. Endpoint: POST /skills/synthesize Request Body:
Parameters:
  • skill_ids (array, required): IDs of skills to synthesize
  • name (string, required): New skill name
  • description (string, optional): Skill description
Response:

Extract Skills from Content

Extract skills from text content using LLM. Endpoint: POST /skills/extract Request Body:
Parameters:
  • content (string, required): Content to extract skills from
  • domain (string, optional): Target domain for extracted skills
  • confidence_threshold (float, default: 0.5): Minimum confidence for extraction
Response:

Skill Chains

Create Skill Chain

Create a multi-step skill chain. Endpoint: POST /chains Request Body:
Parameters:
  • name (string, required): Chain name
  • trigger (string, required): Chain trigger
  • steps (array, required): Chain steps
    • skill_id (string): Skill ID to execute
    • order (integer): Step order
    • continue_if (string): Continue condition
  • conditions (array, optional): Execution conditions
Response:

Execute Skill Chain

Execute a multi-step skill chain. Endpoint: POST /chains/{id}/execute Request Body:
Parameters:
  • context (object, required): Execution context
  • options (object, optional): Execution options
    • timeout_ms (integer): Total timeout
    • step_timeout_ms (integer): Per-step timeout
    • include_trace (boolean): Include execution trace
Response:

Get Chain Executions

Retrieve execution history for a skill chain. Endpoint: GET /chains/{id}/executions Response:

Skill Reviews

List Reviews

Get pending skill reviews. Endpoint: GET /reviews Response:

Get Review

Get a specific review details. Endpoint: GET /reviews/{id}

Process Review

Approve or reject a skill review. Endpoint: POST /reviews/{id} Request Body:
Parameters:
  • approved (boolean, required): Approval decision
  • notes (string, optional): Review notes
Response:

Error Handling

Common Error Responses

Error Codes

Best Practices

Skill Creation Guidelines

  1. Clear Triggers: Use specific, unambiguous trigger phrases
  2. Descriptive Actions: Clearly explain what the skill does
  3. Confidence Scoring: Assign appropriate confidence levels
  4. Example Usage: Include example trigger phrases
  5. Domain Classification: Use consistent domain names

Skill Execution Optimization

  1. Context Enrichment: Provide rich context for skill execution
  2. Timeout Management: Set appropriate timeouts for long-running skills
  3. Error Handling: Implement proper error handling in skills
  4. Performance Monitoring: Track skill execution performance
  5. Resource Management: Be mindful of token usage and costs

Skill Chain Design

  1. Step Dependencies: Design clear dependencies between steps
  2. Continue Conditions: Use meaningful continue conditions
  3. Error Handling: Handle failures gracefully in chains
  4. Performance Monitoring: Monitor chain execution performance
  5. Testing: Test chains thoroughly before deployment

Security Considerations

  1. Input Validation: Validate all inputs to skills
  2. Output Sanitization: Sanitize skill outputs
  3. Access Control: Implement proper RBAC for skill management
  4. Audit Logging: Enable audit logging for skill operations
  5. Rate Limiting: Implement appropriate rate limiting