Location Enrich
July 16, 2026 ยท View on GitHub
Enrich MindRoom agent prompts with real-time location context from Dawarich.
Agents see where the user is, how recent that fix is, whether it matches a known place, and whether they appear to be walking or driving. That lets the model adapt its behavior: shorter replies while in motion, voice-first when driving, and location-aware reasoning at home or other named places.
Features
- Fetches the latest Dawarich point on every
message:enrich - Matches coordinates against a YAML file of known places
- Classifies movement as
stationary,walking,jogging,cycling,driving, orhighway - Adds
nearby_place,at_home,distance_from_home_m,location_age_seconds, and altitude when available - Marks location data as stale after 30 minutes and warns the model that it may be outdated
- Adds concise reply guidance when the user appears to be driving or walking
- Caches the latest successful fix for 15 seconds and reuses it on transient fetch failures
How It Works
- The
location-enrichhook runs on everymessage:enrich. - It fetches the latest GPS fix from Dawarich using
DAWARICH_API_KEY. - The fix is compared against a local YAML file of known places such as home, office, or gym.
- The plugin injects a compact location summary into the prompt for the active turn.
- If the fix is stale, the plugin marks it as stale instead of presenting it as live context.
Hooks
| Hook | Event | Purpose |
|---|---|---|
location-enrich | message:enrich | Fetch the latest Dawarich point and inject location context into the prompt |
Configuration
Set these environment variables:
| Variable | Required | Description |
|---|---|---|
DAWARICH_API_KEY | Yes | API key for your Dawarich instance |
DAWARICH_URL | No | Dawarich base URL. Defaults to http://localhost:3000 |
You can also configure plugin settings in config.yaml:
plugins:
- path: plugins/location-enrich
settings:
dawarich_url: "https://your-dawarich-instance.example.com"
places_path: "path/to/places.yaml"
Supported plugin settings:
| Setting | Required | Description |
|---|---|---|
dawarich_url | No | Overrides the Dawarich base URL |
places_path | No | Path to the YAML known-places file |
known_places_path | No | Alias for places_path |
Relative place-file paths are resolved against the active MindRoom config location. The default place-file path is ~/.mindroom/plugins/location-enrich/places.yaml.
Known Places File
Create a YAML file with your known locations:
- name: Home
latitude: 47.6062
longitude: -122.3321
- name: Office
latitude: 47.6205
longitude: -122.3493
Each entry may also use label instead of name, and lat / lon instead of latitude / longitude.
Install
Vendor this plugin with the MindRoom CLI:
mindroom plugins install location-enrich-plugin
Then reference it from config.yaml:
plugins:
- path: plugins/location-enrich-plugin
Update to the latest commit later with:
mindroom plugins update location-enrich-plugin
The command pins the exact installed commit in .mindroom-plugin.lock.json and strictly validates the plugin before activating it.
For a manual checkout instead, see Setup below.
Setup
- Copy this plugin to
~/.mindroom/plugins/location-enrich. - Set the
DAWARICH_API_KEYenvironment variable. - Create a
places.yamlfile with your known locations. - Add the plugin to
config.yaml:plugins: - path: plugins/location-enrich - Restart MindRoom.
No agent tools are required. This plugin is hooks-only.