Auditable and replayable boundary run implementation method and system for LLM agent workflows

CN122549581APending Publication Date: 2026-08-11SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]为解决上述问题,行业内尝试引入事务机制、Saga模式、记录重放、血缘追踪等方法,但普遍存在侵入性强、依赖改造Agent架构、不支持动态工作流、无法处理不确定状态、重放会复现副作用等局限

Benefits of technology

[0033] 1. This invention normalizes the LLM input context and generates context hashes through L1 inference boundaries, and structurally solidifies the LLM outputs, so that the same execution environment can generate completely consistent and stable intents during replay, realizing that the inference process is reproducible, verifiable and traceable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122549581A_ABST
    Figure CN122549581A_ABST
Patent Text Reader

Abstract

The application provides an auditable and replayable boundary running implementation method and system for an LLM Agent workflow, wherein a double-layer replayable boundary including an L1 inference boundary and an L2 execution boundary is established between LLM inference decision and tool execution; at runtime, an agent workflow is divided into a control plane, a data plane and an observable plane; deterministic solidification of LLM decision execution is determined in the control plane; all tool calls are routed based on commitment hash governance in the data plane, idempotency check, uncertain state determination and hierarchical compensation rollback are realized; event logs are added in the observable plane, and real-time forking safe for deterministic replay and hash check is completed. The application can completely eliminate repeated side effects and partial fault residual states caused by timeout retries, realize automatic recovery from faults, full-process auditability, reproducible execution and safe anti-fact testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for implementing auditable and replayable boundary operations for LLM Agent workflows. Background Technology

[0002] In recent years, agents based on Large Language Models (LLMs) have been widely applied in production scenarios such as enterprise automation, customer service, DevOps pipelines, financial transactions, and cloud resource management. LLM agents typically run autonomously in multi-step workflows, generating actual business actions by calling external tools, database interfaces, APIs, messaging services, and cloud platforms, such as creating work orders, reserving resources, invoicing and billing, sending notifications, and modifying system configurations. Unlike traditional stateless LLM inference services, these agent workflows are characterized by strong external side effects, long execution chains, and dynamic decision-making. Their operational reliability, state consistency, and auditability directly impact business security and service quality.

[0003] In practical deployments, LLM Agent workflows frequently encounter failures such as timeouts, network jitter, intermediate crashes, and partial execution failures. When a tool call times out, the caller cannot determine whether external side effects have taken effect. The naive retry mechanism will repeatedly execute write operations, leading to anomalies such as duplicate billing, redundant notifications, and duplicate resource creation. When a workflow crashes midway through multi-step execution, the completed tool calls leave residual state in external systems, causing inconsistencies in business data that are difficult to trace and repair. Existing Agent frameworks (such as LangChain, AutoGen, and MetaGPT) mainly focus on inference capabilities, multi-agent collaboration, and dynamic process generation, lacking a systematic governance mechanism for failure scenarios.

[0004] To address these issues, the industry has attempted to introduce methods such as transaction mechanisms, Saga patterns, record replay, and lineage tracing. However, these methods generally suffer from limitations such as strong invasiveness, reliance on modifying the Agent architecture, lack of support for dynamic workflows, inability to handle uncertain states, and the recurrence of side effects during replay.

[0005] Therefore, there is an urgent need to provide a non-intrusive, auditable, replayable, idempotent, and compensatory LLM agent runtime architecture that can ensure execution safety, state consistency, and traceability under timeout and failure conditions without compromising dynamic programming capabilities. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a method and system for implementing auditable and replayable boundary operations in LLM Agent workflows.

[0007] The technical solution of this invention is: a method for implementing auditable and replayable boundary operation of an LLM Agent workflow, comprising:

[0008] Establish a two-layer replayable boundary, including the L1 inference boundary and the L2 execution boundary, between LLM inference decision-making and tool execution;

[0009] During runtime, the agent workflow is divided into a control plane, a data plane, and an observable plane;

