Manuscript Offprint
arXiv:2611.09364SafeOrchestrate: Runtime Checked Intent-Driven Orchestration for Cyber-Physical Systems
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Accepted for publication at the proceedings of the 32nd International Conference on Cooperative Information Systems (CoopIS 2026).
SafeOrchestrate: Runtime-Checked Intent-Driven Orchestration for Cyber-Physical Systems
Muhammad Ashfaq¹✉, Ahmed R. Sadik²✉, Ewan Warburton³✉, Pyry Kotilainen¹✉, Niko Mäkitalo¹✉, and Tommi Mikkonen¹✉
¹ Faculty of IT, University of Jyväskylä, Jyväskylä, 40100, Finland {muhammad.m.ashfaq,pyry.kotilainen,niko.k.makitalo,tommi.j.mikkonen}@jyu.fi
² Honda Research Institute Europe, Offenbach, 63073, Germany ahmed.sadik@honda-ri.de
³ Independent Researcher e.warburton.ew@gmail.com
Abstract. Modern cyber-physical systems (CPS) increasingly integrate heterogeneous sensors, actuators, controllers, and services into compositions formed at runtime. Natural-language (NL) orchestration of such systems is attractive, but unconstrained large language model (LLM) tool use is risky because actions must respect device capabilities, runtime state, and safety constraints. We present SafeOrchestrate, a reference architecture for runtime-checked, intent-driven CPS orchestration. Given an NL intent, SafeOrchestrate decomposes it into atomic goals, generates a runtime-checkable specification for each goal, grounds these specifications in discovered device affordances, and gates candidate actions against the runtime state. For single-action consequences, it also checks each action against the complete grounded specification and any safety constraints before execution. In our Web of Things (WoT) instantiation, SafeOrchestrate produces Linear Temporal Logic (LTL)-style specifications, grounds them in Thing Description (TD) affordances exposed through the Model Context Protocol (MCP), and enforces satisfiability modulo theories (SMT)-backed guardrails on single-action consequences. We evaluate this instantiation against a direct LLM-to-MCP baseline on simulated smart home, greenhouse, and industrial automation tasks. Cross-rule and safety-constraint checks are illustrated separately through a worked example. SafeOrchestrate achieves 100% required-action accuracy on every task and 100% MCP Execution Similarity (MCP-ES) on all but one, where MCP-ES is 92%. By contrast, the baseline degrades on multi-device, event-triggered, and ordered tasks, with MCP-ES falling to 13%. On these tasks, the results suggest that combining LLM-based specification generation with role-aware grounding and runtime constraint checking improves reliability for open CPS orchestration without enriched TD annotations or planning-domain expertise.
Keywords: Internet of Things · Web of Things · Model Context Protocol · Large Language Models
Realizing runtime composition is difficult [1] because CSs are highly heterogeneous, varying in communication protocols, data schemas, interaction patterns, and operational assumptions. To manage this heterogeneity, domains rely on standardized, machine-interpretable capability descriptions. For example, OpenAPI for web-based and software-intensive SoS [15], OPC UA and AutomationML for industrial automation [5,4], and URDF for robotics [16].
The Web of Things (WoT) is one such standard, targeting cross-domain interoperability for connected devices [22]. In WoT, Thing Descriptions (TDs) use JSON-LD metadata to describe physical or virtual Things and expose interaction affordances as properties, actions, and events; protocol bindings abstract the underlying communication mechanisms (e.g., HTTP, MQTT, or CoAP) [23]. However, TDs mainly specify what each Thing can sense or do; they do not define how multiple Things should cooperate, how a natural-language (NL) intent should be operationalized, or whether a proposed action is safe in the current state.
Prior work addresses this gap along three lines. WoT mashup generation composes Thing affordances into higher-level behavior, typically as reusable design-time artifacts [6,8,7]. Large language model (LLM)-assisted mashup synthesis turns NL intent into planning artifacts or executable flows [18,24,19]. Verified LLM tool execution gates individual tool calls against preexisting contracts [10]. However, none provides an orchestration layer that (i) derives coordination logic from NL (instead of prompting an LLM to emit workflows or to invoke device interfaces in an unconstrained manner), (ii) binds that logic to affordances discovered at runtime, and (iii) enforces safety before any physical action.
In this paper, we present SafeOrchestrate, a reference architecture for runtime-checked, intent-driven CPS orchestration. We define an intent as an NL statement of the desired system behavior. SafeOrchestrate converts intent into a specification grounded in executable affordances, then checks candidate actions against the current runtime state before execution. Our WoT instantiation realizes this architecture via Linear Temporal Logic (LTL)-style specification generation, TD affordances exposed as Model Context Protocol (MCP) tools and resources, and satisfiability modulo theories (SMT)-backed guardrails.
We investigate the following research question (RQ): Compared with direct LLM-to-MCP tool use, how does grounding NL-derived specifications in MCP-exposed WoT affordances and verifying candidate actions against the runtime state before execution affect the correctness of LLM-driven CPS orchestration? We make the following contributions:
-
We propose SafeOrchestrate, a reference architecture for LLM-driven CPS orchestration that combines specification generation, role-aware grounding, and SMT-backed runtime guardrails over MCP-exposed affordances.
-
We introduce MCP Execution Similarity (MCP-ES), a metric that measures alignment between expected and observed MCP tool-call trajectories and penalizes missing, extra, substituted, and misordered calls.
-
We evaluate a WoT/MCP instantiation of SafeOrchestrate on smart home, greenhouse, and industrial automation tasks, showing reliable execution on event-triggered, ordered, and multi-device tasks where a direct LLM-to-MCP baseline degrades.
Section 2 covers background and related work; Section 3 presents the architecture, a worked example, and the WoT/MCP prototype; Section 4 reports the evaluation; and Section 5 concludes with limitations and future work. Our implementation, evaluation artifacts, and supplementary appendix are publicly available in the accompanying repository .
2 Background and Related Work
In WoT, a mashup is an application-level composition of multiple Thing affordances. For example, reading a sensor property and invoking one or more actuator actions in response. WoT mashup research has long relied on intermediate artifacts to represent and validate such compositions. System Descriptions (SDs) encapsulate sequence-diagram-based atomic mashups as reusable affordances [6], while DyST mines device interactions to reconstruct sequence diagrams and SDs for validation [7]. A-MaGe reduces manual effort by generating candidate atomic mashups from TDs and user options [8]. These approaches enable reuse, generation, and validation, but remain tied to sequence diagrams, SDs, templates, rules, or user selection rather than guarded execution over live affordances.
More recent systems use LLMs to reduce the manual effort required to create Internet of Things (IoT) and WoT workflows from NL intent. LLM-MaGe translates user intent and TDs into Planning Domain Definition Language (PDDL) artifacts [18], but its TD-to-planning conversion depends on enriched annotations (e.g., affects and isAffectedBy), limiting compatibility with standard TDs. IoT Whisperer generates Node-RED workflows from NL descriptions and TDs [24]. AmI HMAS maps Home Assistant deployments into TD-based hypermedia environments and uses LLM-driven agent roles to interpret requests,
https://github.com/ashfaq92/safeOrchestrate discover affordances, plan invocations, and reuse prior interactions [19]. Overall, these approaches produce planning, workflow, or hypermedia-agent representations rather than checking grounded runtime actions against MCP-exposed affordances.
MCP shifts execution from offline artifacts to live tools and resources exposed via discoverable interfaces [12]. ToolGate [10] checks Hoare-style preconditions and postconditions over symbolic state for general LLM tool use. However, contract-gated execution assumes suitable tool contracts are available—manually specified or extracted from reliable documentation—and focuses on per-tool correctness. Agent architectures for large tool libraries, such as the tulip agent [14], decompose an NL request and retrieve candidate tools through semantic search, but target context-window and tool-selection scalability rather than grounding in live affordances or checking actions against the runtime state.
SafeOrchestrate differs from these approaches in how it derives, binds, and checks coordination logic. Unlike template-, rule-, or selection-driven mashups, it derives coordination logic from NL rather than design-time artifacts. Unlike planning- and workflow-generation systems, it grounds that logic in affordances discovered at runtime over MCP without requiring changes to the TD. Unlike per-tool contract verification, it checks candidate actions against the grounded current state at execution time rather than pre-authored contracts.
3 Proposed Method
3.1 Architectural Overview
SafeOrchestrate takes device capability specifications and an NL intent as input. Fig. 1 summarizes the reference architecture:
is the MCP Bridge (device abstraction layer); is the Atomic Goal Decomposer (compound intent atomic goals); is the Formula Generator (NL runtime-checkable specification); is the Grounding Mapper (symbolic executable mapping); is the Temporal Resolver (specification reactive rules); is the Guardrail Verifier (constraint enforcement); and is the Runtime Orchestrator (execution coordination). The pipeline runs sequentially for each atomic goal. If any stage fails to produce valid input for the next, processing for that goal halts and performs no action. Section 3.10 and the supplementary appendix detail the checks performed at each stage.
3.2 MCP Bridge ()
transforms device capability descriptions into MCP-compatible runtime affordances. Actions, properties, and events become executable tools and observable resources. At time , exposes the available tools and resources . These affordances support grounding, guardrail

