AgentsSkills

weather_api

View as MarkdownOpen in Claude

Get current weather conditions for locations worldwide using WeatherAPI.com.

Tools: get_weather

Requirements: WeatherAPI.com API key (free tier available)

api_key
strRequired

WeatherAPI.com API key. Falls back to the WEATHER_API_KEY environment variable.

tool_name
strDefaults to get_weather

Custom function name.

temperature_unit
strDefaults to fahrenheit

Temperature unit: "fahrenheit" or "celsius".

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("weather_api", {"api_key": "YOUR_WEATHER_API_KEY"})
8
9agent = MyAgent()
10agent.serve()