๐ŸŒ OpenStreetMap Tool

An AI tool that allows large language models to find points of interest (POIs) on OpenStreetMap near a requested address or place.

Download from agnos.is Git

Download from Open-WebUI

The OSM tool can:

Supported Models

The tool is routinely tested with the following models at mid-range quantization levels, using llama.cpp:

Mistral Small 3.2 24b (Q4_K_S quant)

Qwen 3 14b (Q5_K_M quant)

Qwen 3 30b-a3b Instruct 2507 (Q3_K_XL quant)

GPT-OSS 20b

The tool is tested using NATIVE tool calling in OpenWebUI (i.e. model function calling set to native), but OpenWebUI's built-in function calling should also work.

Native tool calling is preferred because is enables the model to handle advanced multi-step tasks (like searching for POIs and displaying them on a map).

Other Models

Despite being older, Qwen 2.5 14b and Mistral Nemo demonstrate the contextual awareness for conversational use of the tool, and can also be used.

Weaker Models

Finding Points of Interest

The tool can search a location for nearby grocery stores, restaurants and bakeries, recreational areas, educational institutions, transit options, and more. It's best used by asking the AI to find whatever you're looking for near a given address or area.

How it Works

The tool first converts the address or place to GPS coordinates, and then picks the center point of that area, and looks for points of interest in a radius around it.

For example, if you ask it to find grocery stores near "123 Main Street, Example Town", it will first figure out that "123 Main Street" in Example Town is at GPS coordinates X,Y. Then the tool will check a radius around that point for grocery stores.

Search Tips

While the tool is smart enough to find things near specific addresses, regions, or even entire cities, there are some ways to maximize its effectiveness.

When the tool searches, it creates a bounding box. A bounding box is an imaginary box that gives us a small "portion of the map" where the resolved address or place is located. The geographical center of the bounding box is used to find search results.

If you ask the tool to find POIs in an entire city, it will look in a radius from roughly the geographical center of the city. Finding POIs from the geographical center of a city will give limited and probably not very useful results.

The tool allows LLMs to query OpenRouteService (ORS) for navigation information. Asking the model how to get to a destination will cause it to return navigation instructions to your destination.

Qwen 3 and Mistral Small support navigation well. These models and their derivatives demonstrate contextual awareness and can understand conversations where the user asks about a destination, and then asks how to get there in a later message.

Enhancing the User Experience

The OSM tool can integrate with OpenWebUI's user location features and third party services to provide an enhanced user experience.

Displaying a Map

If you ask the model to display your results, you will get a nice interactive map that you can use to click on the results and see exactly where they are. This feature requires Open WebUI 0.6.31 or higher, and is exposed as the `show_map` function.

Real-Time Location

In order to have the OSM tool be able to answer questions like "where is the nearest grocery store to me?", it needs access to your real-time location. This can be accomplished with the following steps in OpenWebUI:

OpenRouteService Integration

The tool can use OpenRouteService for navigation and more accurate search results.

https://openrouteservice.org/

By default, the OSM tool calculates "as the crow flies" (Haversine) distances between GPS points to figure out the closest points of interest. But the tool can optionally use OpenRouteService to calculate the actual travel distance between two points in order to provide more accurate results. Just because something is close by geographically, doesn't mean it'll be the same distance to get there!

To use OpenRouteService, you must:

Sign up for ORS here.

Configuration

The OSM tool should work out of the box on any low-traffic instance of Open Web UI that uses sufficiently advanced large language models. The only settings you MUST set are the User-Agent and From headers.

Settings

The tool exposes these settings:

Tile Server

The tile server should adhere to the {s}, {z}, {x}, {y} format. The default value is:

https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

Nominatim Terms of Use

The tool WILL NOT RUN without the User-Agent and From headers set. This is because the public instance of the Nominatim API will block you if you do not set these. Use of the public Nominatim instance is governed by their terms of use.

Nominatim Terms of Use

The default API services are suitable for applications with a low volume of traffic (absolute max 1 API call per second). If you are running a production service, you should set up your own Nominatim and Overpass services with caching.

Issues and Feature Requests

Issues and feature requests can be opened in two places:

agnos.is Git (preferred)

GitHub

โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—โ€—

โคด๏ธ [/projects/open-webui-filters]

๐Ÿ  Home