Fig. 1: The SafeOrchestrate reference architecture. Thing Descriptions are registered in a Thing Description Directory (TDD) and exposed through the MCP Bridge (). Given an NL intent , decomposes it into atomic goals; for each goal, generates a specification, grounds it in affordances discovered via , and produces reactive rules. Before invokes an action, the runtime loop evaluates the corresponding precondition against the current state and applies to actions from single-action consequences.
checking, and execution while hiding device protocols from downstream components. In our WoT instantiation, TDs are converted into MCP tools and resources; in other CPS contexts, device APIs, URDF robot descriptions, or similar specifications undergo analogous transformations.
3.3 Atomic Goal Decomposer ()
A compound NL intent often bundles multiple independent behaviors. decomposes into atomic goals, . Each atomic goal is an indivisible unit of behavior (an atomic mashup candidate in the WoT sense, hence the subscript [6]) that pairs a trigger condition (a precondition) with the response it should elicit (one or more actions). The trigger is an observable condition (e.g., a property read, sensor value, event, or status check) and may combine multiple readings, for example, humidity . The response specifies one or more executable effects, such as action invocations or property writes. Although a response typically specifies a single action, it may include multiple actions (e.g., “turn on all ZigBee lamps.”). We refer to a response with one action as a single-action consequent and one with multiple actions as a multi-action consequent; and handle the two differently (Sections 3.6 and 3.7). Separating trigger and response prevents imperative, command-like symbols from being misread as state predicates. A single intent may yield multiple precondition-action pairs (e.g., from a biconditional or coupled rules over independent conditions). SafeOrchestrate does not support proportional control, continuous monitoring, or rule sets whose later conditions depend on the effects of earlier actions. Decomposition is purely lexical: splits at sentence boundaries and trigger cues while preserving textual order, so atomic goals execute in order of mention; the supplementary appendix details the rules.
3.4 Formula Generator ()
converts each atomic goal into a runtime-checkable specification. We write this as , where is an LTL-style formula over symbolic propositions.
We use an LTL-style syntax because it compactly expresses implications, conjunctions, and reactive intent, and because existing NL-to-LTL tools can generate such formulas. is insensitive to trigger placement: “turn on the lamp if someone is present” and “if someone is present, turn on the lamp” produce the same .
3.5 Grounding Mapper ()
Let Prop() denote the symbolic propositions in . Each inherits a role from the fragment of that generated it. resolves propositions to MCP affordances in two stages: role-aware matching followed by numeric enrichment.
Stage 1: Role-Aware Matching. Stage 1 pairs each with an affordance using LLM-based semantic matching. The matcher considers both the proposition's meaning (typically conveyed by an NL-derived label such as lamp_is_on) and its role. Preconditions are grounded to observable affordances (resources or read-only tools), whereas actions are grounded to executable tools; thus, . The mapping usually returns a single affordance; when denotes a device set, it may return multiple actuator tools.
Stage 2: Numeric Enrichment. For a proposition whose NL fragment contains a numeric literal and a comparison cue (e.g., “temperature exceeds 26”), Stage 2 augments the grounded affordance with the corresponding operator and threshold, proposition tool_id comparison, where denotes operator attachment. For example, “temperature exceeds 26” maps to get_temperature > 26; the supplementary appendix lists the comparison cues recognized by the prototype.
Grounding the Whole Formula. After Stages 1 and 2, grounds by applying to every proposition, yielding . For a single proposition, is its grounded expression: an affordance ID, a numeric comparison over one affordance, or a conjunction of affordances when denotes a device set. On compound formulas, recurses without altering structure:
for binary and unary . Grounding does not assign semantics to temporal operators; removes them (Section 3.6). The full grounding rules are given in the supplementary appendix.
3.6 Temporal Resolver ()
transforms the grounded specification into reactive precondition-action rules evaluated on the current runtime state :
drops temporal operators from and extracts pairs from top-level implications or biconditionals: yields , and yields and . The operands and may include , and , which pass through unchanged; if has no top-level implication or biconditional, yields no pair.
3.7 Guardrail Verifier ()
Before executing an action from a single-action consequent, checks the corresponding MCP tool in two phases. Phase 1 evaluates its precondition against the current state . Phase 2 checks whether executing the action is consistent with the full grounded specification under .
Phase 1: Precondition Evaluation. For each , computes . If false, is rejected without SMT checking.
Phase 2: SMT-Based Consistency Check. For a candidate whose precondition holds, tests it against . Let encode the observed runtime values as Boolean or numeric assignments. Then is the satisfiability of
If satisfiable, execution is permitted; otherwise, the action is blocked. Because the query ranges over all of (not just the rule that enabled ), it can block an action that satisfies its own precondition but conflicts with another rule under (e.g., the reverse direction of a biconditional). For an isolated implication, Phase 2 collapses to Phase 1; with interacting rules, it is strictly stronger.
Optional deployment safety constraints (e.g., an emergency-stop rule) are conjoined into the same query: . Candidates must therefore also be consistent with . Phase 2 checks a single action against one state snapshot, so it does not soundly apply to multi-action consequences, whose actions execute sequentially and change state between steps; such rules are admitted on their satisfied precondition alone (; Section 3.8).
3.8 Runtime Orchestrator
is the reactive component that turns the resolved rules into MCP invocations. It processes each once, in textual order, and re-evaluates a goal only when it is invoked again (e.g., on the next event-triggered run). Each pass over one goal has three steps (Fig. 2).
State sampling. reads the observable affordances referenced by —properties, sensors, and event resources—into a single snapshot that is reused for every check in the pass (Section 4.5).
Candidate selection. For each , evaluates ; satisfied preconditions enable the corresponding consequences .
Checking and execution. Enabled actions from single-action consequences execute only if the guardrail admits them (Section 3.7). Enabled multi-action consequences are admitted based on their satisfied precondition alone. Accordingly, maps to an authorized set :
Here, act is the consequent's set of actions and is its size. If , takes no action for that goal.
3.9 Worked Example
We illustrate the architecture with an industrial conveyor scenario. Let g be “If the robot arm has an item in its hand, the belt should move forward.” produces:
then grounds the propositions by role. It maps item-in-hand-robotArm to get_holdingObject and move-forward-belt to startBeltForward, yielding . extracts the rule .
Cases 1 & 2: Precondition gating. If , the precondition holds, the verifier admits the action, and . If it is false, no action is triggered and .
Case 3: Cross-rule consistency. Suppose the same intent also yields get_obstacleDetected → ¬startBeltForward, so contains two implications. If both and are true, then returns false; the candidate conflicts with the second rule, so .

