# home-assistant/core architecture

> Architecture diagram of the GitHub repository home-assistant/core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/home-assistant/core
- Repository: https://github.com/home-assistant/core
- Video tour (about a minute): https://gitdiagram.com/home-assistant/core/video

## Overview

Home Assistant is a locally operated home-automation platform: users configure integrations, which expose device capabilities as entities and let the system observe state and react to events and actions. Its runtime centers on a shared core, with configuration flows and a large modular integration ecosystem around it. The repository also includes authentication, voice-assistant pipelines, and backup/restore. The excerpts show core event/state construction and selected subsystem references; many integration internals are unsampled, so their detailed runtime links are omitted.

Main entry points: [`homeassistant/core.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/core.py) (Home Assistant core), [`homeassistant/components/assist_pipeline/pipeline.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/pipeline.py) (Assist pipeline), [`homeassistant/components/assist_pipeline/default_pipeline.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/default_pipeline.py) (Default voice pipeline), [`homeassistant/config_entries.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py) (Integration setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Core runtime"]
  node_core["Home Assistant core<br/>[core.py]"]
  node_event_bus["Event bus<br/>[core.py]"]
  node_state_machine["Entity states<br/>[core.py]"]
end

subgraph group_integrations["Integrations and entities"]
  node_config_entries["Integration setup<br/>[config_entries.py]"]
  node_integrations_catalog["Device integrations"]
  node_entity_registry[("Entity registry<br/>[entity_registry.py]")]
  node_device_registry[("Device registry<br/>[device_registry.py]")]
end

subgraph group_platform["Platform services"]
  node_loader["Integration loader<br/>[loader.py]"]
  node_services["Service handling<br/>[service.py]"]
  node_storage[("Persistent storage<br/>[storage.py]")]
  node_auth[("Authentication<br/>[auth_store.py]")]
end

subgraph group_capabilities["Product capabilities"]
  node_assist_pipeline["Assist pipeline<br/>[pipeline.py]"]
  node_default_pipeline["Default voice pipeline"]
  node_conversation["Conversation agents"]
  node_stt["Speech recognition"]
  node_tts["Speech synthesis"]
  node_backup["Backup and restore<br/>[manager.py]"]
end

node_user(("Home operator"))

node_user -.->|"configures"| node_config_entries
node_config_entries -.->|"selects integration"| node_integrations_catalog
node_core -->|"creates"| node_event_bus
node_core -->|"creates"| node_state_machine
node_entity_registry -->|"cleans restored states"| node_state_machine
node_config_entries -->|"dispatches flows"| node_integrations_catalog
node_loader -.->|"loads components"| node_integrations_catalog
node_services -.->|"uses runtime"| node_core
node_storage -->|"initializes with"| node_core
node_auth -->|"uses storage"| node_storage
node_assist_pipeline -->|"uses agents"| node_conversation
node_assist_pipeline -->|"uses recognition"| node_stt
node_assist_pipeline -->|"uses synthesis"| node_tts
node_default_pipeline -->|"uses agents"| node_conversation
node_default_pipeline -->|"uses recognition"| node_stt
node_default_pipeline -->|"uses synthesis"| node_tts
node_backup -->|"uses storage"| node_storage

click node_config_entries "https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py"
click node_integrations_catalog "https://github.com/home-assistant/core/tree/dev/homeassistant/components"
click node_core "https://github.com/home-assistant/core/blob/dev/homeassistant/core.py"
click node_event_bus "https://github.com/home-assistant/core/blob/dev/homeassistant/core.py"
click node_state_machine "https://github.com/home-assistant/core/blob/dev/homeassistant/core.py"
click node_entity_registry "https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/entity_registry.py"
click node_device_registry "https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/device_registry.py"
click node_loader "https://github.com/home-assistant/core/blob/dev/homeassistant/loader.py"
click node_services "https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/service.py"
click node_storage "https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/storage.py"
click node_auth "https://github.com/home-assistant/core/blob/dev/homeassistant/auth/auth_store.py"
click node_assist_pipeline "https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/pipeline.py"
click node_default_pipeline "https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/default_pipeline.py"
click node_conversation "https://github.com/home-assistant/core/tree/dev/homeassistant/components/conversation"
click node_stt "https://github.com/home-assistant/core/tree/dev/homeassistant/components/stt"
click node_tts "https://github.com/home-assistant/core/tree/dev/homeassistant/components/tts"
click node_backup "https://github.com/home-assistant/core/blob/dev/homeassistant/components/backup/manager.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_core,node_event_bus,node_state_machine toneBlue
class node_config_entries,node_integrations_catalog,node_entity_registry,node_device_registry toneAmber
class node_loader,node_services,node_storage,node_auth toneMint
class node_assist_pipeline,node_default_pipeline,node_conversation,node_stt,node_tts,node_backup toneRose
class node_user toneIndigo
```

## Components

### Core runtime

- [Home Assistant core](https://github.com/home-assistant/core/blob/dev/homeassistant/core.py): `homeassistant/core.py`
- [Event bus](https://github.com/home-assistant/core/blob/dev/homeassistant/core.py): `homeassistant/core.py`
- [Entity states](https://github.com/home-assistant/core/blob/dev/homeassistant/core.py): `homeassistant/core.py`

### Integrations and entities

- [Integration setup](https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py): `homeassistant/config_entries.py`
- [Device integrations](https://github.com/home-assistant/core/tree/dev/homeassistant/components): `homeassistant/components`
- [Entity registry](https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/entity_registry.py): `homeassistant/helpers/entity_registry.py`
- [Device registry](https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/device_registry.py): `homeassistant/helpers/device_registry.py`

### Platform services

- [Integration loader](https://github.com/home-assistant/core/blob/dev/homeassistant/loader.py): `homeassistant/loader.py`
- [Service handling](https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/service.py): `homeassistant/helpers/service.py`
- [Persistent storage](https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/storage.py): `homeassistant/helpers/storage.py`
- [Authentication](https://github.com/home-assistant/core/blob/dev/homeassistant/auth/auth_store.py): `homeassistant/auth/auth_store.py`

### Product capabilities

- [Assist pipeline](https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/pipeline.py): `homeassistant/components/assist_pipeline/pipeline.py`
- [Default voice pipeline](https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/default_pipeline.py): `homeassistant/components/assist_pipeline/default_pipeline.py`
- [Conversation agents](https://github.com/home-assistant/core/tree/dev/homeassistant/components/conversation): `homeassistant/components/conversation`
- [Speech recognition](https://github.com/home-assistant/core/tree/dev/homeassistant/components/stt): `homeassistant/components/stt`
- [Speech synthesis](https://github.com/home-assistant/core/tree/dev/homeassistant/components/tts): `homeassistant/components/tts`
- [Backup and restore](https://github.com/home-assistant/core/blob/dev/homeassistant/components/backup/manager.py): `homeassistant/components/backup/manager.py`

### Other components

- **Home operator**

## Connections

- Home operator → Integration setup: configures
- Integration setup → Device integrations: selects integration (evidence: `README.rst`)
- Home Assistant core → Event bus: creates (evidence: `homeassistant/core.py`)
- Home Assistant core → Entity states: creates (evidence: `homeassistant/core.py`)
- Entity registry → Entity states: cleans restored states (evidence: `homeassistant/helpers/entity_registry.py`)
- Integration setup → Device integrations: dispatches flows (evidence: `homeassistant/config_entries.py`)
- Integration loader → Device integrations: loads components (evidence: `homeassistant/components/stt/__init__.py`)
- Service handling → Home Assistant core: uses runtime (evidence: `homeassistant/helpers/service.py`)
- Persistent storage → Home Assistant core: initializes with (evidence: `homeassistant/helpers/storage.py`)
- Authentication → Persistent storage: uses storage (evidence: `homeassistant/auth/auth_store.py`)
- Assist pipeline → Conversation agents: uses agents (evidence: `homeassistant/components/assist_pipeline/pipeline.py`)
- Assist pipeline → Speech recognition: uses recognition (evidence: `homeassistant/components/assist_pipeline/pipeline.py`)
- Assist pipeline → Speech synthesis: uses synthesis (evidence: `homeassistant/components/assist_pipeline/pipeline.py`)
- Default voice pipeline → Conversation agents: uses agents (evidence: `homeassistant/components/assist_pipeline/default_pipeline.py`)
- Default voice pipeline → Speech recognition: uses recognition (evidence: `homeassistant/components/assist_pipeline/default_pipeline.py`)
- Default voice pipeline → Speech synthesis: uses synthesis (evidence: `homeassistant/components/assist_pipeline/default_pipeline.py`)
- Backup and restore → Persistent storage: uses storage (evidence: `homeassistant/components/backup/manager.py`)
