SkillBase
SkillBase is the abstract base class for all agent skills. Skills are modular,
reusable capabilities — such as weather lookup, web search, or calendar access —
that can be added to any AgentBase
agent with a single call to agent.add_skill().
Extend SkillBase to create custom skills. The SDK discovers skills automatically
from the signalwire/skills/ directory and validates dependencies on load.
For the catalog of built-in skills and their configuration parameters, see the Skills page.
Class Attributes
Define these on your subclass to configure the skill:
SKILL_NAME
Unique identifier for the skill (e.g., "weather", "web_search"). Used as
the key when calling agent.add_skill().
SKILL_DESCRIPTION
Human-readable description of the skill.
SKILL_VERSION
Semantic version string.
REQUIRED_PACKAGES
Python packages the skill needs. Checked on setup with validate_packages().
REQUIRED_ENV_VARS
Environment variables the skill needs. Checked on setup with validate_env_vars().
SUPPORTS_MULTIPLE_INSTANCES
When True, the same skill can be added to an agent multiple times with
different configurations (distinguished by a tool_name parameter).
Instance Properties
agent
Reference to the parent agent.
params
Configuration parameters (with swaig_fields removed).
logger
Skill-specific logger namespaced as signalwire.skills.<SKILL_NAME>.
swaig_fields
SWAIG metadata extracted from params, automatically merged into tool
definitions when using define_tool().
Methods
Release resources when the skill is removed or the agent shuts down.
Register a tool with automatic swaig_fields merging.
Return data to merge into the agent’s global_data dictionary.
Return speech recognition hints for this skill.
Get the unique key used to track this skill instance.
Return metadata about all parameters the skill accepts.
Return POM prompt sections for the agent.
Register SWAIG tools with the parent agent.
Initialize the skill and validate dependencies.
Read this skill instance’s namespaced state.
Write this skill instance’s namespaced state into a FunctionResult.
Check whether all required environment variables are set.
Check whether all required packages can be imported.