AgentsSkillBase

get_global_data

View as MarkdownOpen in Claude

Return data to merge into the agent’s global_data dictionary. Override to provide skill-specific session data that should be available to all SWAIG function handlers.

Returns

dict[str, Any] — Key-value pairs (default: empty dict).

Example

from signalwire.core.skill_base import SkillBase
class WeatherSkill(SkillBase):
SKILL_NAME = "weather"
SKILL_DESCRIPTION = "Provides weather information"
def get_global_data(self):
return {
"weather_api_base": "https://api.weatherapi.com/v1",
"default_units": self.params.get("units", "fahrenheit")
}
def setup(self) -> bool:
return True
def register_tools(self):
pass