Skip to content

skye-harris/llm_intents

Repository files navigation

Tools for Assist (Custom Integration for Home Assistant)

Additional tools for LLM-backed Assist for Home Assistant:

  • Brave Web Search
  • Google Places
  • Wikipedia
  • Weather Forecast

Each tool is optional and configurable via the integrations UI. Some tools require API keys, but are usable on free tiers. A caching layer is utilised in order to reduce both API usage and latency on repeated requests for the same information within a 2-hour period.


Installation

Install via HACS (recommended)

Have HACS installed, this will allow you to update easily.

  • Adding Tools for Assist to HACS can be using this button: image

Note

If the button above doesn't work, add https://github.com/skye-harris/llm_intents as a custom repository of type Integration in HACS.

  • Click install on the Tools for Assist integration.
  • Restart Home Assistant.
Manual Install

Integration Configuration

After installation, configure the integration through Home Assistant's UI:

  1. Go to SettingsDevices & Services.
  2. Click Add Integration.
  3. Search for Tools for Assist.
  4. Follow the setup wizard to configure your desired services.

Conversation Agent Configuration

Once the integration is installed and configured, you will need to enable the desired services within your Conversation Agent entities.

For the Ollama and OpenAI Conversation integrations, this can be found within your Conversation Agent configuration options, beneath the Control Home Assistant heading, and enabling the services desired for the Agent:

  • Search Services
  • Weather Forecast

🔍 Brave Web Search

Uses the Brave Web Search API to return summarized, snippet-rich results.

Requirements

Configuration Steps

  1. Select "Brave Search" during setup.
  2. Enter your Brave "Data for AI" API key.
  3. Configure optional settings like number of results, location preferences.

Options

Setting Required Default Description
API Key Brave Search API key
Number of Results 2 Number of results to return
Country Code ISO country code to bias results
Latitude Optional latitude for local result relevance (recommended)
Longitude Optional longitude for local result relevance (recommended)
Timezone Optional TZ timezone identifier for local result relevance
Post Code Optional post code for local result relevance

📍 Google Places

Searches for locations, businesses, or points of interest using the Google Places API.

Search results include the location name, address, rating score, current open state, and when it next opens/closes.

Requirements

Configuration Steps

  1. Select "Google Places" during setup.
  2. Enter your Google Places API key.
  3. Configure number of results to return.

Options

Setting Required Default Description
API Key Google Places API key
Number of Results 2 Number of location results to return
Latitude Your locations latitude, if you wish to use location biasing (recommended)
Longitude Your locations longitude, if you wish to use location biasing (recommended)
Radius 5 The radius around your location for location biased results (in kilometres)
Rank Preference Distance The ranking preference for search results from Google Places

📚 Wikipedia

Looks up Wikipedia articles and returns summaries of the top results.

Requirements

  • No API key required.
  • Uses the public Wikipedia search and summary APIs.

Configuration Steps

  1. Select "Wikipedia" during setup.
  2. Configure number of article summaries to return (no API key required).

Options

Setting Required Default Description
Number of Results 1 Number of article summaries to return

⛅ Weather Forecast

Rather than accessing the internet directly for weather information, this tool utilises your existing Home Assistant weather integration and makes the forecast data accessible to your LLM in an intelligent manner.

At a minimum, this tool requires a weather entity that provides daily forecast data. It is recommended, though optional, to also specify a weather entity that provides hourly weather data.

For cases where a specific days weather is requested (eg: today, tomorrow, wednesday), the hourly data will be provided if available. If data for the week is requested, no hourly forecast entity is set, or the hourly forecast does not contain data for the requested day, the daily weather data will be used instead.

Requirements

  • An existing weather forecast integration configured within Home Assistant.

Configuration Steps

  1. Select "Weather Forecast" during setup.
  2. Select the weather entity that provides daily forecast information.
  3. Optionally, select the weather entity that provides hourly forecast information.

Options

Setting Required Description
Daily Weather Entity The weather entity to use for daily weather forecast data
Hourly Weather Entity The weather entity to use for hourly weather forecast data

Acknowledgements

Ruff


"Buy Me A Coffee"