AI-driven framework for smart home automation
Project description
OpenAction
OpenAction is an AI-native action framework for the Agentic Home.
Move beyond rigid "If-This-Then-That" rules and tedious UI-based configurations. Powered by AI agent technology, OpenAction replaces traditional smart home solutions with flexible, adaptive logic. It helps to translate natural language intent into dynamic, executable scripts — giving your smart home the ability to adapt, reason, and act.
Read the full architectural deep-dive on Medium: From Smart Home to Agentic Home
Core Features
- Natural Language Automation: Define complex home behaviors via chat. No more wrestling with nested "If-Then" menus or YAML configurations.
- Stateful Intelligence: An integrated
Storeprovides persistence, allowing scripts to save and retrieve data across multiple executions. - Dynamic Scheduling: A built-in Cron service triggers AI-generated scripts based on time, sensor events, or external API data.
- Python Execution: The AI generates standard Python code, enabling complex calculations, loops, and sophisticated error handling.
Architecture & Workflow
The system acts as a bridge between high-level reasoning (Agents) and low-level hardware control. Here, the AI agent acts as a software developer who can introspect services and write custom, deterministic Python scripts to control smart home devices. The workflow is as follows:
- The Intent: The user describes a goal to an MCP-capable client (e.g., Claude Desktop): "If it’s dark outside and someone is home, turn on the living room light. If we’re away, simulate presence by randomly toggling lights, ending no later than late in the evening."
- The Translation: The Agent uses the OpenAction MCP Server tools to inspect available devices and writes a custom Python script.
- The Registration: OpenAction stores the script and sets up the necessary triggers (e.g., polling a weather API or listening for a sensor change).
- The Execution: When triggered, the script runs in a local sandbox, calling the endpoints of connected Sensors & Actuators.
How to Use It
1. Running via Docker
You can also run OpenAction as a Docker container. Use host networking to allow the server to easily discover and communicate with local network devices. Mount a local directory to preserve the working state (scripts and store data) across container restarts.
sudo docker run -d --name openaction --restart always --log-driver local --log-opt max-size=10m --log-opt max-file=3 --network host -v /etc/script/openaction:/etc/work -e devices='' grro/openaction:0.0.30
Note: Make sure to map a persistent volume to /etc/work so that your environment state and custom scripts are not lost when the container is recreated.
2. Testing with MCP Inspector
You can test the server capabilities and available tools of the running Docker container using the official MCP Inspector via Server-Sent Events (SSE):
npx @modelcontextprotocol/inspector sse http://localhost:8080/sse
Once started, open the provided localhost URL (e.g., http://localhost:5173/) in your browser to inspect the MCP tools and resources.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openaction-0.0.31.tar.gz.
File metadata
- Download URL: openaction-0.0.31.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ae3fde990d336f9d8c2c90764ef53278d24d512618f39b1cc83e0ea08948d80
|
|
| MD5 |
58aa067f69161a6078ad9244390f6dc9
|
|
| BLAKE2b-256 |
8d4cc14663449447b2704116be5a12369e383258ee90e63fb802f501267d04fd
|
File details
Details for the file openaction-0.0.31-py3-none-any.whl.
File metadata
- Download URL: openaction-0.0.31-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04645e5de33eb07cc56b445e02ae817f2691092ae7b24d91004ebb15aae16de6
|
|
| MD5 |
b8824139cf97e42e694bd9dd2401d1d9
|
|
| BLAKE2b-256 |
03efe11711cbf104c795a76c1d93aae48b822948af39ea020812737cf8e1879e
|