[0010] In the control plane, deterministic solidification of LLM decision execution is achieved. In the data plane, all tool calls are routed based on commitment hash governance to realize idempotency verification, uncertain state determination, and hierarchical compensation rollback. In the observable plane, event logs are added to complete real-time forking with deterministic replay and hash verification security.

[0011] Preferably, the L1 inference boundary is located on the LLM output side, used to intercept the original LLM output, normalize the LLM input context and solidify stable execution decisions, so as to convert the non-deterministic inference output into a stable, reproducible and verifiable structured execution intent, and generate L1 inference events for tracing and replay.

[0012] Preferably, the L2 execution boundary is located on the tool execution side, used to receive stable execution intentions solidified by the L1 inference boundary, and to implement idempotency verification, uncertain state determination, and hierarchical compensation rollback based on commitment hashing, ensuring that external execution is safe and controllable, and generating L2 execution events for auditing, recovery and side-effect-free replay.

[0013] Preferably, deterministic solidification of LLM decisions is performed in the control plane, including:

[0014] The control plane assembles a context hash based on the current session state, historical events, and step indexes, and calls the LLM to perform inference and decision-making to obtain the raw LLM output.

[0015] The L1 inference boundary intercepts the entire raw LLM output and performs normalization and deterministic solidification on the raw LLM output to generate a stable execution intent.

[0016] Generate and record L1 inference events, and write them into the observable plane;

[0017] A state machine is used to transition from the reasoning state to the intention solidification completion state.

[0018] Preferably, the data plane uses a commitment hash. Perform idempotency checks on the unique query key by querying the event logs of the observable plane and the local cache; if a hash is committed... If it already exists, directly read the historical execution results and skip the actual tool execution; if a hash is committed... If it does not exist, it is determined to be the first execution and enters the controlled execution process; the state machine transitions to directly return to the historical result or prepare for controlled execution based on the verification result.

[0019] As a preferred option, if the commitment hash No, the data plane initiation controlled execution process carries a commitment hash. If an external tool is called and execution is successful, the returned result is normalized and marked as a confirmed state.

[0020] If timeouts or network packet loss occur, resulting in an ambiguous state, an uncertain state determination is performed. The external real state is queried through a verification hook and compared with the commitment hash to output a deterministic conclusion that the operation has been executed, not executed, or is unrecoverable.

[0021] If a workflow interruption or partial failure is detected, a tiered compensation rollback is triggered. The generated external states are cleaned up in the order of RollbackLevel and LIFO, and the Mean Time To Repair (MTTR) is calculated. The state machine then transitions to the execution completed state.

[0022] Preferably, the data plane encapsulates the execution result, commitment hash, execution status, verification information, and rollback information into L2 execution events. The observable plane writes the L2 execution events to the persistent log in an append-only manner and calculates the hash value of the L2 execution events. The state machine then transitions to the event persistence completion state.

[0023] Secondly, the present invention provides an auditable and replayable boundary operation implementation system for LLM Agent workflows, comprising:

[0024] The two-layer replayable boundary module is used to establish a two-layer replayable boundary, including the L1 inference boundary and the L2 execution boundary, between LLM inference decision and tool execution;

[0025] The plane partitioning module is used to divide the agent's workflow into a control plane, a data plane, and an observable plane during runtime.

[0026] The runtime module is used to deterministically solidify LLM decisions in the control plane, route all tool calls based on commitment hash governance in the data plane to achieve idempotency verification, uncertain state determination and hierarchical compensation rollback, and append event logs in the observable plane to complete real-time forking with deterministic replay and hash verification security.

[0027] Thirdly, the present invention provides an electronic device, comprising:

[0028] At least one processor;

[0029] and memory that is communicatively connected to at least one processor;

[0030] The memory stores a computer program that can be executed by at least one processor, and when the computer program is executed by at least one processor, the method for auditable and replayable boundary operation of the LLM Agent workflow is implemented.

[0031] Fourthly, the present invention provides a computer storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for auditable and replayable boundary operation implementation of an LLM Agent workflow is provided.

[0032] The beneficial technical effects of this invention are as follows:

