Hermes Agent
How to connect Hermes Agent to Home Assistant
Updated 29 November 2026
If you want Hermes to notice when a light comes on, use the Home Assistant plugin’s gateway. If you want to ask “Which lights are on?” or switch one off, use the same plugin’s device tools. A third option is Home Assistant’s Model Context Protocol (MCP) server. It lets you choose in Home Assistant which tools to share with Hermes, including a read-only selection.
Sources read on 28 November 2026 include the Hermes Agent 0.23.5 Home Assistant guide and MCP client guide, the official plugin source pinned at version 2.0.3, and Home Assistant’s MCP integration guide for 2026.11.3.
Install the plugin in the Hermes profile you use
For either the event listener or the device tools, start on the computer where you run Hermes. If you need to set it up first, follow the Hermes Agent installation guide. Run hermes --version. The Home Assistant plugin requires Hermes Agent 0.21.5 or later.
If you use a named profile, run hermes profile use <name> first, replacing the placeholder with your profile name. Later Hermes commands will use that profile too. Its files are normally in ~/.hermes/profiles/<name>/. The default profile uses ~/.hermes/. Install the plugin and check that it is listed as enabled.
hermes plugins install homeassistant
hermes plugins listOlder instructions refer to a Python extra called hermes-agent[homeassistant]. Hermes 0.23.5 has removed that extra. On upgrades, hermes update migrates profiles it recognises as already using Home Assistant.
Create a long-lived access token and test it
- Sign in to Home Assistant with the account Hermes should use. A standard non-administrator account can still operate locks and alarms.
- Click your name in the sidebar to open your profile. Select Security and scroll to Long-Lived Access Tokens.
- Select Create Token and name it “Hermes Agent”. Before closing the dialog, save the token as
HASS_TOKENin your active Hermes profile’s.envfile. Home Assistant does not keep a copy you can retrieve. - The plugin tries
http://homeassistant.local:8123unless you setHASS_URL. Use the address that opens Home Assistant from the computer running Hermes. On a new Home Assistant OS installation, that is usuallyhttp://homeassistant.local/.
Use your own token and address below. Ask a Home Assistant administrator to find your test light under Settings → Devices & services → Entities. Before starting Hermes, replace light.living_room with the entity ID shown there. To allow several lights, separate their IDs with commas. This list limits the plugin’s device tools. The token keeps the account’s permissions.
HASS_TOKEN=your-long-lived-access-token
HASS_URL=http://192.168.1.100:8123
HASS_ENTITY_ALLOWLIST=light.living_roomIf you connect from outside your home, set up encrypted access before testing the token. Home Assistant Cloud provides this without port forwarding. Home Assistant remote access guidance
On the Mac or Linux computer running Hermes, open a private terminal. The Hermes guide gives the template curl -H "Authorization: Bearer <token>" <url>/api/. Before running it, replace the entire quoted header with @- to keep the token out of shell history. Replace <url> with your Home Assistant address without its trailing slash. Keep /api/ at the end of the command.
When curl waits for input, type Authorization: Bearer, add a space and paste your token. The token is visible as you enter it. Press Return, then Ctrl-D to send the request.
A working connection returns the message “API running.” For a 401 response, check that you copied the long-lived token from your profile. If the address is unreachable, check that the computer running Hermes can reach Home Assistant at that address.
Watch a light change and find the reply
The gateway listens over WebSocket. By default both watch lists are empty and watch_all is false, so the gateway logs a warning at startup and drops every state change. To watch lights, add this section to config.yaml in the active profile’s directory. If you already have a platforms section, add the Home Assistant entry inside it.
platforms:
homeassistant:
enabled: true
extra:
watch_domains:
- lightStart the gateway with hermes gateway. If it was already running, restart it to pick up the settings. Check that Home Assistant appears as a connected platform, then switch a light on or off in Home Assistant. Look in its notification panel for a reply titled “Hermes Agent”. The plugin calls persistent_notification.create and reuses the default notification ID hermes_agent, so a later reply updates the same notification.
Changing only the brightness while a light stays on sends no message. After the gateway forwards a change, it skips further changes from that light during its cooldown. The default for cooldown_seconds is 30 seconds per entity.
To watch just one light, remove watch_domains from the example and put the light’s full entity ID under watch_entities. If you use both watch lists, a match in either one counts. The guide describes watch_all as accepting all state changes. The pinned adapter checks it only when both lists are empty, so setting it to true alongside a list leaves that list in effect. ignore_entities takes priority in all cases. Plugin event selection and cooldown
Read a device or change it from chat
With the plugin installed and HASS_TOKEN set, the homeassistant toolset can use Home Assistant’s REST API when you ask. You can leave the event watch lists empty for this route. If the profile’s gateway was running when you edited .env, restart it so it loads your token and list of allowed entities. Then start a fresh hermes chat session in that profile.
- Ask Hermes to list your lights.
ha_list_entitiesreturns their names, IDs and states. - Pick a light from the list and ask whether it is on.
ha_get_statereads that entity and its attributes. Compare the result with the light shown in Home Assistant. - Ask which actions Home Assistant provides for the
lightdomain.ha_list_serviceslists those actions and their parameters. An individual light may support only some of them. - To try a change, choose a light that is off and ask Hermes to turn it on.
ha_call_servicesends the action. Ask for the state again and check the light itself.
If the tools seem to be missing, check the plugin and token in the active profile. When Tool Search is enabled, Hermes finds these tools through tool_search and runs them through tool_call.
Keep locks and alarms under human control
Watching a lock change and giving Hermes permission to operate it are separate decisions. The watch lists filter incoming messages. The plugin’s service handler has no mandatory human confirmation for locks or alarms.
The lights-only allowlist you set in .env applies to listing, reading and controlling entities. Use HASS_ENTITY_DENYLIST for exclusions. The plugin gives lock.* as an exclusion example. A denial wins over an allowance if an entity matches both lists. Plugin entity filters
Connect to Home Assistant’s MCP server
Choose MCP if you want Home Assistant to decide which tools Hermes sees. The Device control tool set uses entities you have exposed to voice assistants and can supply a snapshot of their current states. Home Assistant does not send MCP notifications when those states change. Use the gateway for that. The steps below combine the two projects’ documentation. We have not tested this OAuth connection end to end.
- Sign in to Home Assistant as an administrator and open Settings → System → AI. Enable Model Context Protocol if prompted.
- Check which clients use the Main URL before changing its settings. Saving a change affects every client using that URL.
- Select Configure next to Main URL. Turn off Expose all AI tools, select only Device control and turn on Read-only. To let Hermes connect with a standard Home Assistant account, also turn off Require an administrator account. Save the settings.
- Copy the HTTPS Main URL ending in
/api/mcp. If your instance offers only HTTP, set up encrypted access before trying OAuth. In Settings → System → Network, check that the scheme and hostname match the configured Internal URL or External URL. Individual tool-set URLs, including/api/mcp/assist, ignore the main URL’s settings. - For this MCP-only test, use a Hermes profile without
HASS_TOKENbecause the MCP settings do not restrict the plugin’s device tools. If you need a new profile, runhermes profile create <name>, replacing the placeholder with a new profile name. In that profile’sconfig.yaml, add an entry undermcp_servers. Replace the placeholder with the HTTPS Main URL you copied.
mcp_servers:
homeassistant:
url: "<your_mcp_server_url>"
auth: oauthIn a fresh terminal, run hermes profile use <name> with the name of your MCP test profile. Then run hermes mcp login <name>. For both login and test, replace <name> with homeassistant, the server entry above. Sign in to Home Assistant in your browser. Use an administrator account if you kept the default administrator requirement. If Hermes runs on another computer and the browser ends on a connection-error page, copy the full URL from the address bar and paste it at the prompt in the Hermes terminal. Once login completes, run hermes mcp test <name> to check the response.
Using a Home Assistant administrator account, open Settings → Voice assistants. On the Assist card, select the count of exposed entities. If your light is missing, choose Expose entities, select the light, then confirm with Expose followed by the number selected. Assist can now control the light by voice. The main MCP URL stays read-only. Start hermes chat and ask whether that light is on. For more on managing the connection, see the Hermes Agent MCP guide.
Home Assistant on ReadyHermes
Your agent runs on ReadyHermes servers. We have not tested connecting a hosted agent to Home Assistant. ReadyHermes has no screen to install catalog plugins, edit config.yaml or add a custom MCP server, and catalog plugin installation is unsupported. Supported connections are available through the Apps panel and the Tools catalog.
Questions
Which Hermes Agent integration can react when a light turns on?
Use the official Home Assistant plugin’s gateway. It listens over WebSocket and can forward a watched light’s on/off changes after applying its event filters and cooldown. Replies appear in the Home Assistant notification panel.
Where can you create the token for the Hermes Home Assistant plugin?
Click your name in the Home Assistant sidebar, open Security in your profile, then select Create Token under Long-Lived Access Tokens. Before closing the dialog, save the token as HASS_TOKEN in the active Hermes profile’s .env file.
Why is Home Assistant connected but sending no events to Hermes?
By default, both watch lists are empty and watch_all is false, so the gateway drops every state change. Add the entity’s domain to watch_domains to watch the whole domain. To watch just one entity, leave watch_domains empty and put its full entity ID under watch_entities. Check ignore_entities and the cooldown, which defaults to 30 seconds per entity.
Will Hermes ask before operating a lock or an alarm?
The plugin does not require confirmation, and a standard non-administrator account can still operate locks and alarms. For a lights-only test, ask an administrator for the lights’ entity IDs from Settings → Devices & services → Entities. Put those IDs in HASS_ENTITY_ALLOWLIST in the active profile’s .env file, separated by commas. If the gateway was running, restart it to load the list. This limits the plugin’s device tools. The token keeps the account’s permissions.
How can Hermes get read-only access through MCP?
Use a Hermes profile without the plugin token. Create one if needed. As a Home Assistant administrator, check who else uses the Main URL, since the settings apply to every client using it. Choose Configure, turn off Expose all AI tools, select only Device control and turn on Read-only. Save the settings and give Hermes the HTTPS Main URL ending in /api/mcp. Individual tool-set URLs ignore those settings. We have not tested this OAuth connection end to end.