Registry / llm-agents / hassil

hassil

JSON →
library3.8.1pypypi✓ verified 83d ago

A Python library to parse Home Assistant Intent Language (HassIL) sentence definitions. Version 3.5.0 is current; follows a rolling release cadence aligned with Home Assistant developments.

pip install hassil
INSTALL
IMPORT
SIG · HASSIL
H
hassil
llm-agentspythonv3.8.1
Install
1.8s avg
Import
403ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.8.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.416s · 21.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.390s · 23MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_sentence
from hassil import parse_sentence
from hassil.parser import parse_sentence
parse_sentence is exposed at top-level package, not in a submodule.
Intents
from hassil import Intents
from hassil.intents import Intents
Intents is at top level.
SlotSchema
from hassil import SlotSchema
from hassil.schema import SlotSchema
SlotSchema is exported from top-level.
TextSlotList
from hassil.slot_schemas import TextSlotList
from hassil import TextSlotList
TextSlotList is in slot_schemas submodule.

Parses a sentence against YAML-defined intents and prints the matched intent name.

from hassil import parse_sentence, Intents, SlotSchema intents_yaml = """ language: "en" intents: Greet: data: - sentences: - "hello" """ intents = Intents.from_yaml(intents_yaml) slots = [] # optional slot schemas result = parse_sentence("hello", intents, slots) if result: print(f"Intent: {result.intent.name}") else: print("No match")
Debug
Known issues
breakingIn version 3.0, the `parse_sentence` function signature changed: the `slots` parameter is now optional and the return type changed from a tuple to an `IntentMatch` object.
fix
Update code to expect `result.intent.name` instead of `intent_name` from tuple unpacking.
affects: >=3.0.0
deprecatedThe `from hassil import Sentence` class is deprecated in favor of using `Intents.from_yaml` directly.
fix
Replace `Sentence` with `Intents` and use `Intents.from_yaml()`.
affects: >=2.5.0
gotchaSlot lists expect a list of `TextSlotList` or `ListSlotSchema` objects, not plain dicts. Passing raw YAML dicts will raise a validation error.
fix
Use the provided schema classes: `from hassil.slot_schemas import TextSlotList` and construct properly.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'hassil'
Package not installed or environment issue.
fix
Run `pip install hassil` and ensure you are using Python >=3.9.
AttributeError: module 'hassil' has no attribute 'parse_sentence'
Import path changed; parse_sentence is top-level but not in older versions.
fix
Upgrade to hassil >=1.0 and use `from hassil import parse_sentence`.
ValueError: No parser available for language '...'
Unsupported or missing language definition in YAML.
fix
Make sure the `language` field in YAML is a valid code (e.g., 'en', 'de', 'fr') and that the intents are defined with that language.
Upgrade
Version history
3.8.1latest on PyPI · released Jun 15, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
hassil — pip install hassil · libregistry