[0033] 1. This invention normalizes the LLM input context and generates context hashes through L1 inference boundaries, and structurally solidifies the LLM outputs, so that the same execution environment can generate completely consistent and stable intents during replay, realizing that the inference process is reproducible, verifiable and traceable.

[0034] 2. This invention generates a commitment hash based on the key fields of stable intent in the data plane, and uses this hash as a unique identifier for idempotency verification. This ensures that the same business intent is executed only once regardless of how many times it is retried, thus avoiding problems such as duplicate creation, duplicate billing, redundant notifications, and duplicate resource requests, and significantly improving execution security.

[0035] 3. This invention addresses the problem of unknown execution status caused by tool call timeouts and network packet loss. The uncertain status determination is achieved by combining verification hooks with commitment hash comparisons to output a deterministic conclusion of whether the tool has been executed, not executed, or is unrecoverable.

[0036] 4. When a workflow experiences partial failures such as crashes or interruptions, the system automatically performs compensatory rollback according to the RollbackLevel and LIFO order, and quantifies the recovery efficiency through MTTR. It can restore the external business state to a consistent state in milliseconds, greatly improving fault recoverability and operation and maintenance efficiency.

[0037] 5. This invention persists L1 inference events and L2 execution events in an append-only manner through an observable plane and calculates event hashes separately to ensure immutability. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating the method of Embodiment 1 of the present invention;

[0039] Figure 2 This is a schematic diagram of the three-plane architecture in an embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram illustrating the workflow of the data plane in an embodiment of the present invention;

[0041] Figure 4 This is a structural framework diagram of Embodiment 2 of the present invention;

[0042] In the diagram, 100 is the double-layer replayable boundary module; 200 is the plane partitioning module; and 300 is the running module. Detailed Implementation

[0043] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0044] like Figure 1 and 2 As shown, this embodiment provides a method for implementing auditable and replayable boundary operations in an LLM Agent workflow, including:

[0045] S1: Establish a two-layer replayable boundary between LLM inference decision-making and tool execution, including the L1 inference boundary and the L2 execution boundary;

[0046] S2: During runtime, the agent workflow is divided into the control plane, data plane, and observable plane;

[0047] S3: In the control plane, deterministic solidification of LLM decision execution is achieved; in the data plane, idempotency verification, uncertain state determination, and hierarchical compensation rollback are implemented based on commitment hashing; and in the observable plane, event logs are added to complete real-time forking with deterministic replay and hash verification security.

[0048] In this embodiment, in step S1, the L1 inference boundary is located on the LLM output side and is used to intercept the original LLM output, normalize the LLM input context and solidify stable execution decisions, so as to convert the non-deterministic inference output into a stable, reproducible and verifiable structured execution intent, and generate L1 inference events for tracing and replay.

[0049] In this embodiment, in step S1, the L2 execution boundary is located on the tool execution side and is used to receive the stable execution intent solidified by the L1 inference boundary. Based on the commitment hash, it realizes idempotency verification, uncertain state determination, and hierarchical compensation rollback to ensure that external execution is safe and controllable, and generates L2 execution events for auditing, recovery and side-effect-free replay.

[0050] In this embodiment, in step S3, the control plane assembles a context hash based on the current session state, historical events, and step index, and calls the LLM to perform inference decision-making to obtain the original LLM output;

[0051] The L1 inference boundary intercepts the entire raw LLM output and performs normalization and deterministic solidification on the raw LLM output to generate a stable execution intent.

[0052] Generate and record L1 inference events, and write them into the observable plane;

[0053] A state machine is used to transition from the reasoning state to the intention solidification completion state.

[0054] In this embodiment, in step S3, as follows Figure 3 As shown, the data plane uses commitment hashing. Perform idempotency checks on the unique query key by querying the event logs of the observable plane and the local cache; if a hash is committed... If it already exists, directly read the historical execution results and skip the actual tool execution; if a hash is committed... If it does not exist, it is determined to be the first execution and enters the controlled execution process; the state machine transitions to directly return to the historical result or prepare for controlled execution based on the verification result.

