Agents and automation
Last updated
Adding an Ollama conversation agent to Home Assistant: exposed entities and instructions
The model interprets the sentence; the action only happens inside the entities you exposed.
The Ollama integration in Home Assistant uses an external Ollama server as a conversation agent. The model interprets what you said, and with device control on it can only act on entities exposed through the Assist API1. This guide covers the order for the model, instructions, exposure list and aliases.
The path a question takes to the model
Assist starts with the wake word, turns speech into text and hands that text to a conversation agent. With the Ollama integration, a model on your local server fills that role. It either writes an answer or, with device control on, calls the Assist API.
Changing the model therefore does not change which devices can be operated. The model chooses which device to use and shapes the sentence; Home Assistant throws the switch.

Setting the model and the instructions
Add the Ollama integration under Settings > Devices & services and enter the server URL (for example http://192.168.0.20:11434). An API key is needed only if the server requires authentication, and naming a model downloads it during setup.
In the instructions, state the answer language and length and anything the model must not do. Longer text eats into the model's context, so start with naming rules and a short-answer preference, and add only what you need.
| Aspect | Value to enter | Watch out |
|---|---|---|
| URL | The Ollama server address and port | It must be reachable from Home Assistant |
| Model | A size that handles device commands | Very large models slow the reply |
| Instructions | Language, length, forbidden actions | It uses context, so keep it short |
| Control Home Assistant | Turn on only when needed |
The exposed list is the whole permission set
Turning device control on does not hand the model every device in the house. Only the entities you pick on the Expose tab under Settings > Voice assistants are visible to the Assist API, and the model chooses within that list.
Leave locks and garage doors out from the start. Begin with lights, switches and climate devices that are easy to undo, and add sensors first as read-only values to check.

Matching names with aliases
Calling the same light 'living room light' and 'main lamp' confuses the model. Add the alias on the Expose tab and Assist recognises that name too.
Aliases also work for areas and floors. In a house that mixes Korean and English, add both names so the same device is found whichever language you speak.
What to check when it misbehaves
The Ollama integration does not connect to sentence triggers. To run a fixed phrase exactly, create a sentence trigger in an automation instead; open questions still go to the conversation agent.
If answers lag, check model size and server location first. Keeping the server on the same network cuts the round trip, and long instructions delay the first response. Say the same sentence three times in the phone app and see whether the result is stable.

Terminology notes
API — A defined interface that lets other code call a program’s functions.
Back to the text
Frequently asked questions
- What should you check first in this article?
- The Ollama integration in Home Assistant uses an external Ollama server as a conversation agent. The model interprets what you said, and with device control on it can only act on entities exposed through the Assist API. This guide covers the order for the model, instructions, exposure list and aliases.
Read next
Agents and automation
Running local AI for a smart home: splitting voice, conversation and video across your own machines
Agents and automation
Raising local LLM voice command accuracy: aliases, exposure and instructions
Agents and automation
Can a local LLM run the house? Exposure scope and safety boundaries
read first
What Is a Local AI Agent? When It Makes Sense to Run One
