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

1from signalwire.core.skill_base import SkillBase
2
3class WeatherSkill(SkillBase):
4 SKILL_NAME = "weather"
5 SKILL_DESCRIPTION = "Provides weather information"
6
7 def get_global_data(self):
8 return {
9 "weather_api_base": "https://api.weatherapi.com/v1",
10 "default_units": self.params.get("units", "fahrenheit")
11 }
12
13 def setup(self) -> bool:
14 return True
15
16 def register_tools(self):
17 pass