[0055] In this embodiment, in step S3, if the commitment hash No, the data plane initiation controlled execution process carries a commitment hash. If an external tool is called and execution is successful, the returned result is normalized and marked as a confirmed state.

[0056] If timeouts or network packet loss occur, resulting in an ambiguous state, an uncertain state determination is performed. The external real state is queried through a verification hook and compared with the commitment hash to output a deterministic conclusion that the operation has been executed, not executed, or is unrecoverable.

[0057] If a workflow interruption or partial failure is detected, a tiered compensation rollback is triggered. The generated external states are cleaned up in the order of RollbackLevel and LIFO, and the Mean Time To Repair (MTTR) is calculated. The state machine then transitions to the execution completed state.

[0058] In this embodiment, in step S3, the data plane encapsulates the execution result, commitment hash, execution status, verification information, and rollback information into an L2 execution event. The observable plane writes the L2 execution event to the persistent log in an append-only manner and calculates the hash value of the L2 execution event. The state machine then transitions to the event persistence completion state.

[0059] In this embodiment, in step S3, the control plane reads the execution results and event information from the observable plane, updates the session state, increments the step index by 1, and records the current execution progress; simultaneously, it determines whether there are any incomplete steps in the workflow.

[0060] If a next step exists, the state machine transitions back to the LLM inference state and continues to the next loop.

[0061] If there is no next step, the process will end.

[0062] In this embodiment, the control plane assembles a context hash based on the current session state, historical events, and step indexes. ,Right now:

[0063] ;

[0064] In the formula, For cryptographic hash functions; To standardize the context, including the current session state, step index, and historical events.

[0065] In this embodiment, the control plane normalizes and deterministically solidifies the raw LLM output to generate a stable execution intent, including:

[0066] The control plane, based on the LLM raw output, context hash, step index, and current session state, obtains stable decisions through a deterministic solidification function. ,Right now:

[0067]

[0068] In the formula, For deterministic fixed functions; , , , These are the raw LLM output, context hash, step index, and current session state, respectively.

[0069] Stable decision The global tracking ID, normalization tools, and normalization parameters are encapsulated into a stable execution intent and the intent hash is calculated. ,Right now:

[0070] ;

[0071] In the formula, For global tracking ID; This is for standardizing tool names; For normalized parameters.

[0072] In this embodiment, the control plane records the entire process of solidifying this decision as an L1 inference event and writes it to the event log of the observable plane in an append-only manner.

[0073] In this embodiment, the data plane receives stable execution intentions from the L1 inference boundary through the L2 execution boundary and verifies the integrity and legality of the stable execution intentions. Upon successful verification, a commitment hash is generated based on the global tracking ID, normalized tool name, normalized parameters, and workflow-level logical idempotent key of the stable execution intention. The generation of the commitment hash based on the stable execution intention... Represented as:

[0074] ;

[0075] In the formula, For workflow-level logical idempotent keys.

[0076] In this embodiment, the rollback level includes:

[0077] Level 0: Cannot be rolled back, marked for manual handling;

[0078] Level 1: State verification is possible, but the final state is confirmed without rollback;

[0079] Level 2: Can automatically roll back to the state before execution;

[0080] Level 3: Strong consistency rollback.

[0081] In this embodiment, the mean time to repair (MTTR) is:

[0082] ;

[0083] In the formula, Total number of fault injections; For the first The actual time consumed from the detection of the fault to the completion of the compensation rollback.

[0084] In this embodiment, the observable plane persists L1 inference events and L2 execution events in an append-only manner, constructing an immutable event log that is arranged in an orderly manner step by step; deterministic replay is achieved based on the complete event log, and the replay process directly reads the solidified decisions and execution results from historical events, without calling the real LLM, executing external tools, or producing any side effects, ensuring that the execution process can be completely reproduced.

[0085] Meanwhile, the observable plane supports real-time forking with hash verification security: when replaying to a specified forking step, the historical event prefix is ​​first hash verified to ensure that the historical trajectory has not been tampered with and the order is consistent; only after the verification is passed can it be switched to real-time execution mode, and the new real-time process can continue from this step, while retaining the original execution lineage, thereby achieving secure, reliable, and auditable counterfactual analysis, fault review and strategy verification.

