⚠️ This is an early-stage, proof-of-concept version of the integration. Features and stability may change as development progresses. Use with caution and provide feedback!
A Home Assistant custom component that provides an AI-powered agent capable of generating automations based on natural language queries. The agent connects to all entities in your Home Assistant instance and uses OpenAI, Llama, or Anthropic's Claude API to translate user requests into valid Home operations including creating automations for you!
- Natural Language Automation: Ask the agent to create automations in plain English.
- Entity-Aware: Automatically discovers and uses your existing Home Assistant entities.
- UI Integration: Manage and approve suggested automations directly from Home Assistant's UI (see screenshot below).
- Dashboard Creation: Build Lovelace dashboards and cards using natural language.
- Persistent Memory: Stores entity states, automations and dashboard data between restarts.
- Install HACS if you haven't already.
- Open HACS in Home Assistant and navigate to Integrations.
- Click Explore & Add Repositories and search for AI Agent HA.
- Click on the repository, then click Download.
- Restart Home Assistant.
- In the Home Assistant UI, go to Settings → Devices & Services → Integrations.
- Click Add Integration and search for AI Agent HA.
- Follow the prompts to configure your Llama, OpenAI, or Anthropic API key.
- Clone or download this repository:
git clone https://github.com/sbenodiz/ai_agent_ha.git 2. Copy the ai_agent_ha folder into your Home Assistant custom_components directory 4. Restart Home Assistant. 5. In the Home Assistant UI, go to Settings → Devices & Services → Integrations. 6. Click Add Integration and search for AI Agent HA. 7. Follow the prompts to configure your Llama, OpenAI, or Anthropic API key.
The integration will automatically register a new panel in the sidebar named AI Agent HA. No YAML configuration is required.
Starting with this release, the integration keeps a local memory file storing recent entity states, created automations and dashboards. This context is loaded when Home Assistant starts and saved periodically.
Configuration options:
| Option | Description | Default |
|---|---|---|
memory_refresh_interval |
Minutes between automatic memory updates | 10 |
memory_file |
Filename for the stored memory (relative to the Home Assistant config directory) | ai_agent_ha_memory.json |
-
Navigate to the AI Agent HA panel.
-
Type a natural language request, for example:
"Create an automation to turn off all lights every day at 1am"
-
Review the generated automation suggestion.
-
Click Approve to add it to your configuration, or Reject to discard.
The component will create the automation under .storage/ai_agent_ha_automations and reload automations automatically.
Contributions are welcome! Please open issues or pull requests on GitHub.
MIT License. See LICENSE for details.
You can support this project by starring this GitHub repository. If you want, you can also buy me a coffee here:
