Skip to content

Examples

Fifteen worked examples live in examples/. Every one is validated by the test suite, so they cannot rot silently.

01 laundry reminder one question, one threshold, one binary sensor
02 alert triage three questions in one call, three notification paths
03 doorbell triage a choice on an intercom transcript
04 situation layer named situations other automations trigger on
05 confidence gating act, ask, or stay quiet
06 composite score several scores combined with your own weights
07 Jev gates the LLM a cheap typed decision in front of an expensive call
08 cascade low confidence escalates to a reasoning model
09 guardrail the LLM writes, Jev checks it against the source
10 extract then verify the LLM pulls fields, Jev verifies each one
11 post and parcels one attention queue across several channels
12 energy window where to keep arithmetic and where to ask
13 voice commands a command router, 12 questions per request
14 conversation agent watching what the agent spends
15 doorbell triage in the UI six questions, entity targets, three branches

Two worked answers

A washing machine that has finished but not been emptied. 1.4 W, door shut, 14 minutes since the programme ended:

The laundry question answering 0.86

A cable modem with one reading near its limit. SNR 31.2 dB against a healthy 33, upstream power 50.4 dBmV against a 51 ceiling, 1,184 uncorrected errors:

The connection question answering degraded

Read that second one closely. It answers degraded at 0.59 with marginal right behind at 0.40, and a confidence of 0.46. That is the model saying the data is genuinely ambiguous rather than pretending otherwise, and it is the best argument for why the actions return confidence at all: an automation can require 0.8 before it wakes anyone.

Pairing with an LLM

Four of the examples combine Jev with ai_task.generate_data, Home Assistant's provider-agnostic way to call a large language model. Set up Google Generative AI, OpenAI, Anthropic or a local Ollama and point entity_id at what it creates.

The division of labour is the same each time. Jev decides, in about 300 ms for a fraction of a cent, and returns a number your code branches on. The LLM writes prose or handles what Jev is not sure about, and costs a hundred times more per call. Putting the cheap typed decision in front of the expensive one is the whole point.