Gemini Smart Home Agent – A local AI Agent for Home Assistant (Python + Streamlit)

Content: Hi everyone! :wave:

I’d like to share a project I’ve been working on for the past few days. It is a custom AI Agent that connects the Google Gemini 2.0 Flash API directly to Home Assistant.

Unlike standard integrations, this agent runs as a lightweight Python application (using a Streamlit interface) on your computer and communicates with your HA instance via the API.

Key Features (v4.0):

  • Two-way Communication: The agent doesn’t just read states; it can trigger services via API calls (e.g., light.turn_off, cover.open_cover).
  • Context Aware: It understands conversation history and supports custom aliases (e.g., if I say “Bubble”, it knows I mean light.garage_main).
  • Smart Filtering: It intelligently filters out thousands of technical entities and sends only the relevant ones (lights, switches, climate) to the LLM, ensuring fast and accurate responses.
  • Secure: It uses secrets.toml for API keys, keeping your credentials safe.

The project is written in Python and is completely open-source. If anyone wants to try it out or has ideas for improvements, the code is available here:

:point_right: GitHub: GitHub - MKtuzi/Gemini-Smart-Home-Agent: A simple, lightweight, and powerful Python client that connects **Google Gemini 2.0 Flash** directly to your **Home Assistant**. This project allows you to chat with your smart home in natural language using a beautiful web interface (Streamlit) or a command-line tool.

I’d love to hear your feedback or suggestions!

Cheers, Matjaž

1 Like