Skip to content

elboletaire/ha-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

123 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Home Assistant Pi Agent (HA-Pi)

A pi agent add-on for Home Assistant OS.

Chat with an AI agent directly from the Home Assistant web UI or Telegram. The agent understands your smart home setup and can help you manage it through natural conversation.

What Can It Do?

  • 🏠 Create automations β€” Describe what you want and the agent writes the YAML for you
  • πŸ” Debug your setup β€” Ask why a device isn't responding or an automation isn't triggering
  • πŸ’‘ Control devices β€” Turn on lights, adjust thermostats, or run scenes through conversation
  • πŸ“Š Explore your system β€” List entities, check device states, or review sensor history
  • πŸ› οΈ Edit configuration β€” Update configuration.yaml, scripts, or any HA config file
  • πŸ“± Work from anywhere β€” Use the web UI at home or Telegram on the go

Preview

Pi Agent Telegram screenshot
Telegram bot preview
Pi Agent web UI screenshot
Web UI after loading the Telegram session

Features

  • Full pi agent embedded in your HA instance
  • Web UI accessible from the Home Assistant sidebar
  • Telegram integration β€” Chat with your agent from your phone (setup guide)
  • Bundled Home Assistant skill for entity control and automation management
  • Session history that persists across restarts and syncs between web and Telegram
  • Dynamic model selector with support for multiple AI providers
  • Adaptive light/dark UI that follows Home Assistant and browser color scheme preferences
  • Customizable agent behavior via add-on options or AGENTS.md file
Pi Agent Telegram screenshot
Model selection
Pi Agent web UI screenshot
Session selection

Runtime Information

The agent automatically receives context about its deployment environment:

  • Current Home Assistant version
  • Add-on version
  • Access type (ingress/direct)
  • Deployment type (HAOS/Supervised/Standalone)
  • System architecture

This information appears in the agent's system prompt, helping it provide context-aware responses.

See Runtime Information for details and troubleshooting.

Installation

Open your Home Assistant instance and show the add add-on repository dialog.

  1. Add this repository to your HA add-on store (use button above)
  2. Install Pi Agent
  3. Start the add-on
  4. Click Open Web UI or find Pi Agent in your sidebar
  5. Open the Providers modal and add your API key or sign in with OAuth

First Boot

When you open the first conversation, the agent automatically runs two startup routines β€” this is expected behaviour, not a sign of something going wrong.

First, it loads the home-assistant-management skill, which gives it awareness of HA service domains, entity patterns, and API conventions.

Second, if no system profile exists yet, it runs the system-profile-creator skill. This inspects your specific HA instance β€” reading configuration.yaml, checking your config structure, sampling a few automations and scripts to pick up your naming conventions and language, and querying available notification services. The result is saved to /data/pi-agent/agents/skills/system-profile/ and reused in every future session, so this inspection only runs once.

You can ask the agent to refresh the profile at any time by saying "update system profile".

Configuration

Option Description
log_level Server log verbosity (debug, info, warn, error)
agents_md_append Extra instructions for the agent (e.g. Always respond in Spanish)
telegram_enabled Enable Telegram bot integration
telegram_bot_token Your Telegram bot token from @BotFather
telegram_allowed_chat_ids Comma-separated list of allowed Telegram chat IDs

API keys and OAuth tokens are managed from the web UI's Providers modal and stored in /data/pi-agent/auth.json.

Telegram Integration

Chat with your Pi Agent from Telegram! Create a bot via @BotFather, configure the token in the add-on settings, and you're ready to go. Sessions are shared between web and Telegram.

Quick commands: /new (new session), /sessions (list sessions), /status (current state)

πŸ‘‰ Full Telegram setup guide

Persistent Storage

Everything in /data/pi-agent/ persists across upgrades and is included in HA backups:

  • Sessions: Conversation history
  • Skills: User-installed agent skills
  • Settings: Model selection and preferences
  • AGENTS.md: Your custom agent instructions

The agent can also read and write files in /config to edit your Home Assistant configuration directly.

Documentation

See DOCS.md for detailed information on providers, session management, skill installation, and troubleshooting.

Support

Open an issue on GitHub.

About

πŸ€– AI agent add-on for Home Assistant OS

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages