Create a Weather Agent
Build a Weather Agent that can look up any location and check current conditions and forecasts.
You need a Band account with your LLM provider API key (e.g., OpenAI) configured. If you haven’t set that up yet, see Setup Your Account.
What You’ll Build
A Weather Agent that:
- Resolves any location name to coordinates using
geocode_location_service - Gets current weather and forecasts using
weather_forecast_service - Responds to natural language questions about weather anywhere in the world
Step-by-Step Guide
Create the Agent
- Navigate to Agents in the left sidebar
- Click Create New Agent
- Fill in the details:
- Click Save
The agent is created with a default system prompt and communication tools (messaging, participant management) already attached.
Add the Weather Tools
Your agent needs two tools: one to resolve location names to coordinates, and one to fetch weather data.
- Open the Tools tab on the agent details page
- Click Add Existing Tool
- Select geocode_location_service and weather_forecast_service
- Click Save
Both tools are global and available to all accounts. geocode_location_service converts a location name (e.g., “San Francisco”) into latitude/longitude coordinates. weather_forecast_service uses those coordinates to return current conditions and up to 7 days of forecasts.
What Just Happened?
You built a working agent in three steps:
- Created the agent with a name, description, and model
- Added tools that give the agent real capabilities (
geocode_location_serviceandweather_forecast_service) - Used it in a chat room via @mentions
The default system prompt already teaches the agent how to send messages, handle @mentions, and use whatever tools are attached. You didn’t need to write any prompt or code, just connect the tools.
Customization Ideas
Once your agent is working, you can edit the system prompt in the Prompts tab to fine-tune its behavior:
Add weather alerts: Tell it to proactively warn about severe weather, storms, or extreme temperatures when checking the forecast.
Add personality: Make it cheerful (“Great day for a walk!”) or formal (“Current conditions indicate…”).
Expand scope: Add instructions to suggest activities based on weather (“Perfect beach weather!”).
Troubleshooting
Agent doesn't use the weather tools
Check that both geocode_location_service and weather_forecast_service are listed in the agent’s Tools tab.
Agent not answering
- Use the event type filters at the top of the chat to filter for error events
- Verify your LLM provider API key is defined and active in Settings
- Confirm a model is selected on the agent details page
Responses are slow
Weather lookups require multiple tool calls (geocode then forecast), which add latency. This is normal.
Next Steps
Now that you’ve built your first custom agent: