Copilot and AI features
Every AI feature in Hearth goes through one LiteLLM proxy that you run: the Copilot, the assistant in the Office editor, Dictate (voice typing), the Reader's read aloud, search by meaning, and web search for the Copilot. Hearth never calls a model provider directly, and LiteLLM's key never leaves the server.
Which models you put behind LiteLLM is your choice: a provider's models, or models on your own hardware. Hearth lists what LiteLLM offers and lets you pick.
Connecting LiteLLM
Set both, or neither:
LITELLM_URL: http://litellm:4000
LITELLM_KEY_FILE: /run/hearth/litellm-key
LITELLM_KEY_FILE is a file holding a LiteLLM key for Hearth. Without
these settings the Copilot, Dictate, read aloud and the Office
assistant are not shown, and search uses words only.
Give Hearth's key access to every model; do not restrict it to a model
list. Hearth sorts LiteLLM's models by the mode LiteLLM reports for
each (/model/info):
| Mode | Used for |
|---|---|
chat |
the Copilot, the Office assistant, chat titles |
embedding |
search by meaning (Search) |
audio_transcription |
Dictate |
audio_speech |
read aloud in the Reader and under Copilot answers |
image_generation |
pictures the Copilot makes, when allowed |
A model without the right mode in LiteLLM's configuration does not
appear in Hearth's lists. Web search uses LiteLLM's search tools
(/v1/search/tools).
Administration, Copilot
- Copilot: on or off for everyone. Guests never have it.
- AI Tools in the Office editor: the assistant inside Hearth Office, on
or off. It uses the default model. The engine also needs
OFFICE_ENGINE_KEY(Office). - Default model: the chat model people get unless they choose another.
- Title model: a chat model that names new chats while the first answer is written. None (first words) names a chat by its first words.
- Web search: the LiteLLM search tool the Copilot searches with, or Off (the default).
- Image model: the model the Copilot makes and changes pictures with, or Off (the default).
- Models people may choose and Image models people may choose: the models offered in people's own settings, besides the defaults. If you later take a model off the list, people who chose it get the default again.
- Limits per person per day: how many questions each person may ask a day, and how many times a day each may use each of the Copilot's tools. None are set unless you set them.
The same switches from the command line:
docker compose exec -T hearth /hearth copilot set --model NAME [--office] [--off]
docker compose exec -T hearth /hearth copilot show
NAME is the model's name in LiteLLM. --office turns the Office
assistant on, --off turns the Copilot off.
The AI policy
Administration, Security has an AI policy for everyone or for chosen groups: the Copilot off, only some of the models, web search off, and which areas it may read (mail, files, calendar, notes). See Security policies.
What the Copilot can read
The Copilot works with the person's own permissions: their files and what is shared with them, their mailboxes, calendars, contacts, tasks, notes and the spaces they may read. Folders encrypted end to end are never read. Each person can turn off mail, files, calendar and notes for themselves in Settings, Copilot.
What a person sends to the Copilot, and the passages it reads to answer, go through LiteLLM to the model you configured. If your organisation handles health or other sensitive data, the model provider must have signed the agreement the law asks for, or the model must run on your own hardware (Regulated use).
Dictate
Dictate puts a microphone beside text fields (mail, comments, task notes, event descriptions, Notes). The browser cuts speech into short pieces and sends each to Hearth, which passes it to LiteLLM. No audio is kept.
Choose the default speech-to-text model in Administration, Dictate. People can choose their own language and model in Settings, Dictate.
Read aloud
The Reader and Copilot answers can be read aloud. Hearth sends the text to LiteLLM's speech endpoint and keeps nothing. Choose the default model and voice in Administration, Reader. For voices Hearth knows the list of, the voice is picked from a list with Play sample; for other models type the voice, and Save tries it once.
Usage and cost
Each Copilot answer records its model, the time to the first word, the tokens used and, where LiteLLM names a price, the cost. For totals per key or per model, use LiteLLM's own reports.