How to Use ChatBotKit Skillsets to Create a Weather Forecast Bot
In this tutorial, you will build a weather forecast bot that can answer questions like "What is the weather in London?" by making live API requests. You will use ChatBotKit's Skillsets — a powerful feature that lets you teach your bot new capabilities by describing how to call external APIs.
No API key required! This tutorial uses wttr.in, a free and open weather service, so you can follow along without signing up for any third-party account. For production bots with higher reliability requirements, ChatBotKit also offers ready-made abilities for OpenWeatherMap, AccuWeather, and Weatherbit through the Ability Catalogue.
What You Will Build
A conversational AI bot that:
- Answers weather questions for any city in the world
- Handles multi-city comparisons ("Compare the weather in London and Paris")
- Returns concise, formatted weather information from a live data source
Prerequisites
- A ChatBotKit account
- Basic familiarity with creating bots in ChatBotKit (see Getting Started)
Step 1: Create a Bot
-
Navigate to chatbotkit.com/bots/new.
-
Give your bot a name such as "Weather Bot".
-
Add a short description, e.g. "A helpful assistant that provides real-time weather forecasts."
-
Set a backstory to define the bot's personality:
You are a friendly weather assistant. When asked about the weather, always use your weather skillset to fetch up-to-date information. Provide the answer in a clear and concise format, including temperature, wind, and conditions. -
Choose a cost-effective model such as
gpt-4o-miniorclaude-4.5-haiku— these are well-suited for tool-use tasks and keep operating costs low. -
Save the bot (you will connect the skillset in a later step).
Step 2: Create a Skillset
Skillsets group one or more abilities together and can be attached to any bot or integration.
- Navigate to chatbotkit.com/skillsets/new.
- Name the skillset "Weather".
- Add a short description such as "Provides real-time weather data via the wttr.in service."
- Save the skillset — you will add abilities to it next.
Step 3: Create the Weather Ability
Abilities define exactly how your bot should call an external API. ChatBotKit uses a special fetch code block syntax inside the ability instruction to describe HTTP requests.
- Inside your new Weather skillset, click Add Ability.
- Set the ability name to
get_weather. - Set the description to
Get the current weather for a given location. - Set the instruction to the following:
- Save the ability.
How it works: The
fetchcode block is a special ChatBotKit instruction that tells the bot to make a real HTTP request whenever this ability is triggered. The{location}placeholder is filled in by the AI based on what the user asks.
Step 4: Connect the Skillset to the Bot
- Go back to your Weather Bot.
- In the Skillsets section, select the Weather skillset you created.
- Save the bot.
Step 5: Test the Bot
Open the bot in the ChatBotKit playground and try asking:
- "What is the weather in Tokyo?"
- "Is it raining in New York right now?"
- "Compare the weather in London and Paris."
The bot will call the get_weather ability, fetch live data from wttr.in, and respond with up-to-date weather information.
Going Further: Use the Ability Catalogue
For production bots, ChatBotKit provides pre-built abilities for popular weather APIs in the Ability Catalogue. These require an API key but offer richer data and higher reliability:
| Service | Highlights |
|---|---|
| OpenWeatherMap | 5-day forecast, current conditions, multiple units |
| AccuWeather | Daily & hourly forecasts, historical data, location search |
| Weatherbit | Coordinates or city name, metric/imperial units |
To use these, navigate to the Ability Catalogue, install the desired weather ability into a skillset, add your API key as a secret, and attach the skillset to your bot — no custom instruction writing required.
Troubleshooting
Bot doesn't fetch weather data
- Verify the skillset is attached to your bot and saved.
- Check that the ability instruction contains the
fetchcode block exactly as shown. - Make sure the bot's model supports function/tool calling (both
gpt-4o-miniandclaude-4.5-haikudo).
Incorrect or stale weather information
- wttr.in data is updated frequently but may occasionally be delayed. For real-time accuracy, consider switching to OpenWeatherMap via the Ability Catalogue.
"I don't know the weather" responses
- Try rephrasing your question to include a specific city name.
- Review the ability description — it helps the AI decide when to trigger the ability. Make it clear and explicit.
Conclusion
You have built a live weather forecast bot using ChatBotKit Skillsets. This same pattern — describing an HTTP request inside a fetch code block — works with virtually any public API, making Skillsets a versatile way to extend your bot's capabilities without writing backend code.