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:
name(string, required): Unique skill nametrigger(string, required): What triggers this skillaction(string, required): What the skill doesdomain(string, required): Skill domain/categoryconfidence(float, default: 0.5, min: 0.0, max: 1.0): Confidence scoretags(array, optional): Skill tags for categorizationexamples(array, optional): Example trigger phrasesmetadata(object, optional): Additional metadata
List Skills
Retrieve all skills with optional filtering. Endpoint:GET /skills
Query Parameters:
domain(string): Filter by domaintrigger(string): Filter by trigger phrasetags(string): Filter by tags (comma-separated)verified(boolean): Filter by verification statuslimit(integer, default: 20, max: 100): Results per pageoffset(integer, default: 0): Pagination offsetsort(string, default: “usage_count desc”): Sort field and direction
Get Skill
Retrieve a specific skill by ID. Endpoint:GET /skills/{id}
Response:
Update Skill
Update an existing skill. Endpoint:PUT /skills/{id}
Request Body:
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 phrasesdomain(string): Search within domainlimit(integer, default: 10, max: 50): Results per pagethreshold(float, default: 0.7): Similarity threshold
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:
Execute Skill
Execute a skill with context and get results. Endpoint:POST /skills/{id}/execute
Request Body:
context(object, required): Execution contextoptions(object, optional): Execution optionstimeout_ms(integer): Execution timeoutinclude_explanation(boolean): Include execution explanationmax_tokens(integer): Maximum output tokens
LLM-Powered Skill Operations
Suggest Skills
Get LLM-powered skill suggestions based on trigger and context. Endpoint:POST /skills/suggest
Request Body:
trigger(string, required): Skill trigger phrasecontext(string, required): Context for suggestiondomain(string, optional): Target domainlimit(integer, default: 5, max: 10): Number of suggestions
Synthesize Skills
Merge multiple skills into a generalized skill. Endpoint:POST /skills/synthesize
Request Body:
skill_ids(array, required): IDs of skills to synthesizename(string, required): New skill namedescription(string, optional): Skill description
Extract Skills from Content
Extract skills from text content using LLM. Endpoint:POST /skills/extract
Request Body:
content(string, required): Content to extract skills fromdomain(string, optional): Target domain for extracted skillsconfidence_threshold(float, default: 0.5): Minimum confidence for extraction
Skill Chains
Create Skill Chain
Create a multi-step skill chain. Endpoint:POST /chains
Request Body:
name(string, required): Chain nametrigger(string, required): Chain triggersteps(array, required): Chain stepsskill_id(string): Skill ID to executeorder(integer): Step ordercontinue_if(string): Continue condition
conditions(array, optional): Execution conditions
Execute Skill Chain
Execute a multi-step skill chain. Endpoint:POST /chains/{id}/execute
Request Body:
context(object, required): Execution contextoptions(object, optional): Execution optionstimeout_ms(integer): Total timeoutstep_timeout_ms(integer): Per-step timeoutinclude_trace(boolean): Include execution trace
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:
approved(boolean, required): Approval decisionnotes(string, optional): Review notes
Error Handling
Common Error Responses
Error Codes
Best Practices
Skill Creation Guidelines
- Clear Triggers: Use specific, unambiguous trigger phrases
- Descriptive Actions: Clearly explain what the skill does
- Confidence Scoring: Assign appropriate confidence levels
- Example Usage: Include example trigger phrases
- Domain Classification: Use consistent domain names
Skill Execution Optimization
- Context Enrichment: Provide rich context for skill execution
- Timeout Management: Set appropriate timeouts for long-running skills
- Error Handling: Implement proper error handling in skills
- Performance Monitoring: Track skill execution performance
- Resource Management: Be mindful of token usage and costs
Skill Chain Design
- Step Dependencies: Design clear dependencies between steps
- Continue Conditions: Use meaningful continue conditions
- Error Handling: Handle failures gracefully in chains
- Performance Monitoring: Monitor chain execution performance
- Testing: Test chains thoroughly before deployment
Security Considerations
- Input Validation: Validate all inputs to skills
- Output Sanitization: Sanitize skill outputs
- Access Control: Implement proper RBAC for skill management
- Audit Logging: Enable audit logging for skill operations
- Rate Limiting: Implement appropriate rate limiting