Edge Agent Workflow Examples: Sensor-to-Action Patterns

Last reviewed: 2026-06-04 · Marcus Rüb

These are worked sensor-to-action patterns for the open-source edge-agents runtime — each is a small graph of nodes connected by typed edges that reads hardware, reasons with an agent step, and acts, entirely on-device. They build on the quickstart; if you have not run a workflow yet, start there. For the runtime itself, see Open-Source Edge Agent Runtime.

Recall the five edge types: control, tool, agentTask, agentChoice, agentDelegate. GPIO, ADC, DAC, PWM and UART are first-class nodes, and MQTT is a first-class transport. The patterns below combine those primitives.

Pattern 1: GPIO Read → agentChoice → PWM Write

A closed local control loop with an agent in the middle making the branching decision.

[GPIO read: sensor]
        │  control

[agentChoice: above threshold?]
   │ control          │ control
   ▼                  ▼
[PWM write: ramp up]  [PWM write: hold]

Because GPIO and PWM are native nodes and the decision runs on-device, this loop needs no network at all — a good fit for the air-gapped scenarios in Offline AI Agents.

Pattern 2: UART Sensor → agentTask (local LLM) → MQTT Publish

A sense-reason-report loop using a local model for the reasoning step.

[UART read: sensor frame]
        │  control

[agentTask: interpret reading with local LLM]
        │  control

[MQTT publish: advisory topic]

Local or cloud LLM is a configuration choice here — point the agentTask at http://localhost:8090 for offline operation, or at a cloud endpoint when connectivity is available. Model sizing per board is covered in Local LLMs for Edge Devices.

Pattern 3: Predictive-Maintenance Advisory

The agentic version of the AI service technician loop documented in Edge Agents for Machine Service, expressed as a workflow.

[MQTT sub: drive fault code]
        │  control

[tool: look up fault catalog]
        │  tool

[agentTask: explain + rank likely causes (local LLM)]
        │  control

[agentDelegate: escalate if safety-critical]
        │  control

[MQTT publish: technician advisory]

This is the same machine-service pattern, now as a buildable my.workflow.json you can validate with fh-workflow check-schema and fh-workflow validate (see the quickstart).

Build These Yourself

Each pattern is a my.workflow.json you can open in the visual builder, validate, and deploy to a Pi, Jetson, NUC, STM32MP25 or ctrlX CORE (see the hardware matrix). The full source is on GitHub. edge-agents is built by ForestHub.ai; for help taking these patterns to production, book an architecture call.


FAQ

Are these full, runnable workflow files? They are annotated patterns showing the node/edge structure. Recreate them in the visual builder (fh-workflow open) and validate with check-schema / validate before deploying. See the quickstart.

Do these run offline? Yes — with a local LLM (quickstart step 5) every pattern runs on-device with no cloud round-trip. The agentTask steps can target a cloud model instead if you prefer.

What is the difference between agentTask, agentChoice and agentDelegate? agentTask hands a unit of work to an agent step, agentChoice lets the agent branch between alternatives, and agentDelegate hands a sub-goal to another agent. Pattern 1 uses agentChoice, Pattern 3 uses both agentTask and agentDelegate.