2026-10-22

WireClaw turns plain English into offline ESP32 automation rules

Open SourceESP32FirmwareEdge AIHome AutomationRules Engine
WireClaw turns plain English into offline ESP32 automation rules

WireClaw is an open-source firmware that puts a natural-language rule engine on the ESP32. You describe a task in a chat, and the device compiles it into a rule that keeps running on its own.

The project landed on GitHub in February 2026 under the MIT licence and had passed 200 stars by the time it was covered by Electronics For You in mid-October. The README describes it as an AI agent for a five-dollar microcontroller: chat to configure, run locally around the clock.

What the firmware does

Most AI hardware routes every command to the cloud and stalls when the service does. WireClaw splits the work into two loops that run side by side on the chip.

The AI loop wakes only when a message arrives over Telegram, serial, or a NATS message broker. It forwards the text to a large language model, either a cloud API such as OpenRouter or a local server like Ollama or llama.cpp, and turns the reply into a structured rule. After that, the model is out of the picture.

The rule loop runs on every tick of the main loop, with no network and no model. It reads registered sensors, checks each active rule, and fires the matching action. A rule such as turn the fan on when the temperature goes above 28 degrees stays alive through reboots, disconnects, and expired API keys, because it no longer depends on anything outside the chip.

What you can wire up

The device registry takes sensors, LEDs, relays, and switches, each described in conversation rather than written as code. The supported families are the ESP32-C6, ESP32-S3, and ESP32-C3, all needing at least 4 MB of flash.

Role Example
Sensor NTC thermistor for room temperature
Output Relay driving a small fan
Indicator Onboard or external RGB LED
Mesh NATS link to other WireClaw units or a desktop agent

Rules are edge triggered: a rule fires once when its condition first becomes true and resets when the condition clears, so a sustained state does not repeat the action. The firmware reports its own footprint at about 196 KB of RAM out of 320 KB and 1.3 MB of flash out of 2.5 MB, with the rule engine itself around 6.2 KB and a 20 KB buffer for model requests.

Persistent memory

Beyond rules, WireClaw keeps a small notebook in flash. Tell it your favorite LED color and it writes the note to memory, then answers a later request to use that color. This is separate from the rule engine: memory carries preferences across reboots, while rules carry behavior.

It can also bridge to OpenClaw, a desktop AI agent, across a NATS server. The heavier agent discovers and drives hardware through WireClaw, while the on-chip rules keep running even after the desktop agent disconnects.

Getting started

Flashing needs no toolchain. A browser-based WebSerial flasher at the project site works in Chrome or Edge; developers who prefer source control can build with PlatformIO. After flashing, the ESP32 opens a Wi-Fi access point, and a setup page collects network credentials, model settings, and the Telegram bot token. From there a message such as register the temperature sensor and switch the fan on above 28 degrees is enough to stand up a working automation.

Where it is thin

WireClaw is a maker tool, not a controller for safety-critical loads. Rules are evaluated periodically, so it is not a hard real-time system; the project itself steers users away from millisecond-scale tasks such as a 3D-printer heated bed. Telegram alerts need connectivity even though the underlying rules do not. Relay projects that touch mains voltage call for properly rated, enclosed switching hardware, and beginners are advised to start with low-voltage loads.

The resource figures above are project-reported and will shift with configuration. As an early effort, the rule engine is deliberately simple and the ecosystem is just forming. For the price of a board and a few cents of parts, though, it is a clean demonstration of letting natural language compile into embedded logic that runs without the cloud.

← All news