For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • BedrockAgent
      • CLI Tools
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions
      • LiveWire
      • MCP Gateway
      • PomBuilder
      • Prefabs
      • Search
      • SkillBase
      • Skills
        • api_ninjas_trivia
        • claude_skills
        • Custom Skills
        • datasphere
        • datasphere_serverless
        • datetime
        • google_maps
        • info_gatherer
        • joke
        • math
        • mcp_gateway
        • native_vector_search
        • play_background_file
        • spider
        • swml_transfer
        • weather_api
        • web_search
        • wikipedia_search
      • SWAIGFunction
      • SWMLBuilder
      • SWMLService
      • WebService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • Chat
      • Compat
      • Datasphere
      • Fabric
      • Imported Numbers
      • Logs
      • Lookup
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSub
      • Queues
      • Recordings
      • Registry
      • RestClient
      • Short Codes
      • SignalWireRestError
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Skills Summary
  • Configuration
  • SWAIG Field Overrides
  • Multi-Instance Skills
  • Extending SkillBase
Agents

Skills

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

api_ninjas_trivia

Next
Built with

Skills are pluggable capabilities that add tools to your agent. Add a skill with add_skill() and it registers one or more SWAIG functions automatically. Skills handle setup, parameter validation, and tool registration so you can add features like weather, search, or math with a single call.

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="my-agent")
6 self.set_prompt_text("You are a helpful assistant.")
7
8 # No-config skill
9 self.add_skill("datetime")
10
11 # Skill with parameters
12 self.add_skill("web_search", {
13 "api_key": "YOUR_KEY",
14 "search_engine_id": "YOUR_ENGINE_ID"
15 })
16
17if __name__ == "__main__":
18 MyAgent().run()

Skills Summary

SkillFunctionsAPI RequiredMulti-Instance
datetime2NoNo
math1NoNo
web_search1YesYes
wikipedia_search1NoNo
weather_api1YesNo
joke1YesNo
play_background_file1NoYes
swml_transfer1NoYes
datasphere1YesYes
datasphere_serverless1YesYes
native_vector_search1NoYes
mcp_gatewayDynamicNoYes
google_maps2YesNo
info_gatherer2NoYes
claude_skillsDynamicNoYes
spider3NoYes
api_ninjas_trivia1YesYes

Configuration

All skills accept configuration via a dictionary passed to add_skill(). Skills can also read values from environment variables when a parameter defines an env_var fallback.

1# Direct configuration
2self.add_skill("web_search", {"api_key": "KEY", "search_engine_id": "ID"})
3
4# Environment variable fallback
5import os
6self.add_skill("web_search", {
7 "api_key": os.getenv("GOOGLE_API_KEY"),
8 "search_engine_id": os.getenv("SEARCH_ENGINE_ID")
9})

SWAIG Field Overrides

Override SWAIG function metadata for any skill by including a swaig_fields key:

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 self.add_skill("datetime", {
8 "swaig_fields": {
9 "fillers": {"en-US": ["Let me check the time...", "One moment..."]},
10 "secure": False
11 }
12 })
13
14agent = MyAgent()
15agent.serve()

Multi-Instance Skills

Skills that support multiple instances require unique tool_name values:

1from signalwire import AgentBase
2
3class MyAgent(AgentBase):
4 def __init__(self):
5 super().__init__(name="assistant", route="/assistant")
6 self.set_prompt_text("You are a helpful assistant.")
7 self.add_skill("native_vector_search", {
8 "tool_name": "search_products",
9 "index_file": "/data/products.swsearch"
10 })
11 self.add_skill("native_vector_search", {
12 "tool_name": "search_faqs",
13 "index_file": "/data/faqs.swsearch"
14 })
15
16agent = MyAgent()
17agent.serve()

Extending SkillBase

For creating custom skills, see SkillBase.


datetime

Date and time with timezone support.

math

Secure mathematical calculations.

joke

Tell jokes via API Ninjas.

weather_api

Current weather conditions.

web_search

Google Custom Search.

wikipedia_search

Wikipedia factual search.

google_maps

Address validation and routes.

play_background_file

Background audio/video playback.

swml_transfer

Call transfer with pattern matching.

datasphere

DataSphere document search.

datasphere_serverless

DataSphere serverless search.

native_vector_search

Local vector index search.

info_gatherer

Configurable question collection.

api_ninjas_trivia

Trivia questions from API Ninjas.

spider

Web scraping and crawling.

claude_skills

Load SKILL.md files as tools.

custom_skills

Create and register custom skills.

mcp_gateway

MCP server integration.