How fabbricate-it-solutions/klar-ha-nlu works
Klar NLU is a deterministic, multilingual Home Assistant voice-control engine, exposed through a Home Assistant Assist integration and an operator web UI. The main workflow sends an utterance through the integration to the Rust engine, which interprets it using language resources, the effective home graph, and session context, then returns an intent or clarification for Home Assistant. The README documents a second Wyoming interface and mapping, lab, policy, conversation, and settings capabilities. The graph reflects those documented branches; source excerpts were partial, so uncertain internal wiring is omitted.
Main entry points: pipeline.rs NLU pipeline · web.rs HTTP API · wyoming.rs Wyoming API · App.tsx Operator UI
Components 20
Interfaces
- Assist agent
custom_components/klar_nlu/conversation.py - Engine client
custom_components/klar_nlu/engine_http.py - HTTP API
src/io/web.rs - Wyoming API
src/io/wyoming.rs - Runtime state
src/io/state.rs
Interpretation
- NLU pipeline
src/nlu/pipeline.rs - Intent parsing
src/parse/mod.rs - Language packs
src/lang/mod.rs - Intent outcomes
src/types/intent.rs - Conversation session
src/session.rs
Home Context
- Effective home graph
src/home/mod.rs - HA home sync
src/io/home_sync.rs
Operator UI
- Operator UI
web/src/App.tsx - UI API client
web/src/api.ts - Mapping and lab
web/src/pages
Optional LLM
- LLM assist
src/llm/assist.rs - LLM client
src/llm/client.rs
Other components
- Voice user
- Home Assistant
- LLM provider
Connections 20
- Voice user → Home Assistant: speaks to
- Home Assistant → Assist agent: routes Assist
- Assist agent → Engine client: requests parse
- Engine client → HTTP API: posts utterance
- HTTP API → NLU pipeline: invokes parsing
- Wyoming API → NLU pipeline: invokes parsing
- NLU pipeline → Intent parsing: analyzes text
- NLU pipeline → Language packs: uses locale
- NLU pipeline → Effective home graph: reads targets
- NLU pipeline → Conversation session: reads and updates
- NLU pipeline → Intent outcomes: returns outcome
- HTTP API → Runtime state: uses shared state
- Wyoming API → Runtime state: uses shared state
- Home Assistant → HA home sync: provides registry data
- HA home sync → Effective home graph: updates graph
- Operator UI → UI API client: requests data
- UI API client → HTTP API: calls endpoints
- Operator UI → Mapping and lab: shows tools
- LLM assist → LLM client: requests completion
- LLM client → LLM provider: sends chat request