AI coding agent with full Home Assistant access — manage automations, entities, dashboards, and more via natural language.
Powered by Pi, an open-source coding agent that runs in your terminal.
- Open Home Assistant
- Go to Settings → Add-ons → Add-on Store
- Click the ⋮ menu (top right) → Repositories
- Add this URL:
https://github.com/dkmaker/hass-pi-agent - Click Add → Close
- Find Pi Agent for Home Assistant in the add-on store (refresh if needed)
- Click Install
- Go to the Configuration tab
- Add your AI provider API key under Environment, e.g.:
ANTHROPIC_API_KEY=sk-ant-... - Click Save
- Go to the Info tab and click Start
Click Pi Agent in the sidebar, or go to the Info tab and click Open Web UI.
Select your AI provider from the Default Provider dropdown:
Anthropic · OpenAI · Google · OpenRouter · Groq · xAI · Mistral · Cerebras · Hugging Face · GitHub Copilot · Amazon Bedrock · Google Vertex · Azure OpenAI
Add your provider's API key as an environment variable in the Environment list:
| Provider | Environment variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY=sk-ant-... |
| OpenAI | OPENAI_API_KEY=sk-... |
GEMINI_API_KEY=AI... |
|
| OpenRouter | OPENROUTER_API_KEY=sk-or-... |
| Groq | GROQ_API_KEY=gsk_... |
| xAI | XAI_API_KEY=xai-... |
| Mistral | MISTRAL_API_KEY=... |
| Cerebras | CEREBRAS_API_KEY=... |
| Hugging Face | HF_TOKEN=hf_... |
| GitHub Copilot | GITHUB_TOKEN=gho_... |
| Amazon Bedrock | AWS_ACCESS_KEY_ID=... + AWS_SECRET_ACCESS_KEY=... + AWS_REGION=us-east-1 |
Optionally set a Default Model — accepts any model ID or fuzzy pattern:
anthropic/claude-sonnet-4-20250514openai/gpt-4o*sonnet*(fuzzy match)
Leave empty to use the provider's default.
Install extra Alpine Linux packages at startup (e.g., jq, imagemagick).
Pi Agent has full access to your Home Assistant instance:
- Automations — create, edit, debug, and manage automations
- Entities & Devices — inspect states, rename, organize into areas
- Dashboards — build and modify Lovelace dashboards and cards
- Services — discover and call any Home Assistant service
- Helpers — create input booleans, counters, timers, templates, and more
- Areas & Labels — organize your smart home
- Add-ons — manage installed add-ons
- Templates — render and test Jinja2 templates
- Backups — create and manage backups
- System — view system info, restart, and reload configuration
amd64aarch64
MIT