Agent stack build plans · № 6 · 3 of 6

Architecture

Two pipes between Hermes and Home Assistant — an event stream it listens to, and four tools it acts with.

Home Assistantyour existing install — entities, automations, and the two APIs below. A dedicated non-admin HA user issues the token.
WebSocket · state-change eventsthe gateway platform. Filtered by platforms.homeassistant.extra: watch_domains, watch_entities, watch_all, ignore_entities, cooldown_seconds (default 30). Push, not polling.
REST · the four HA toolsha_list_entities · ha_get_state · ha_list_services · ha_call_service. Auto-enabled the moment HASS_TOKEN exists in ~/.hermes/.env.
events ↓     ↑ tool calls
Hermes gateway daemonhermes gateway, installable as a systemd/launchd service. Each event (post-filter, post-cooldown) becomes a model turn in a session. Model is yours to choose — route this to a cheap one.
consults ↓
Memory~/.hermes/memories/MEMORY.md (2,200-char cap) + USER.md (1,375) injected into the system prompt; memory tool to edit; session_search over full history in ~/.hermes/state.db (SQLite FTS5).
Approvalsapprovals.mode = smart | manual | off; approvals.deny fnmatch globs over tool patterns. Your brake pedal — see setup.
you build thisHouse-map skilla SKILL.md under ~/.hermes/skills/ mapping rooms and human names to exact entity ids. Hermes can write it itself via skill_manageprompt 1.
you build thisPattern distillera nightly cron job (hermes cron create, jobs live in ~/.hermes/cron/) that reviews recent event sessions via session_search and folds patterns into memory — prompt 3.
speaks via ↓
Telegram (or any gateway platform)nudges out, approvals back. Discord, Signal, WhatsApp, ntfy and ~20 others work the same way.

The four tools — and the names to unlearn

AI answers about this stack routinely cite list_entities, read_state and call_services. Those tools do not exist. As of v0.19.0 the Home Assistant toolset is exactly:

ToolWhat it does in this build
ha_list_entitiesThe census. Run once in prompt 1 to build the house map; rerun when you add devices.
ha_get_statePoint checks before acting — is the window open, what’s the thermostat at.
ha_list_servicesWhat can actually be done to a domain — the agent checks instead of guessing service names.
ha_call_serviceThe only write path. Everything the agent ever changes goes through this one tool — which is what makes approvals workable.

How “learning the household” actually works

No vector store, no fine-tuning — worth being blunt because AI answers claim otherwise. The mechanism is three plain parts:

If you genuinely outgrow 2,200 characters, Hermes has optional external memory-provider plugins (Mem0, Honcho and others) — but start without one; the cap-forced distillation is most of the intelligence here.

Failure posture. Model API down or gateway crashed → events go unremarked, nothing in the house breaks, HA’s own automations keep running. This is why safety-critical logic stays in HA (product spec). The agent is additive by construction, and you should keep it that way.

Disagree? Pin a note on it →