[0086] like Figure 4 As shown, embodiments of this application also provide an auditable and replayable boundary operation implementation system for LLM Agent workflows, including:

[0087] The two-layer replayable boundary module 100 is used to establish a two-layer replayable boundary, including an L1 inference boundary and an L2 execution boundary, between LLM inference decision and tool execution.

[0088] The plane partitioning module 200 is used to divide the agent workflow into a control plane, a data plane, and an observable plane during runtime.

[0089] The runtime module 300 is used to deterministically solidify LLM decisions in the control plane, route all tool calls based on commitment hash governance in the data plane to achieve idempotency verification, uncertain state determination and hierarchical compensation rollback, and append event logs in the observable plane to complete real-time forking with deterministic replay and hash verification security.

[0090] In this embodiment, the dual-layer replayable boundary module 100 establishes a dual-layer replayable boundary, including an L1 inference boundary and an L2 execution boundary, between LLM inference decision and tool execution. The L1 inference boundary is located on the LLM output side and is used to intercept the original LLM output, normalize the LLM input context, and solidify stable execution decisions to convert non-deterministic inference output into stable, reproducible, and verifiable structured execution intent, and generate L1 inference events for tracing and replay.

[0091] The L2 execution boundary is located on the tool execution side and is used to receive stable execution intentions solidified by the L1 inference boundary. Based on commitment hashing, it realizes idempotency verification, uncertainty state determination, and hierarchical compensation rollback to ensure that external execution is safe and controllable. It also generates L2 execution events for auditing, recovery, and side-effect-free replay.

[0092] In this embodiment, the control plane assembles a context hash based on the current session state, historical events, and step indexes, and calls the LLM to perform inference and decision-making to obtain the original LLM output;

[0093] The L1 inference boundary intercepts the entire raw LLM output and performs normalization and deterministic solidification on the raw LLM output to generate a stable execution intent.

[0094] Generate and record L1 inference events, and write them into the observable plane;

[0095] A state machine is used to transition from the reasoning state to the intention solidification completion state.

[0096] In some embodiments, the control plane assembles a context hash based on the current session state, historical events, and step indexes. ,Right now:

[0097] ;

[0098] In the formula, For cryptographic hash functions; To standardize the context, including the current session state, step index, and historical events.

[0099] In this embodiment, the control plane normalizes and deterministically solidifies the raw LLM output to generate a stable execution intent, including:

[0100] The control plane, based on the LLM raw output, context hash, step index, and current session state, obtains stable decisions through a deterministic solidification function. ,Right now:

[0101]

[0102] In the formula, For deterministic fixed functions; , , , These are the raw LLM output, context hash, step index, and current session state, respectively.

[0103] Stable decision The global tracking ID, normalization tools, and normalization parameters are encapsulated into a stable execution intent and the intent hash is calculated. ,Right now:

[0104] ;

[0105] In the formula, For global tracking ID; This is for standardizing tool names; For normalized parameters.

[0106] In this embodiment, the control plane records the entire process of solidifying this decision as an L1 inference event and writes it to the event log of the observable plane in an append-only manner.

[0107] In this embodiment, the data plane uses commitment hashing. Perform idempotency checks on the unique query key by querying the event logs of the observable plane and the local cache; if a hash is committed... If it already exists, directly read the historical execution results and skip the actual tool execution; if a hash is committed... If it does not exist, it is determined to be the first execution and enters the controlled execution process; the state machine transitions to directly return to the historical result or prepare for controlled execution based on the verification result.

[0108] If the hash is committed No, the data plane initiation controlled execution process carries a commitment hash. If an external tool is called and execution is successful, the returned result is normalized and marked as a confirmed state.

[0109] If timeouts or network packet loss occur, resulting in an ambiguous state, an uncertain state determination is performed. The external real state is queried through a verification hook and compared with the commitment hash to output a deterministic conclusion that the operation has been executed, not executed, or is unrecoverable.

