Documentation Index
Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Beyond basic skill loading, the Skills system provides advanced features for production use:
| Feature | Description |
|---|
| Caching | In-memory TTL cache for skill content |
| Auto-Selection | Embedding-based skill relevance filtering |
| Dependencies | Declare and validate inter-skill dependencies |
| Versioning | Semantic versioning and constraint filtering |
| Callbacks | Hook into skill load, reference, and script events |
| Safety Policies | Content filtering via the safety engine |
| Knowledge Base | Semantic search across skill references via RAG |
Skills Constructor Reference
All advanced features are configured via the Skills constructor:
from upsonic.skills import Skills, LocalSkills
skills = Skills(
loaders=[LocalSkills("./my-skills")], # Required — skill sources
strict_deps=False, # Raise on dependency issues
cache_ttl=300, # Cache TTL in seconds (None = disabled)
on_load=my_load_callback, # Callback on skill load
on_script_execute=my_script_callback, # Callback on script execution
on_reference_access=my_ref_callback, # Callback on reference access
auto_select=True, # Enable embedding-based selection
max_skills=5, # Max skills in system prompt
embedding_provider=my_provider, # Provider for auto-select
policy=my_safety_policy, # Safety policy or list of policies
)
Merging Skills
Combine multiple Skills instances into one:
from upsonic.skills import Skills, LocalSkills, BuiltinSkills
base = Skills(loaders=[BuiltinSkills()])
custom = Skills(loaders=[LocalSkills("./custom")])
merged = Skills.merge(base, custom)
# Later instances override on name conflict
Skills can declare which external tools they work best with:
# In SKILL.md frontmatter
allowed-tools:
- code_execution
- file_search
Access the union of allowed tools from all actively used skills:
active_tools = skills.get_active_skill_tools()
# Returns: {'code_execution', 'file_search'}
A skill becomes “active” when the agent calls get_skill_instructions() for it.