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.addSkill().
Extend SkillBase to create custom skills. You must implement the abstract methods
getManifest() and getTools(), and optionally override lifecycle and prompt methods.
For the catalog of built-in skills and their configuration parameters, see the Skills page.
Static Members
SUPPORTS_MULTIPLE_INSTANCES
When true, the same skill can be added to an agent multiple times with
different configurations.
getParameterSchema()
Returns metadata about all parameters the skill accepts.
See getParameterSchema.
Constructor
skillName
Unique identifier for the skill (e.g., "weather", "web_search").
config
Optional configuration key-value pairs for the skill instance.
Instance Properties
skillName
The registered name for this skill instance (readonly).
instanceId
Unique identifier for this skill instance (readonly).
config
Configuration parameters passed to the constructor (protected).
swaigFields
SWAIG metadata extracted from config, automatically merged into tool definitions (readonly).
Methods
Initialize the skill and prepare resources.
Release resources when the skill is removed or the agent shuts down.
Return metadata about all parameters the skill accepts.
Return data to merge into the agent’s global data.
Return speech recognition hints for this skill.
Get the unique key used to track this skill instance.
Return prompt sections for the agent.
Extract this skill’s namespaced data from raw request data.
Get the namespace key used to store this skill’s data.
Write data under this skill’s namespace into a FunctionResult.
Check whether the skill has been initialized.
Mark the skill as initialized.
Validate that required environment variables are set.
getManifest (abstract)
Returns the skill’s metadata including name, description, version, required environment variables, and required packages. You must implement this in every subclass.
getTools (abstract)
Returns the SWAIG tool definitions this skill provides. You must implement this in every subclass. Each tool is registered with the agent when the skill is loaded.
getConfig
Read a configuration value by key, with an optional fallback default. Returns the
value cast to type T, or defaultValue if the key is not present.
key
The configuration key to look up.
defaultValue
Value to return if the key is not present in the config.