Skip to main content

Prerequisites

Before you begin, ensure you have:
  • Python 3.8+ or Rust 1.70+ (depending on your preferred implementation)
  • pip (for Python) or cargo (for Rust)
  • Basic familiarity with async programming (for Python) or Rust async (for Rust)
Don’t worry if you’re new to async programming! FastSkill handles most of the complexity for you.

Choose Your Implementation

FastSkill offers implementations in multiple languages. Choose the one that best fits your project:

Your First Skill

Now that you have FastSkill running, let’s create your first skill. Skills are the building blocks that define capabilities for AI agents.
1

Create a skill definition

Create a new file my-skill.json:
my-skill.json
{
  "id": "text-analyzer",
  "name": "Text Analyzer",
  "description": "Analyzes text content and provides insights",
  "version": "1.0.0",
  "author": "Your Name",
  "tags": ["text", "analysis", "nlp"],
  "capabilities": ["text_analysis", "sentiment_analysis", "keyword_extraction"],
  "skill_file": "skills/text-analyzer/SKILL.md",
  "enabled": true,
  "execution_timeout": 30,
  "memory_limit_mb": 256
}
2

Register the skill

register-skill.py
import asyncio
from fastskill import FastSkillService

async def register_skill():
    service = FastSkillService()
    await service.initialize()

    # Register the skill
    skill_id = await service.register_skill({
        'id': 'text-analyzer',
        'name': 'Text Analyzer',
        'description': 'Analyzes text content and provides insights',
        'version': '1.0.0',
        'tags': ['text', 'analysis', 'nlp'],
        'capabilities': ['text_analysis', 'sentiment_analysis', 'keyword_extraction'],
        'enabled': True
    })

    print(f"✅ Skill registered: {skill_id}")

    # Verify registration
    skills = await service.list_skills()
    print(f"📋 Total skills: {len(skills)}")

    await service.shutdown()

asyncio.run(register_skill())
3

Test skill discovery

test-discovery.py
import asyncio
from fastskill import FastSkillService

async def test_discovery():
    service = FastSkillService()
    await service.initialize()

    # Test different discovery methods
    queries = [
        "text analysis",
        "sentiment analysis",
        "keyword extraction"
    ]

    for query in queries:
        skills = await service.discover_skills(query)
        print(f"🔍 '{query}': {len(skills)} skills found")

        if skills:
            print(f"   💡 Top match: {skills[0]['name']}")

    # Test capability-based search
    capabilities = ['text_analysis', 'sentiment_analysis']
    for capability in capabilities:
        skills = await service.find_skills_by_capability(capability)
        print(f"🛠️  '{capability}': {len(skills)} skills found")

    await service.shutdown()

asyncio.run(test_discovery())

Configuration Options

Customize FastSkill for your environment:
from fastskill import ServiceConfig
from pathlib import Path

# Basic configuration
config = ServiceConfig(
    skill_storage_path=Path("./my-skills"),
    execution_timeout=60,
    max_memory_mb=1024,
    enable_hot_reload=True,
    cache_size=500
)

What’s Next?

Congratulations! You now have FastSkill up and running with your first skill. Here are some next steps:

Troubleshooting

ImportError in Python: Make sure you have Python 3.8+ and run pip install fastskill.
Rust compilation errors: Ensure you have Rust 1.70+ installed with rustup install stable.
No skills found: Check your skill storage path and ensure skill files have the correct format.
Need more help? Check out the installation guide for detailed setup instructions or the examples section for more code samples.