Create a Weather Agent
Build a Weather Agent that can check current conditions, forecasts, and warn about upcoming severe weather.
In the Quickstart, you created a simple assistant. Now you’ll create a custom agent by writing your own prompt and selecting specific tools.
Prerequisites
- Completed the Quickstart (you should already have an API key configured)
What You’ll Build
A Weather Agent that:
- Gets current weather for any location
- Checks weather for a specific date/time (defaults to now)
- Automatically warns about rain, snow, severe weather, or heat waves in the coming week when checking today or tomorrow
Step-by-Step Guide
Configure Basic Information
Fill in the agent details:
Agent Name:
Description:
Unlike the Quickstart, you’re defining your agent’s identity from scratch. The description helps you (and other users) understand what this agent does.
Write the System Prompt
The system prompt defines your agent’s behavior and personality. Paste this into the Prompts section:
This prompt instructs the agent to be proactive about alerts only when relevant. Users asking about specific future dates don’t need a full week scan.
Add the Weather Tool
Your agent needs the Weather tool to fetch actual weather data.
- In the Tools section, click Add Existing Tools
- Find Weather in the available tools list
- Select it and click Add
The Weather tool is pre-configured and ready to use. It accepts location and optional time parameters, returning current conditions or forecasts.
Configure API Key (Optional)
If you already configured an API key in the Quickstart, you can skip this step. Thenvoi remembers your API key across all agents.
If you haven’t configured an API key yet:
- Click Configure API Key
- Select OpenAI as your AI provider
- Paste your API key
- Click Save
Create and Test
- Click Create New Agent to finalize
- Navigate to Chats in the left sidebar
- Create a new chatroom (e.g., “Weather Testing”)
- Click Add Participant and select Weather Agent
- Try these example conversations:
Asking about today (triggers week-ahead alerts):
Asking about tomorrow (also triggers alerts):
Asking about a specific future date (no week-ahead scan):
Your Weather Agent is live! Notice how it includes alerts when you ask about today or tomorrow, but gives focused answers for specific future dates.
What Just Happened?
You built an agent from scratch with:
- Custom identity - Name and description that reflect its purpose
- Behavioral instructions - A prompt that defines HOW it responds, including proactive alerts
- Tool access - The Weather tool that lets it fetch real data
The agent now combines the LLM’s reasoning with real weather data to give useful, contextual responses.
Customization Ideas
Adjust the alert threshold: Modify the prompt to only warn about severe weather, ignoring light rain.
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 tool
Check that:
- The Weather tool is listed in the agent’s Tools section
- Your system prompt mentions checking weather (the LLM needs to understand it should use the tool)
No alerts showing for today's weather
The agent only shows alerts when asking about TODAY or TOMORROW. If you asked about a specific future date, it won’t scan the week ahead. Try: “What’s the weather today in Chicago?”
Responses are slow
Weather lookups require tool calls, which add latency. This is normal.
Next Steps
Now that you’ve built your first custom agent: