# Open Weather

{% hint style="info" %}
The following documentation is for **Open Weather v1.6.3** *(BDK)*.
{% endhint %}

## Overview

OpenWeather provides comprehensive weather data and forecasting services through robust APIs. This integration enables real-time weather information retrieval, forecast data access, and weather-based automation triggers. Incorporate weather intelligence into your decision-making and operational workflows.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Open Weather**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

### Connect using API Key

Authenticate to Open Weather API using the specified API key.

| Label   | Description                           | Type        |
| ------- | ------------------------------------- | ----------- |
| API Key | The API key to be used for connecting | `sensitive` |

### Configuration

The following table details all the available configuration options for this book.

| Concept   | Description                                              | Type     | Default Value |
| --------- | -------------------------------------------------------- | -------- | ------------- |
| `timeout` | Timeout in seconds when making API calls to OpenWeather. | `number` | 30            |

Configuration can be set or retrieved as shown in the following examples:

```generic
the department's Open Weather's timeout is 30
```

## Procedures

### to get the (current temperature) at a city

Get the current temperature for a specified city.

**Input Concepts**

| Concept | Description                                                                                                                                         | Type   | Required | Default Value |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ------------- |
| `city`  | The name of the city. Please refer to ISO 3166 for the state codes or country codes.                                                                | `noun` | Yes      | (no default)  |
| `unit`  | Unit of measurement. standard, metric and imperial units are available. If you do not specify the units, standard units will be applied by default. | `noun` | No       | standard      |

**Output Concepts**

| Concept               | Description                                                                                | Type     |
| --------------------- | ------------------------------------------------------------------------------------------ | -------- |
| `current temperature` | The current temperature in the specified units of measurement, or None if an error occurs. | `number` |

**Examples**

Retrieve the current temperature at London

```generic
get the current temperature at London
```

Retrieve the current temperature at London in Celsius

```generic
get the current temperature at Buenos Aires with
    the unit is metric
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/books/reference/openweather.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