[0110] If a workflow interruption or partial failure is detected, a tiered compensation rollback is triggered. The generated external states are cleaned up in the order of RollbackLevel and LIFO, and the Mean Time To Repair (MTTR) is calculated. The state machine then transitions to the execution completed state.

[0111] The data plane encapsulates the execution result, commitment hash, execution status, verification information, and rollback information into L2 execution events. The observable plane writes the L2 execution events to the persistent log in an append-only manner and calculates the hash value of the L2 execution events. The state machine then transitions to the event persistence completion state.

[0112] In this embodiment, the data plane receives stable execution intentions from the L1 inference boundary through the L2 execution boundary and verifies the integrity and legality of the stable execution intentions. Upon successful verification, a commitment hash is generated based on the global tracking ID, normalized tool name, normalized parameters, and workflow-level logical idempotent key of the stable execution intention. The generation of the commitment hash based on the stable execution intention... Represented as:

[0113] ;

[0114] In the formula, For workflow-level logical idempotent keys.

[0115] In this embodiment, the rollback level includes:

[0116] Level 0: Cannot be rolled back, marked for manual handling;

[0117] Level 1: State verification is possible, but the final state is confirmed without rollback;

[0118] Level 2: Can automatically roll back to the state before execution;

[0119] Level 3: Strong consistency rollback.

[0120] In this embodiment, the mean time to repair (MTTR) is:

[0121] ;

[0122] In the formula, Total number of fault injections; For the first The actual time consumed from the detection of the fault to the completion of the compensation rollback.

[0123] In some embodiments, the control plane reads execution results and event information from the observable plane, updates the session state, increments the step index by 1, and records the current execution progress; simultaneously, it determines whether there are any incomplete steps in the workflow.

[0124] If a next step exists, the state machine transitions back to the LLM inference state and continues to the next loop.

[0125] If there is no next step, the process will end.

[0126] In some embodiments, the observable plane persists L1 inference events and L2 execution events in an append-only manner to construct an immutable, step-by-step ordered event log; deterministic replay is implemented based on the complete event log, and the replay process directly reads the solidified decisions and execution results from historical events, without calling the real LLM, executing external tools, or producing any side effects, ensuring that the execution process can be completely reproduced.

[0127] Meanwhile, the observable plane supports real-time forking with hash verification security: when replaying to a specified forking step, the historical event prefix is ​​first hash verified to ensure that the historical trajectory has not been tampered with and the order is consistent; only after the verification is passed can it be switched to real-time execution mode, and the new real-time process can continue from this step, while retaining the original execution lineage, thereby achieving secure, reliable, and auditable counterfactual analysis, fault review and strategy verification.

[0128] Additionally, embodiments of this application also provide an electronic device, including:

[0129] At least one processor;

[0130] and memory that is communicatively connected to at least one processor;

[0131] The memory stores a computer program that can be executed by at least one processor. When the computer program is executed by at least one processor, it is the auditable and replayable boundary operation implementation method for LLM Agent workflow described in Example 1.

[0132] In some embodiments, the memory may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. A processor, coupled to the memory, is used to execute computer programs in the memory.

[0133] Embodiments of this application also provide a computer storage medium storing a computer program, which, when executed by a processor, provides the method for auditable and replayable boundary operation implementation of an LLM Agent workflow.

[0134] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include at least: any entity or device capable of carrying computer program code to a photographic / electronic device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical discs.

[0135] The embodiments and descriptions above are merely illustrative of the principles and preferred embodiments of the present invention. Various changes and modifications may be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed.

Claims

1. A method for implementing auditable and replayable boundary operation of LLM Agent workflow, characterized in that, include: Establish a two-layer replayable boundary, including the L1 inference boundary and the L2 execution boundary, between LLM inference decision-making and tool execution; During runtime, the agent workflow is divided into a control plane, a data plane, and an observable plane; The LLM decision-making process is deterministically solidified in the control plane. In the data plane, all tool calls are routed based on commitment hash governance to achieve idempotency verification, uncertainty state determination, and tiered compensation rollback; Event logs are added to the observable plane to complete real-time forking with deterministic replay and hash verification security.

2. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 1, wherein, The L1 inference boundary is located on the LLM output side and is used to intercept the original LLM output, normalize the LLM input context and solidify stable execution decisions, so as to convert the non-deterministic inference output into a stable, reproducible and verifiable structured execution intent and generate L1 inference events.

3. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 1, wherein, The L2 execution boundary is located on the tool execution side and is used to receive stable execution intentions solidified by the L1 inference boundary. Based on commitment hashing, it realizes idempotency verification, uncertainty state determination, and hierarchical compensation rollback to ensure that external execution is safe and controllable, and generates L2 execution events.

4. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 1, wherein, The control plane assembles a context hash based on the current session state, historical events, and step indexes, and calls the LLM to perform inference and decision-making to obtain the raw LLM output. The L1 inference boundary intercepts the entire raw LLM output and performs normalization and deterministic solidification on the raw LLM output to generate a stable execution intent. Generate and record L1 inference events, and write them into the observable plane; A state machine is used to transition from the reasoning state to the intention solidification completion state.

5. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 1, characterized in that, The data plane performs idempotency checks using the commitment hash as the unique query key by querying the event logs and local cache of the observable plane. If the commitment hash already exists, directly read the historical execution results and skip the actual tool execution; If the commitment hash does not exist, it is determined as the first execution and enters the controlled execution process; The state machine transitions to either directly returning to the historical result or preparing for controlled execution based on the verification result.

6. The method for implementing auditable and replayable boundary operation of LLM Agent workflow according to claim 5, characterized in that, If the commitment hash does not exist, the data plane initiates a controlled execution flow carrying the commitment hash Call external tool, if success, normalize the returned result and mark as deterministic state. If timeouts or network packet loss occur, resulting in an ambiguous state, an uncertain state determination is performed. The external real state is queried through a verification hook and compared with the commitment hash to output a deterministic conclusion that the operation has been executed, not executed, or is unrecoverable. If a workflow interruption or partial failure is detected, a tiered compensation rollback is triggered. The generated external states are cleaned up in the order of RollbackLevel and LIFO, and the Mean Time To Repair (MTTR) is calculated. The state machine then transitions to the execution completed state.

7. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 6, wherein, The data plane encapsulates the execution result, commitment hash, execution status, verification information, and rollback information into L2 execution events. The observable plane writes the L2 execution events to the persistent log in an append-only manner and calculates the hash value of the L2 execution events. The state machine then transitions to the event persistence completion state.

8. The method for auditable and replayable boundary run implementation for LLM Agent workflow according to claim 5, wherein, The L1 inference boundary normalizes and deterministically solidifies the original LLM output to generate a stable execution intent; including: The control plane, based on the LLM raw output, context hash, step index, and current session state, obtains stable decisions through a deterministic solidification function; The stable decision, global tracking ID, normalization tools, and normalization parameters are encapsulated into a stable execution intent and the intent hash is calculated.

9. An auditable and replayable boundary run implementation system for LLM Agent workflows, characterized by, include: The two-layer replayable boundary module is used to establish a two-layer replayable boundary, including the L1 inference boundary and the L2 execution boundary, between LLM inference decision and tool execution; The plane partitioning module is used to divide the agent's workflow into a control plane, a data plane, and an observable plane during runtime. The runtime module is used to deterministically solidify LLM decisions in the control plane, route all tool calls based on commitment hash governance in the data plane to achieve idempotency verification, uncertain state determination and hierarchical compensation rollback, and append event logs in the observable plane to complete real-time forking with deterministic replay and hash verification security.

10. An electronic device, comprising: At least one processor; and memory that is communicatively connected to at least one processor; The memory stores a computer program that can be executed by at least one processor, characterized in that, when the computer program is executed by at least one processor, it implements the auditable and replayable boundary operation implementation method for LLM Agent workflow as described in any one of claims 1-8.