AgentsAgentBase

add_skill

View as MarkdownOpen in Claude

Load and activate a skill on this agent. Skills are pluggable capability modules that register their own tools, prompts, and configuration. The SDK ships with built-in skills for common tasks like datetime, web_search, and math.

Raises ValueError if the skill is not found or fails to load. Use list_skills() to see currently loaded skills, or consult the skills catalog for all available built-in skills.

Parameters

skill_name
strRequired

Registered skill name (e.g., "datetime", "web_search", "math").

params
Optional[dict[str, Any]]

Skill-specific configuration parameters. Each skill documents its own supported parameters.

Returns

AgentBase — Returns self for method chaining.

Examples

Add built-in skills

1from signalwire import AgentBase
2
3agent = AgentBase(name="assistant", route="/assistant")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.add_skill("datetime")
6agent.add_skill("math")
7agent.serve()

Skill with configuration

1from signalwire import AgentBase
2
3agent = AgentBase(name="assistant", route="/assistant")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.add_skill("web_search", params={
6 "api_key": "your-search-api-key",
7 "max_results": 5
8})
9agent.serve()