back to tutorials

How to Use ChatBotKit Skillsets to Create a Weather Forecast Bot

Learn how to create a weather forecast bot using ChatBotKit's skillsets. Follow the step-by-step guide to create a bot, skillset, and ability to get live weather information using API requests. Updated March 2026.

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

Step 1: Create a Bot

  1. Navigate to chatbotkit.com/bots/new.

  2. Give your bot a name such as "Weather Bot".

  3. Add a short description, e.g. "A helpful assistant that provides real-time weather forecasts."

  4. 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.
  5. Choose a cost-effective model such as gpt-4o-mini or claude-4.5-haiku — these are well-suited for tool-use tasks and keep operating costs low.

  6. 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.

  1. Navigate to chatbotkit.com/skillsets/new.
  2. Name the skillset "Weather".
  3. Add a short description such as "Provides real-time weather data via the wttr.in service."
  4. 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.

  1. Inside your new Weather skillset, click Add Ability.
  2. Set the ability name to get_weather.
  3. Set the description to Get the current weather for a given location.
  4. Set the instruction to the following:
  1. Save the ability.

How it works: The fetch code 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

  1. Go back to your Weather Bot.
  2. In the Skillsets section, select the Weather skillset you created.
  3. 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:

ServiceHighlights
OpenWeatherMap5-day forecast, current conditions, multiple units
AccuWeatherDaily & hourly forecasts, historical data, location search
WeatherbitCoordinates 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 fetch code block exactly as shown.
  • Make sure the bot's model supports function/tool calling (both gpt-4o-mini and claude-4.5-haiku do).

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.