Fig. 2: Execution sequence for one atomic goal; goals are processed in turn.
Case 4: Safety-constraint enforcement. Consider the single-rule from Cases 1–2 with a deployment safety constraint . Even when , a reading makes return false. Thus, : the action is blocked solely due to .
3.10 Prototype
is WoT-MCP in Explicit mode (tools for properties and actions; resources for events). calls n12spec [2], which was the most reliable NL-to-LTL tool in our preliminary trials. We extend its prompt to enforce role-consistent propositions and include domain-agnostic few-shot examples. uses GPT-4.1 for Stage 1 matching and regex-based threshold detection for Stage 2 enrichment. parses formulas with a Lark grammar into a syntax tree; an ImplicationExtractor identifies implication and biconditional patterns. encodes formulas in by aliasing tool IDs to typed (Bool/Real) variables and converting the infix expression via a shunting-yard pass (e.g., becomes Implies(And(A, B), C)).
https://github.com/macc-n/wot-mcp/
https://github.com/z3prover/z3
The prototype is a minimal instantiation of rather than a complete realization. Each LLM stage (, and argument synthesis) is followed by deterministic validation or a hard failure: malformed formulas or mappings fail closed, a role-aware filter drops pairs whose antecedent is not observable or whose consequent is not executable, and unresolved affordances cannot be invoked. The remaining stages use fixed rules rather than LLM calls: and 's numeric enrichment rely on cue lists tuned to the evaluated prompts, the well-formedness filter checks identifier shape rather than membership in , and strips temporal operators rather than interpreting them, so checks a single state snapshot. These guards reject invalid outputs but do not broaden coverage: NL phrasings and temporal requirements outside the fixed rules remain unsupported, and a semantically incorrect yet well-formed formula, mapping, or argument may still reach execution (Section 4.5). The supplementary appendix enumerates per-stage rules, failure modes, and unhandled cases.
4 Evaluation
We evaluate the WoT instantiation of SafeOrchestrate against the RQ in Section 1. We use eight CPS orchestration tasks from prior work to assess performance across diverse control patterns. Table 1 summarizes each task and its primary orchestration capability.
| Scenario | Description | Primary capability |
|---|---|---|
| Presence Control [18] | Automate lighting from room occupancy. | Property-triggered condition-action |
| AC Control [18] | Maintain room temperature via threshold-based switching. | Bidirectional threshold control |
| Robot Workflow [18] | Coordinate perception, manipulation, and actuation steps. | Sequential multi-stage control |
| Greenhouse Automation [18] | Maintain plant conditions via coupled climate rules. | Multi-condition coordination |
| Washing Machine Event [24] | Trigger LED blinking after cycle completion. | Event-triggered action |
| Doorbell Workflow [24] | Temporarily adjust audio, notify user, ordered and restore state. | Ordered event-triggered workflow |
| Alarm Ringing [24] | Maintain temperature for fixed duration after alarm trigger. | Timed event execution |
| Coming/Leaving Home [6] | Control multiple devices for home arrival/departure. | Multi-device coordination |
Table 1: Evaluation tasks grouped by orchestration capability.
4.1 Experimental Setup
System configuration. We compare SafeOrchestrate against VanillaOrchestrate, a baseline that maps atomic goals directly to MCP tool calls without runtime verification, while SafeOrchestrate runs the full pipeline (). To prevent runaway behavior when the baseline fails to converge, we cap it at three reactive tool-calling steps. For fairness, we disable human-in-the-loop intervention and iterative refinement for SafeOrchestrate.
Model and execution settings. and argument synthesis use GPT-4.1, whereas uses the n12spec implementation with GPT-3.5 Turbo to match prior work. All LLM calls use temperature 0. Because provider-side nondeterminism can still introduce variance, we average results over ten runs per atomic goal.
Evaluation protocol. We reconstruct oracle action sequences from execution logs and compare them with observed tool-call traces. This comparison yields required-action accuracy and MCP-ES (Section 4.2). For event-triggered tasks, we reset the event buffer before each run and inject the trigger exactly once in event-present settings. We also include event-absent controls to verify that systems do not act without triggers.
4.2 Evaluation Metrics
Required-action accuracy. Following prior work [18], we measure whether all oracle actions are executed correctly at least once. This metric captures functional correctness but is insensitive to ordering and extraneous calls.
MCP Execution Similarity. To capture full-trace fidelity, we define MCP-ES as the normalized Levenshtein similarity between expected and actual MCP call sequences and :
MCP-ES penalizes insertions, deletions, substitutions, and ordering errors. Before computing distance, we remove read-only state queries (e.g., get_*) and internal guardrail-inspection calls that do not affect system state or execution order. We retain all state-changing actions (tool invocations and property writes). We apply the same filtering to SafeOrchestrate and VanillaOrchestrate to ensure comparability. For multi-action consequences, we expand oracle actions to all required actuations; unintended additional actuations count as insertions.
4.3 Results
As Table 2 shows, both approaches perform similarly on simple property-triggered tasks. VanillaOrchestrate degrades as task complexity, event dependence, and device count increase, scoring 80% accuracy and 75% MCP-ES on Robot Workflow and 83% accuracy and 87% MCP-ES on Greenhouse Automation. The gap widens on event-triggered and multi-device tasks: VanillaOrchestrate drops to 17% accuracy and 13% MCP-ES on Doorbell Workflow, and to 80% accuracy but only 17% MCP-ES on Coming/Leaving Home. The latter highlights that high action coverage can still coincide with severe ordering and coordination errors.
SafeOrchestrate attains 100% required-action accuracy on every task and 100% MCP-ES on all but Coming/Leaving Home, where MCP-ES is 92% due to one non-oracle lighting action.
| Task | VanillaOrchestrate | SafeOrchestrate | ||
|---|---|---|---|---|
| Acc. | MCP-ES | Acc. | MCP-ES | |
| Presence Control | 100 | 100 | 100 | 100 |
| AC Control | 100 | 100 | 100 | 100 |
| Robot Workflow | 80 | 75 | 100 | 100 |
| Greenhouse Automation | 83 | 87 | 100 | 100 |
| Washing Machine Event | 50 | 50 | 100 | 100 |
| Doorbell Workflow | 17 | 13 | 100 | 100 |
| Alarm Ringing | 25 | 25 | 100 | 100 |
| Coming/Leaving Home | 80 | 17 | 100 | 92 |
Table 2: Required-action accuracy and MCP-ES (%, mean of ten runs per atomic goal). SafeOrchestrate scores 100% except Coming/Leaving Home MCP-ES (92%); VanillaOrchestrate degrades on event-triggered, ordered, and multi-device tasks.
To understand the baseline errors, we inductively coded per-goal failure logs; Table 3 summarizes the resulting failure types. Failures follow recurring patterns: they cluster at the end of ordered workflows, compound across coupled rules, and manifest as misordered or extraneous calls in multi-device coordination.
| Failure type | Definition | Observed examples |
|---|---|---|
| Skipped precondition | Executes an action without observing the required state or event. | Event-absent control runs; inactive coming/leaving branch execution |
| Wrong tool | Selects an affordance with the wrong role or semantics. | Confusing state-query and actuator affordances in climate-control runs |
| Missing action | Omits one or more oracle actions. | Doorbell Workflow missing volume reduction or restoration |
| Wrong order | Executes required actions in a sequence that breaks the workflow semantics. | Ordered robot and doorbell workflows |
| Wrong argument | Uses a correct action with invalid or semantically wrong parameters. | Speaker volume parameter mismatch in VanillaOrchestrate runs |
| Unsafe extra action | Invokes an additional action not permitted by the active trigger/state. | Leaving-home branch invoked during coming-home request; extra light-off action |
Table 3: Failure types identified in the baseline execution logs.
4.4 Discussion
Baseline failure modes. Purely LLM-driven orchestration suffices for simple tasks but becomes unreliable for event-triggered control, ordered execution, and multi-device coordination—precisely where explicit grounding and runtime checking are most valuable. Table 3 captures recurring VanillaOrchestrate weaknesses: missing precondition checks, premature termination, invalid arguments, and state-query/action confusion (e.g., turnOnAC vs. getIsOnAC). In event-triggered settings such as Coming/Leaving Home, the baseline also fails to respect triggers: actions may execute regardless of the active event. Role-aware grounding and guardrail filtering mitigate these failure modes.
Scope of the safety claims. 's Phase 2 performs two checks: (i) consistency of a candidate action with the full grounded specification (cross-rule conflicts) and (ii) when is supplied, consistency with the deployment-constraint set. Our evaluation primarily exercises precondition and trigger enforcement, where SafeOrchestrate achieves full required-action accuracy. However, Phase 2 is not tested at scale: the reused tasks specify no , and most contain only one rule, so conflicts rarely arise. Accordingly, both checks are demonstrated only in the worked example (Section 3.9); Coming/Leaving Home, the only multi-action task, receives precondition gating alone (Section 3.7). Enforcement is also pre-execution: the orchestrator does not inspect action results or recover from actuation faults, so hazards during or after physical execution are out of scope.
Limitations of the metrics. Required-action accuracy is insensitive to trace order and extraneous actions. MCP-ES captures trace fidelity but penalizes benign non-oracle behavior (e.g., extra device deactivation in leaving-home). We therefore interpret MCP-ES as a trace-conformance metric rather than a semantic correctness measure.
4.5 Threats to Validity
Internal Validity. Averaging ten runs per atomic goal (Section 4) captures provider-side nondeterminism but cannot exhaustively sample stochastic execution paths. We also do not conduct a component-wise ablation, so the improvement over VanillaOrchestrate cannot be attributed to decomposition, grounding, or guardrail checking in isolation (Section 5).
External Validity. The evaluation has four scope limitations. (1) Tasks: the eight simulated tasks span condition-action, event-triggered, ordered, and multi-device patterns, but exclude long-running cyclic workflows, dynamic branching where later actions depend on intermediate outputs [6], and physical robotics/industrial CPS deployments. (2) Models: and argument synthesis use GPT-4.1, whereas uses n12spec with GPT-3.5 Turbo; we do not evaluate other models. (3) Baselines: we compare only against VanillaOrchestrate. LLM-MaGe and IoT Whisperer emit different artifacts (PDDL plans and Node-RED flows) for which no shared trace metric exists, and LLM-MaGe requires enriched TD annotations that our tasks lack. We therefore retain them as conceptual comparisons (Sections 2, 4.4). (4) Metrics: we report only required-action accuracy and MCP-ES, not latency, efficiency, or scalability. Broadening model and baseline coverage is constrained by manual oracle-trace reconstruction and MCP-ES computation; the automated trajectory scoring planned in Section 5 would reduce this burden.
Construct Validity: Semantic Grounding. SafeOrchestrate depends on semantic alignment among NL phrases, proposition labels, TD affordances, and MCP tool names; MCP standardizes the call interface, not semantic correspondence. The role-aware filter rejects role violations, and the guardrail rejects cross-rule conflicts. However, the system detects neither role-correct but semantically incorrect groundings nor well-formed but incorrect argument values (Section 3.10). In deployments where such errors are costly, human review or deployment-specific validation would be required.
Construct Validity: Runtime and Temporal Scope. checks individual actions against a single current-state snapshot rather than reasoning over traces or concurrent interleavings, placing the architecture between online trace monitors (e.g., RV-Monitor [11]) and offline model checking (e.g., TLA+ [9]). It neither resamples the per-goal snapshot (Section 3.8) between pairs nor searches over execution orders, and strips temporal operators; thus, duration requirements are supported only when they map to an executable-affordance parameter. Decomposition fixes ordering across goals, and blocked actions are rechecked only on later external invocations, so rejection is not permanent. Goals with data dependencies between pairs, external state mutation during evaluation, or pre-emption of an ongoing sequence [6] are outside the current scope (supplementary appendix). Resampling before each pair and integrating per-action checks with online trace monitoring and offline verification remain future work.
5 Conclusion and Future Work
This paper presents SafeOrchestrate, a runtime-checked architecture for LLM-driven CPS orchestration that combines MCP-based tool execution with guardrails. Across the evaluated tasks, SafeOrchestrate improves reliability over purely LLM-driven orchestration, with the largest gains on event-triggered, ordered, and multi-device scenarios.
Future work will make generated orchestrations reusable via structured workflow representations (e.g., SDs [6] or graph-based models), building on IoT workflow serialization [24] and potentially grammar-based generation [13]. We also aim to decouple orchestration logic from the MCP-specific backend by reading TDs directly and invoking each action, property, or event over the transport declared by its form (e.g., HTTP, MQTT, CoAP), as in thingctx [20]. Finally, we plan (i) component-wise ablations to isolate the contributions of role-aware grounding and guardrail checking, (ii) automated trajectory scoring to replace manual log inspection, and (iii) evaluation on multi-rule and safety-constrained tasks that exercise Phase 2 checks at scale. Broader evaluation across long-horizon, concurrent, and cyclic CPS scenarios, additional LLMs (including small language models), and larger deployments is needed to assess generality and scalability.
Acknowledgments. The authors thank Muhammad Shahzad Khan, Ege Korkan, Christophe François, and Abhishek Kumar for helpful feedback on the architecture and evaluation design.
Use of Generative AI. While preparing this article, the authors used generative AI tools—OpenAI ChatGPT, OpenAI Codex, Anthropic Claude, and Overleaf's AI assistant—to brainstorm, to improve the grammar, clarity, and concision of author-written text, to shorten text to meet the page limit, and to help implement and review the accompanying prototype code. No figure or image was generated or edited with AI, and no AI tool is credited as an author. AI was not used to fabricate, falsify, or manipulate data, code, figures, or results. The authors designed the study, ran the experiments, verified all code, results, figures, and metrics, and checked every cited work and AI-provided statement against its original source. The authors are fully accountable for the entire article, including any AI-assisted parts, and for its originality and scientific integrity. The experimental use of language models is described in Sections 3.10 and 4.
References
-
Ashfaq, M., Sadik, A.R., Das, T., Waseem, M., Mäkitalo, N., Mikkonen, T.: Runtime composition in dynamic system of systems: A systematic review of challenges, solutions, tools, and evaluation methods. Journal of Systems and Software 232, 112661 (2026)
-
Cosler, M., Hahn, C., Mendoza, D., Schmitt, F., Trippel, C.: nl2spec: Interactively translating unstructured natural language to temporal logics with large language models. In: Computer Aided Verification (CAV). LNCS, vol. 13965, pp. 383–396. Springer (2023)
-
Fortino, G., Savaglio, C., Spezzano, G., Zhou, M.: Internet of things as system of systems: A review of methodologies, frameworks, platforms, and tools. IEEE Transactions on Systems, Man, and Cybernetics: Systems 51(1), 223–236 (2020)
-
International Electrotechnical Commission: IEC 62714: Engineering data exchange format for use in industrial automation systems engineering (AutomationML). https://www.automationml.org/ (2018), accessed: 2026-02-20
-
International Electrotechnical Commission: IEC 62541: OPC unified architecture. https://opcfoundation.org/about/opc-technologies/opc-ua/ (2020), accessed: 2026-02-20
-
Kast, A., Korkan, E., Käbisch, S., Steinhorst, S.: Web of things system description for representation of mashups. In: International Conference on Omni-layer Intelligent Systems (COINS). pp. 1–8. IEEE (2020)
-
Korkan, E., Oliva Ramirez, S., Steinhorst, S.: DyST: Dynamic specification mining for heterogenous IoT systems with WoT. In: Web Engineering (ICWE). LNCS, vol. 14629, pp. 147–162. Springer (2024)
-
Korkan, E., Salama, F., Käbisch, S., Steinhorst, S.: A-MaGe: Atomic mashup generator for the web of things. In: Web Engineering (ICWE). LNCS, vol. 12706, pp. 320–327. Springer (2021)
-
Lamport, L.: Specifying systems: The TLA+ language and tools for hardware and software engineers. Addison-Wesley (2003)
-
Liu, Y., Peng, X., Cao, J., Wang, X., Deng, S., Chen, J., Yin, J., Zhang, X.: ToolGate: Contract-grounded and verified tool execution for LLMs. arXiv preprint arXiv:2601.04688 (2026)
-
Luo, Q., Zhang, Y., Lee, C., Jin, D., Meredith, P.O., Şerbānūtā, T.F., Roşu, G.: RV-Monitor: Efficient parametric runtime verification with simultaneous properties. In: Runtime Verification (RV). LNCS, vol. 8734, pp. 285–300. Springer (2014)
-
Model Context Protocol: What is the model context protocol (MCP)? https://modelcontextprotocol.io/docs/getting-started/intro (2026), accessed: 2026-02-21
-
Mündler, N., Dekoninck, J., Vechev, M.: Constrained decoding of diffusion LLMs with context-free grammars. arXiv preprint arXiv:2508.10111 (2025)
-
Ocker, F., Tanneberg, D., Eggert, J., Gienger, M.: Tulip agent: Enabling LLM-based agents to solve tasks using large tool libraries. arXiv preprint arXiv:2407.21778 (2024)
-
OpenAPI Initiative: OpenAPI specification v3.1.0. https://spec.openapis.org/oas/v3.1.0 (2021), accessed: 2026-02-20
-
Quigley, M., Conley, K., Gerkey, B., Faust, J., Foote, T., Leibs, J., Wheeler, R., Ng, A.Y., et al.: ROS: An open-source robot operating system. In: ICRA Workshop on Open Source Software. vol. 3, p. 5 (2009)
-
Sadik, A.R., Bolder, B., Subasic, P.: A self-adaptive system of systems architecture to enable its ad-hoc scalability: Unmanned vehicle fleet-mission control center case study. In: International Conference on Intelligent Systems, Metaheuristics & Swarm Intelligence (ISMSI). pp. 111–118. ACM (2023)
-
Salama, F., Ennemoser, F.J., Binkert, R., Korkan, E., Käbisch, S., Steinhorst, S.: LLM-MaGe: A generative mashup planner for the web of things. In: Web Engineering (ICWE). LNCS, vol. 15749, pp. 342–357. Springer (2025)
-
Sorici, A., Udrístioiu, V.V., Cordos, I.C., Olaru, A.: AmI HMAS: A hypermedia MAS for goal-driven interactions with every-day smart environments. In: International Conference on Autonomous Agents and Multiagent Systems (AAMAS). pp. 4149–4151. IFAAMAS (2026)
-
thingctx contributors: thingctx: Thing Description-driven tool invocation for AI agents over native transport bindings. https://github.com/thingctx/thingctx (2026), accessed: 2026-09-09
-
Torkjazi, M., Raz, A.K.: A review on integrating autonomy into system of systems: Challenges and research directions. IEEE Open Journal of Systems Engineering 2, 157–178 (2024)
-
W3C: Web of things (WoT) architecture 1.1. https://www.w3.org/TR/wot-architecture11/ (2026), accessed: 2026-02-20
-
W3C: Web of things (WoT) thing description 1.1. https://www.w3.org/TR/wot-thing-description11/ (2026), accessed: 2026-02-20
-
Warburton, E., Elhabbash, A., Ezzini, S., Elkhatib, Y.: The IoT whisperer: A framework for intelligent IoT service composition through LLMs. In: IEEE International Conference on Cloud Computing (CLOUD). pp. 54–64. IEEE (2025)