
Designing Action Preconditions
An AI agent that can request actions on industrial equipment needs a clear answer to one question before each request reaches a machine: is this action allowed right now, on this target, in this state? Action preconditions are the written, testable conditions that answer it. This guide explains what preconditions are, which kinds matter for physical equipment, where each check belongs in the control stack, and what preconditions cannot do.
What an action precondition is
An action precondition is a condition that must be true, and verified against current information, before a specific action is sent to equipment. A precondition is different from a goal, which describes what the plant wants, and different from an operating limit, which bounds values while equipment runs. Preconditions gate the start of an action. Limits and stop conditions govern what happens during and after it.
Two terms are used throughout this guide. A supervisory agent is software that proposes commands or setpoint changes to existing controllers rather than running the control loop itself. A bounded action vocabulary is a fixed list of the actions the agent may request, each with defined parameters and a named target. Preconditions are written per action in that list.
Why preconditions matter on physical equipment
A wrong entry in an office system can usually be corrected. A wrong command to a pump, fan or conveyor produces a physical effect that may not be reversible. An agent can also produce a proposal that looks reasonable but is invalid: the wrong asset, a reading that is several minutes old, or a step taken out of sequence. Preconditions turn those errors into rejected proposals instead of physical events.
They also give reviewers something concrete. A precondition list can be read, tested and approved by a technical lead and the operations team before any trial begins.
Common categories of preconditions
The table below groups the conditions most often needed for equipment actions. Which ones apply depends on the action, the equipment and the plant.
| Category | Question it answers | Example check |
|---|---|---|
| Target identity | Is this the equipment the request names? | The asset tag in the request matches the asset registered to the gateway endpoint. |
| Equipment state | Is the equipment in a state where the action is valid? | The conveyor reports stopped, the guard is closed and no fault is active. |
| Process state | Does the surrounding process allow the action? | The downstream line is accepting product and the tank level is inside its permitted range. |
| Information freshness | Are the readings behind the decision recent enough? | Sensor values are newer than a maximum age set by plant engineers. |
| Authorization | Has the required person or role approved this action? | An approval is recorded for this action and target and has not expired. |
| Sequence | Have earlier required steps happened and been confirmed? | A pre-start inspection is complete and the previous stop was confirmed by feedback. |
| Operating limits | Will the requested value stay inside permitted limits? | The setpoint falls inside the allowed range for the current operating mode. |
Authorization appears here as a condition to be checked. How approvals are authenticated and protected is a security question handled by a separate program, linked at the end of this guide.
Where to enforce the checks
The same precondition can be checked in several places, and each place has different strengths. The usual answer is more than one layer.
| Location | What it can check | Strength | Weakness |
|---|---|---|---|
| Inside the agent (planning logic or instructions) | Anything the agent can reason about | Flexible. Poor proposals are rejected early. | It is the same component that may be wrong, so it cannot be the only check. |
| Restricted gateway between agent and equipment | Identity, action vocabulary, parameters, freshness, approvals | A single enforcement point that does not depend on the agent. Easy to log and audit. | It sees only the data it receives. It adds some delay. |
| Existing controller (interlocks and permissives) | Local machine state at the controller scan rate | Closest to the equipment. Still works if upstream software fails. | Changes need controls engineering. Limited view of the wider process. |
| Independent protection layer (safety function) | Defined hazardous conditions | Designed for independence and a stated integrity level. | Narrow purpose. It is not a tool for scheduling or efficiency. |
The agent should check its own proposals to avoid wasted requests. The gateway and the controller should enforce, because neither depends on the agent's reasoning being correct. When the gateway rejects a request, it should return the reason in a form the agent can use to replan or to ask a person.
Writing a precondition list
- Start from the action vocabulary and list every action the agent may request.
- For each action, name the target, the physical effect and what could go wrong.
- Write each condition as a testable statement with a named data source and a maximum data age.
- Decide what happens when a condition fails: reject, wait and recheck, or ask a person.
- Decide what happens when data is missing or two sources disagree. A safe default is to treat the condition as not satisfied.
- Review the list with operations and controls staff, then test each condition by injecting faults, such as a stale reading or a wrong asset tag.
Handling stale, missing and conflicting data
A precondition is only as reliable as the data it checks. Readings go stale, sensors fail, and two indications of the same quantity can disagree. Common approaches include setting a maximum age for each input, requiring two independent indications before higher-consequence actions, and treating unknown values as unmet conditions.
Each approach has a cost. Stricter rules reject more requests and can slow valid work. Testing should therefore count both unsafe proposals that were blocked and valid actions that were blocked by mistake.
Illustrative example
Hypothetical scenario for explanation only. It does not describe an Aperture installation or result.
A supervisory agent at a packaging line proposes restarting a conveyor after a jam alarm. The gateway checks five conditions before forwarding the request:
- Target identity: the request names the conveyor, and the gateway confirms that asset is registered to the endpoint.
- Equipment state: the controller reports the conveyor stopped and the jam sensor clear.
- Freshness: the jam sensor reading is newer than the maximum age set by plant engineers.
- Authorization: a line supervisor's approval for this restart is recorded and has not expired.
- Sequence: the guard door has been reported closed since the jam alarm.
If all five hold, the gateway forwards the request to the controller. If the jam sensor reading is too old, the gateway rejects the request and returns the reason. The agent can then request a fresh reading or ask a person to look at the machine.
Passing the checks does not complete the task. An acknowledgment from the controller shows only that the command was received. A separate check must confirm that the belt is moving. That distinction is covered in Command Acknowledgment vs Physical Outcome.
Limits of preconditions
- Preconditions check only what is measured. A condition no sensor reports, such as a person standing in an unmonitored area, is not covered.
- Protection of people requires safety functions designed under functional safety standards. A gateway rule is not a substitute.
- A list can be incomplete or fall out of date when equipment, software or procedures change.
- A list that is too strict blocks useful actions. A list that is too loose gives false confidence.
- Preconditions do not verify outcomes. Feedback after the action is still required.
- Citing a standard in this guide does not establish that any Aperture system is certified or conforms to it.
How Aperture studies this question
Status: proposed. The program's proposed starting experiment uses a restricted gateway to control a small fan, pump or conveyor. Test conditions include ambiguous requests, delayed feedback and actuator failure. A rules-based controller is compared with the agent, and independent controls enforce limits and stop conditions. Precondition lists would be written and reviewed before trials begin. Failed runs would be reported alongside successful ones, and simulated trials would be separated from physical ones. No results are available yet.
Related Resources
Sources
- National Institute of Standards and Technology. NIST Special Publication 800-82 Revision 3, Guide to Operational Technology (OT) Security. 2023.
- International Electrotechnical Commission. IEC 61511-1, Functional safety: Safety instrumented systems for the process industry sector.
- International Electrotechnical Commission. IEC 61508, Functional safety of electrical, electronic and programmable electronic safety-related systems.
- Rawlings, J. B., Mayne, D. Q., and Diehl, M. Model Predictive Control: Theory, Computation, and Design, 2nd edition. Nob Hill Publishing, 2017.
Discuss Your Action List
If you are defining which actions an AI agent may request on your equipment, we would like to hear about the equipment, the actions involved and the conditions you check today. Describe the problem and the outcome you want to evaluate.
Discuss a Research Project