1. Executive summary
An agentic embedded system gives an AI agent a defined set of operations it can perform through the equipment’s firmware interface. The agent uses the results to decide how to pursue the operator’s objective. This paper examines how to integrate that capability into a product while the firmware retains control of the hardware and enforces its operating limits. The host application can run the model locally or call a remote inference service.
Adaptive tool selection is useful in monitoring, testing and diagnosis when a device’s response changes which operation is worth performing next. Where the sequence and its exceptions are well understood, a fixed procedure is simpler to verify and maintain. The engineering case for an agent therefore rests on a measurable improvement over that procedure, such as reaching a supported diagnosis with fewer unnecessary tests. Verification must also establish that the host handles incomplete or conflicting results correctly and that the firmware continues to meet its control deadlines when the agent is delayed or unavailable.
Publication details and citation
EEIO-INS-012 · Revision 1.1 · 2026
Published by EmbeddedExpertIO
Editor Israel Gbati
Suggested citation. EmbeddedExpertIO. Agentic Embedded Systems: Architecture and Applications. EmbeddedExpertIO Engineering Insights, EEIO-INS-012, version 1.1, 2026.
2. How an AI agent interacts with embedded firmware
Two interfaces connect the agent to the equipment. The host presents each available operation as a tool the agent can request. On the device side, the host uses the command interface provided by the firmware. A product that already makes measurements available to service software can therefore use the same firmware command to answer an agent’s enquiry.
We use temperature monitoring as a running example of how an agent works with measurements from an embedded device. When an operator asks for the current system temperature, the agent requests the latest sample from the relevant sensor channel. The host checks that the channel is valid and that the caller has permission to read it before issuing the firmware command.
To judge whether the reading is recent enough, the host needs an acquisition time it can relate to its own clock, or a reliable measure of sample age that accounts for delivery time. The agent can then report a valid, sufficiently recent reading or, if the device indicates a sensor fault, inspect the channel status.
Configuration changes use the same command path, although permission to inspect a setting does not grant permission to change it.
3. Designing the device interface
A device operation needs a definition precise enough for a firmware engineer to implement and a host engineer to test. A request to “read temperature”, for example, has two common interpretations. The device can return the latest sample already in memory, or it can start a new conversion. Both return a temperature in degrees Celsius. Only the second guarantees that acquisition began after the request arrived. Naming these operations read latest sample and acquire new sample gives the agent a sound basis for choosing between them.
An operation’s contract must also describe any effect the call has on the device. An engineer retrieving fault status, for example, needs to know whether reading a latched flag clears it. Table 1 sets out what the caller can expect from each operation, including what the firmware returns when the request cannot be completed.
Table 1. Device operation contracts for a sensor reading, a status enquiry and a configuration change
| Operation | Inputs and conditions | Result and failure behaviour |
|---|---|---|
| Read latest temperature sample | Read access to the selected sensor channel. The request does not trigger a conversion. | Return the temperature in °C, its acquisition time on a specified clock, and its validity. If the channel has yet to produce a sample, report that explicitly. |
| Read device status | Read access to the device. Reading status leaves latched faults intact. | Return the operating mode and recorded fault flags. If the device does not reply, report that its status is unknown. An empty fault list is meaningful only after a successful enquiry. |
| Set sampling interval | Configuration permission. The interval is expressed in milliseconds and must be one the device supports. The current operating mode must permit the change. | Report completion when the new interval is active and return the applied value. If the firmware rejects the request, identify the reason. If contact is lost before confirmation, report the outcome as unknown. |
The host can check permissions and reject malformed arguments before sending a command. The firmware must still check the requested value against its supported settings and enforce any restriction tied to the device’s operating mode. A status enquiry can show that configuration is permitted, yet the device may enter another mode before the command arrives. The decisive check therefore belongs in the firmware at the point where it applies the change.
The contract also governs compatibility between firmware revisions. A sampling interval encoded as an integer can retain the same message format even when its unit changes from milliseconds to seconds. The host must establish which unit the connected firmware accepts before it can issue the command correctly.
4. Tool selection, context and multistep execution
When we know which checks a task requires and how to interpret each result, we can write the procedure directly into the host software, including any branches. An agent is useful when the operator sets the objective but the appropriate sequence of enquiries emerges from the evidence [1]. The host defines which operations the agent may use. Within those limits, the agent chooses what to inspect next and stops once it can answer the operator’s question.
A gap in a temperature record illustrates why the objective matters. If the question is whether the device is acquiring samples now, a counter that increments on acquisition can answer it. An advance between two reads during the same run establishes that the device acquired at least one sample in that interval. An operator investigating the earlier gap needs evidence from the period in question. If the device holds timestamped samples that are missing from the central record, the next useful enquiry is whether the collector received them. Reading the current temperature again would add nothing to that investigation.
The host must preserve enough context for the agent to make that distinction. A stored result remains evidence of what the device reported when the reading was taken. A note from the operator can explain why a setting was changed. When a device returns an unfamiliar fault code, retrieval-augmented generation (RAG) [2] can supply the relevant passage from the manual for the installed firmware revision. In each case, the source and its date or revision determine which conclusions we can draw.
An engineering team can give an agent access to its existing test runner through a direct function call. The host invokes the runner and returns its result, using the same test procedure the team already maintains. If several applications need to discover and invoke that capability, a Model Context Protocol (MCP) server gives compatible clients a common interface [3]. Orchestration addresses a separate requirement. When an investigation must pause for an engineer’s input, an orchestration framework can retain the test result and resume the enquiry from that point.
If neither the device nor the collector retained records from the missing period, the agent can still establish whether the device acquired a new sample during the check. The cause of the earlier gap remains unresolved.
5. Applications in monitoring, testing and equipment diagnosis
The test fixture reports a start-up failure when it does not observe the controller’s ready signal by the deadline. The engineer needs to know whether the controller reached its ready state late or the fixture detected it late. An agent with access to both records can investigate that distinction.
The agent compares the failed run with the last passing run under the same test conditions, using elapsed time from reset as the common reference. If the first additional delay appears during sensor initialisation, the agent checks the sensor events. Timestamps for the start and end of each retry let it calculate time spent retrying. With only the initialisation milestones, it can report the extra time in that phase. If the controller reached its ready state on schedule, the investigation moves to the test fixture that was waiting for the ready signal. Comparing the fixture’s record with the controller’s requires a common time reference or a known relationship between their clocks. The engineer receives the finding with the entries from both runs that support it and can go directly to the part of the system that warrants attention.
In fleet monitoring, a fixed rule can flag equipment that restarts repeatedly. An agent can then identify the units whose first recorded series of restarts followed a firmware update, by comparing restart histories with each unit’s installation record. A comparable series on the earlier release establishes that the symptom was already present on that unit. The service engineer can use that finding to decide where to start diagnosis.
6. Command execution, verification and recovery
If the expected result has not arrived by the deadline, the host cannot tell from the timeout alone whether the device executed the command. The request may never have reached the device. The device may still be working, even after acknowledging receipt, or the completion reply may have been lost [4].
For the sampling interval in Table 1, the immediate question is which setting the device is using. An acknowledgement of receipt leaves that question open. Once communication resumes, the host can read the active interval. A match confirms that the requested setting is in effect at the time of the read. If the engineer also needs to establish which command applied it, an execution record must link the change to that request.
A command to start calibration needs different treatment because sending it twice can initiate a second cycle. The host retains the original request identifier so it can check the cycle’s status. It can replay the same arguments under that identifier only for as long as the firmware guarantees duplicate suppression [4]. If a restart has erased the record, the host must establish the equipment state and obtain authority for any fresh cycle. Cancellation can also race with completion. Until the device confirms how the cycle ended, the agent reports the outcome as unknown.
7. Operating authority, security and real-time protection
A service engineer can delegate the investigation of a stopped carriage under a single read-only permission. The agent can inspect the fault history and read the drive status without seeking approval for each enquiry. A test move requires separate authority because it changes the physical state of the equipment. Where operator approval is required, it applies to the identified carriage, destination and speed limit. The host checks the proposed command against that approval before issuing it.
Credentials enforce the boundary between diagnostic access and authority to issue a control command. A diagnostic credential should permit only the reads the task requires [5] and should be independently revocable. A maintenance note recommending a test move can inform the investigation. Acting on that recommendation requires an authorised control operation.
Once motion begins, the local controller enforces the travel limits even if contact with the host is lost. Published guidance for mobile equipment calculates stopping distance from response travel and braking distance, then adds allowances when sizing the protective field [6]. For the carriage, clearance is measured from the last valid position reading. The stopping threshold must account for position uncertainty and use response and braking distances verified for the permitted speed, load and braking conditions. If fresh feedback ceases, the controller must initiate the protective response while sufficient clearance remains. Waiting for the agent would consume part of that clearance.
8. Deployment across devices, gateways and remote hosts
The functions an operator needs when the site loses its external connection help determine where the firmware, agent and model should run. The device can continue running its control firmware while a gateway hosts the agent software and a remote server runs the model. In that arrangement, a gateway configured to buffer records can retain them during an outage, within its storage and retention limits [7]. An enquiry that needs the remote model must wait for the connection to return.
If the investigation requires model inference during a site outage, the model and the tools and records it needs must remain reachable on site. A gateway can provide those resources for several controllers and keep detailed traces on site. Running the model on the device itself makes sense when the equipment must support diagnosis without a gateway. Before choosing that option, we need to measure peak memory use and response time on the target hardware while its normal firmware workload is running.
A remote host can investigate faults across several installations using records that each site is authorised to share. Where detailed traces must remain on site, the gateway can retain them and send the event summaries needed for fleet analysis. During an outage, the remote host can continue working with the records it already holds, provided it identifies when each unit last reported.
9. Evaluation and release evidence
The benchmark for an agent is the procedure an engineer uses today. Before release, we select representative tasks and define what counts as a correct outcome for each. We give the agent and the existing manual or scripted procedure the same starting conditions, then compare how often each completes the task correctly and how much engineer time each requires. That comparison includes time spent checking or correcting the agent’s findings.
For a diagnostic task, the test record should show which conclusions the evidence supports. We must include cases where a missing trace leaves the cause unresolved and repeat trials from the same initial state to assess consistency. For a configuration change, the test must establish the resulting device state independently of the agent’s report [8]. In a separate trial, the team repeats the request with read-only access and checks the command trace for any unauthorised write. An executed write under those conditions is a release blocker regardless of the overall completion rate.
On the target hardware, exercise the agent’s permitted workload while the firmware runs its normal control tasks. Measure control timing under peak permitted traffic and with the agent connection delayed or lost. Each control task must meet its specified deadline under the tested conditions.
The release record should link each result to the tested versions of the model, host software, tool definitions and firmware, together with the prompts and permission policies in force. This lets the team rerun the affected cases when a component changes and approve capabilities individually. An agent that reliably diagnoses faults and reduces the engineer’s workload can enter service with read-only access while configuration tools remain under evaluation.
Training for engineering teams
EmbeddedExpertIO provides professional training in embedded systems and firmware development. If you are planning training for your team, we can help you choose courses that suit your engineers’ experience and the work ahead. Teams can enrol in a selected group of courses or arrange access to the full course library.
Discuss your team’s training requirements · support@embeddedexpert.io
10. References
[1] Anthropic. Building effective agents. 19 December 2024.
[2] Lewis, P., et al. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems, vol. 33, 2020.
[3] Model Context Protocol. Tools. MCP specification, revision of 25 November 2025.
[4] Featonby, M. Making retries safe with idempotent APIs. Amazon Builders’ Library.
[5] OWASP Gen AI Security Project. LLM06:2025 Excessive Agency. 2025 edition.
[6] SICK. microScan3 Core I/O: Operating Instructions. Document 8016346/1WGY, 23 July 2026, §5.3.9, “Mobile hazardous area protection”.
[7] Microsoft. Operate Azure IoT Edge devices offline. Microsoft Learn, updated 2 March 2026.
[8] Anthropic. Demystifying evals for AI agents. 9 January 2026.