MCU Agent — Developer Portal for Embedded Agents

// last reviewed 2026-05-22 · Marcus Rüb

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

SectionWhat it covers
What is an MCU Agent?Precise definition. What runs on-device, what runs off.
ArchitectureEvent loop, state machine, sensor I/O, delegation patterns.
ESP32 Agent GuideESP32-S3 vector ISA, ESP-IDF setup, MQTT client, C snippets.
STM32 Agent GuideSTM32H7/STM32MP1, STM32Cube.AI, CMSIS-NN, LwIP+MQTT.
MQTT for MCU AgentsTopic design, QoS, broker selection, payload format.
Generated C CodeYAML/JSON spec → generated firmware modules.
TinyML vs MCU AgentsNot the same thing. Clear comparison.
Sensor PatternsAnomaly detect, threshold, fusion, local actuate.
Cloud DelegationWhen and how the MCU calls home for reasoning.
Tools ReviewEdge Impulse, STM32Cube.AI, ESP-IDF, Zephyr, Arduino IoT Cloud, ForestHub.
ExamplesSix working example projects with hardware lists.
GlossaryMCU, RTOS, CMSIS-NN, sensor fusion, and 15+ terms.
AboutEditorial 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

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.