MCU Agent — Developer Portal for Embedded Agents
MCU Agent — Embedded Agents for Engineers
An MCU agent is an event-driven firmware program running on a microcontroller that combines sensor I/O, local decision logic, optional on-device ML inference, and structured communication (MQTT, HTTP, CoAP) — delegating complex reasoning to edge or cloud services only when necessary.
This is not a marketing site. It is a technical reference for embedded engineers, firmware developers, TinyML practitioners, and makers who are building real systems on real hardware.
What you’ll find here
| Section | What it covers |
|---|---|
| What is an MCU Agent? | Precise definition. What runs on-device, what runs off. |
| Architecture | Event loop, state machine, sensor I/O, delegation patterns. |
| ESP32 Agent Guide | ESP32-S3 vector ISA, ESP-IDF setup, MQTT client, C snippets. |
| STM32 Agent Guide | STM32H7/STM32MP1, STM32Cube.AI, CMSIS-NN, LwIP+MQTT. |
| MQTT for MCU Agents | Topic design, QoS, broker selection, payload format. |
| Generated C Code | YAML/JSON spec → generated firmware modules. |
| TinyML vs MCU Agents | Not the same thing. Clear comparison. |
| Sensor Patterns | Anomaly detect, threshold, fusion, local actuate. |
| Cloud Delegation | When and how the MCU calls home for reasoning. |
| Tools Review | Edge Impulse, STM32Cube.AI, ESP-IDF, Zephyr, Arduino IoT Cloud, ForestHub. |
| Examples | Six working example projects with hardware lists. |
| Glossary | MCU, RTOS, CMSIS-NN, sensor fusion, and 15+ terms. |
| About | Editorial charter, accuracy standards, disclosure. |
Why “MCU agent” and not just “IoT device”?
An IoT device publishes a reading. An MCU agent makes a local decision first.
The agent pattern implies a state machine with goals: detect an event, decide locally whether to act or escalate, communicate with structure, receive commands, update its own parameters. The device is the substrate; the agent is the software architecture.
/* Minimal MCU agent loop — illustrative */
while (1) {
sensor_read(&ctx.reading);
agent_state_t next = agent_evaluate(&ctx);
if (next == STATE_ALERT) {
mqtt_publish("agents/device01/event",
build_payload(&ctx), QOS_1);
} else if (next == STATE_ACTUATE) {
gpio_set(RELAY_PIN, 1);
}
vTaskDelay(pdMS_TO_TICKS(SAMPLE_INTERVAL_MS));
}
Scope of this site
- Boards covered: ESP32 / ESP32-S3, STM32H7, STM32MP1, RP2040/RP2350, nRF52840, and generic Cortex-M targets.
- Runtimes: FreeRTOS, Zephyr, bare-metal.
- ML runtimes: TensorFlow Lite Micro (TFLM), microTVM, Edge Impulse EON compiler, STM32Cube.AI.
- Protocols: MQTT 3.1.1 / 5.0, CoAP, HTTP/HTTPS.
FAQ
Q: Do you need an LLM on the MCU? No. An MCU agent uses local sensor logic and compact ML models on-device. LLM-level reasoning is delegated to edge or cloud endpoints.
Q: Is this the same as TinyML? No. TinyML is ML inference on tiny devices. An MCU agent is an architectural pattern that may include TinyML as one component among several.
Q: What language is agent firmware written in? C is the dominant choice. C++ is common (Arduino, TFLM). Rust and Zig are emerging. Generated code targets C in most toolchains.
Q: Who publishes this site? ForestHub.ai. See the About page for the full editorial charter.