Reinforcement learning based agent workflow visualized construction and debugging method

By using RUDDER reinforcement learning reward redistribution and an improved DynNoSlice spatiotemporal graph construction method, combined with reversible repair frontier embedding, the problem of visual construction and debugging of agent workflows is solved, achieving efficient fault location and repair analysis, and improving the visualization and debugging efficiency of agent workflows.

CN122346504APending Publication Date: 2026-07-07
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-05-15
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing methods for visualizing and debugging agent workflows are insufficient to reflect temporal continuity and dependency evolution, making it difficult to accurately represent complex execution processes. Furthermore, they lack effective characterization of reinforcement learning decision contributions, resulting in low fault debugging efficiency and insufficient interpretability of repair analysis.

Method used

By employing the RUDDER reinforcement learning reward redistribution method, the improved DynNoSlice spatiotemporal graph construction method, and the reversible repair front embedding method, a unified modeling and debugging representation of continuous temporal sequence, policy decision, spatial metric, and fault repair trajectory in the execution process of the agent workflow is formed, resulting in continuous temporal sequence, main trajectory, and unfolded set. The improved DynNoSlice spatiotemporal graph is combined to adjust spatial metrics and locate faults, and a reversible repair front is embedded.

Benefits of technology

It achieves clear temporal correlation and accurate visualization of intelligent agent workflows, high efficiency in fault location, and strong interpretability of debugging results, thereby improving the readability and construction accuracy of complex workflows and reducing the burden of manual analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122346504A_ABST
    Figure CN122346504A_ABST
Patent Text Reader

Abstract

The application discloses an agent workflow visual construction and debugging method based on reinforcement learning, comprising the following steps: step one: obtaining agent workflow execution data and policy decision data to form continuous time series and policy sequences; step two: extracting execution contract features to generate execution contract signatures and merging execution fragments to form main trajectories and expansion sets; step three: constructing an improved DynNoSlice space-time graph; step four: performing RUDDER reinforcement learning reward redistribution to form a residual field; step five: forming a metric graph according to the residual field; step six: locating a fault position and forming a reversible repair front; step seven: forming a debugging trajectory graph; and step eight: performing iterative layout solving to output visual construction results and debugging results. The application improves the accuracy of agent workflow time series expression, fault positioning and debugging analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent agent workflow visualization technology, and in particular to a method for constructing and debugging intelligent agent workflow visualization based on reinforcement learning. Background Technology

[0002] With the rapid development of large-scale intelligent agents, automated orchestration frameworks, and complex task execution systems, visualization construction and debugging technologies for agent-based workflows have received widespread attention. Existing workflow orchestration platforms or agent execution frameworks primarily rely on static flowchart displays, rule-driven layouts, or simple log replay methods for workflow construction and troubleshooting. However, these methods commonly suffer from the following problems in practical applications:

[0003] The workflow of an intelligent agent involves node retries, branch expansion, path backtracking, and state switching during continuous execution. Existing static layout methods struggle to reflect temporal continuity and dependency evolution, easily leading to issues such as congested trajectories, overlapping connections, and mixed primary and secondary paths, making it difficult to accurately represent complex execution processes. Furthermore, intelligent agent policy decisions are characterized by delayed rewards, long-chain dependencies, and the spread of local failures. Existing visualization methods typically only display execution results, lacking an effective characterization of the distribution of reinforcement learning decision contributions, and failing to highlight key decision locations and anomaly propagation locations. In fault debugging scenarios, traditional log comparison and breakpoint investigation methods struggle to unify fault locations, repair candidates, and recovery paths into a single spatiotemporal view, resulting in low efficiency in repair analysis and insufficient interpretability of debugging results.

[0004] Therefore, how to provide a visual construction and debugging method for intelligent agent workflow based on reinforcement learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a visualization construction and debugging method for agent workflow based on reinforcement learning. This invention employs the RUDDER reinforcement learning reward redistribution method, the improved DynNoSlice spatiotemporal graph construction method, and the reversible repair front embedding method to uniformly model and debug the continuous temporal sequence, policy decision, spatial metric, and fault repair trajectory during the execution of the agent workflow. It has the advantages of clear temporal correlation, accurate visualization, high fault location efficiency, and strong interpretability of debugging results.

[0006] The reinforcement learning-based intelligent agent workflow visualization construction and debugging method according to embodiments of the present invention includes the following steps:

[0007] Step 1: Obtain the agent workflow execution data and policy decision data. Sort the agent workflow execution data by time position and associate it by node dependency to form a continuous time series. Sort the policy decision data by time position to form a policy sequence.

[0008] Step 2: Extract execution contract features from continuous time series, generate execution contract signatures based on execution contract features, and merge execution fragments based on execution contract signatures to form the main trajectory and expansion set;

[0009] Step 3: Construct an improved DynNoSlice spatiotemporal graph based on node dependencies, temporal positions, main trajectories, and expanded sets;

[0010] Step 4: Perform RUDDER reinforcement learning reward redistribution on the policy sequence to form a reward redistribution sequence. Propagate and aggregate the reward redistribution sequence along node dependencies to form a residual field.

[0011] Step 5: Adjust and improve the spatial metric in the DynNoSlice spatiotemporal diagram based on the residual field to form a metric map;

[0012] Step 6: Locate the fault position from the continuous time series, extract atomic repair operations, and merge atomic repair operations according to compatibility constraints and reversibility constraints to form a reversible repair front.

[0013] Step 7: Cut the main trajectory along the fault location in the measurement map, embed the reversible repair front into the cut area, and apply a re-sinking constraint to the embedded trajectory to form a debugging trajectory map;

[0014] Step 8: Perform an improved DynNoSlice iterative layout solution on the debugging trajectory graph, and output the visualized construction results and debugging results of the agent workflow.

[0015] Optionally, step one specifically includes:

[0016] Collect node execution records, edge flow records, and time records during the execution of the intelligent agent workflow. Then, aggregate the node execution records, edge flow records, and time records according to the workflow instance identifier to form intelligent agent workflow execution data.

[0017] Extract node identifiers, start node identifiers, end node identifiers, execution start time, execution end time, and state transition flags from the intelligent agent workflow execution data, and map the start node identifiers and end node identifiers to node identifiers to form node dependency relationships;

[0018] The execution records of nodes in the intelligent agent workflow execution data are sorted according to the execution start time, and the node dependencies are mapped to the sorted node execution records to form a continuous time sequence.

[0019] Collect status records, action records, reward records, and decision time records during the intelligent agent's workflow decision-making process, and aggregate them according to workflow instance identifiers to form strategy decision data;

[0020] Extract status identifiers, action identifiers, reward values, and decision times from the strategy decision data. Sort the status identifiers, action identifiers, and reward values ​​according to the decision time, and map the decision time to the time position in the continuous time series to form a strategy sequence.

[0021] Optionally, step two specifically includes:

[0022] The execution records of nodes in a continuous time sequence are checked for continuity based on node dependencies and time positions. Node execution records that maintain connectivity in node dependencies and continuity in time positions are divided into execution segments.

[0023] The input state marker, output state marker, checkpoint marker, and side effect domain marker are extracted from the execution segment. The input state marker, output state marker, checkpoint marker, and side effect domain marker are combined according to their corresponding time positions within the execution segment to form the execution contract features.

[0024] The execution contract features are sequentially encoded, and the input state marker, output state marker, checkpoint marker, and side effect domain marker in the execution contract features are written into a unified encoding structure to form the execution contract signature.

[0025] The execution contract signatures are matched and compared. Execution segments with the same execution contract signature are merged into the same signature sequence, and the execution segments in the same signature sequence are connected according to their time position to form the main trajectory.

[0026] Execution segments that do not enter the main trajectory in a continuous time series are grouped according to their time position and node dependency to form an expanded set.

[0027] Optionally, step three specifically includes:

[0028] The connection direction between node execution records is determined by the start node identifier and the end node identifier in the node dependency relationship, and the order of node execution records in a unified time axis is determined by the time position. The connection direction and the order of arrangement are combined to form a spatiotemporal framework.

[0029] The execution segments in the main trajectory are projected to their positions in the spatiotemporal framework according to their time positions, and the execution segments are connected according to the time order and node dependencies in the main trajectory to form the main path;

[0030] The execution fragments in the expanded set are projected to their positions in the spatiotemporal framework according to their time positions, and the execution fragments in the expanded set are connected to the execution fragments in the main path according to the node dependencies to form the expanded path;

[0031] Temporal connectivity is performed on the temporal progression relationship between each execution segment in the main path, temporal connectivity is performed on the temporal progression relationship between each execution segment in the expanded path, and cross connectivity is performed on the node dependency relationship between the main path and the expanded path to form a spatiotemporal connection relationship.

[0032] The main path, the expanded path, and the spatiotemporal connection relationships are configured into the spatiotemporal framework, and the main path and the expanded path are expressed as continuous trajectories to form an improved DynNoSlice spatiotemporal graph.

[0033] Optionally, step four specifically includes:

[0034] Extract state identifiers, action identifiers, reward values, and decision times from the strategy sequence, and synchronize the state identifiers, action identifiers, and reward values ​​according to the decision time to form a decision trajectory;

[0035] The status and action markers in the decision trajectory are combined into decision units according to time and location, and the reward value is written into the decision unit according to the decision time to form a decision unit sequence.

[0036] RUDDER reinforcement learning reward redistribution is performed on the decision unit sequence, decomposing the reward value from the original decision unit where the decision time was located to the decision unit that caused the change in cumulative reward, forming a redistributed reward value;

[0037] Arrange the redistributed reward values ​​according to the decision time to form a reward redistribution sequence;

[0038] The redistribution reward values ​​in the reward redistribution sequence are mapped to the node execution records in the node dependencies, and propagation aggregation is performed on the redistribution reward values ​​along the node dependencies to form a residual field.

[0039] Optionally, step five specifically includes:

[0040] Extract the residual values ​​corresponding to the node execution records from the residual field, and map the residual values ​​to the execution fragments in the improved DynNoSlice spatiotemporal graph according to the time position to form fragment residual records;

[0041] Based on the fragment residual records, the spacing adjustment between adjacent execution fragments, the curvature adjustment of the connection position between adjacent execution fragments, and the density adjustment in the adjacent regions of time position are calculated to form a set of spatial metric parameters;

[0042] The spacing adjustment amount in the spatial metric parameter set is configured between the main trajectory and adjacent execution segments in the unfolded set, the curvature adjustment amount in the spatial metric parameter set is configured at the connection position between adjacent execution segments, and the density adjustment amount in the spatial metric parameter set is configured at the distribution position of execution segments in the adjacent regions of time position, thus forming a spatial metric constraint set;

[0043] Based on the spatial metric constraint set, the execution fragment positions and connection patterns in the improved DynNoSlice spatiotemporal graph are updated with metrics to form a metric graph.

[0044] Optionally, step six specifically includes:

[0045] Based on the state transition markers and time positions in the continuous time sequence, anomalies are screened in the node execution records. The state transition break position, state transition bounce position, and state stagnation position are mapped to the node execution records in the continuous time sequence to form the fault position.

[0046] The faulty execution segment is extracted from the main trajectory along the fault location, and related execution segments are extracted from the expanded set according to the node dependency relationship to form a set of repair candidate segments;

[0047] The node dependencies and temporal connections are adjusted around the set of candidate fragments to be repaired, generating a visual trajectory graph that can be used to assist debugging. This includes replacement, insertion, rollback, and reconnection operations, forming an atomic repair operation.

[0048] Matching and validation are performed on the input state markers, output state markers, and node dependencies in the atomic repair operation to form compatibility constraints. Rollback validation is performed on the checkpoint markers, side effect domain markers, and time positions in the atomic repair operation to form reversible constraints.

[0049] Atomic repair operations that satisfy compatibility and reversibility constraints are connected according to node dependencies and arranged according to time position to form a reversible repair front.

[0050] Optionally, step seven specifically includes:

[0051] Based on the time position of the fault location in the measurement map and the connection position in the main trajectory, the cut start point and cut end point are determined, and the main trajectory segment between the cut start point and cut end point is determined as the cut area;

[0052] The main trajectory is decomposed into preceding and following trajectories along the cut start and cut end points, while maintaining the spatial metric relationship between the preceding and following trajectories in the metric graph.

[0053] The reversible repair front is mapped into the cut area according to its time position, so that the reversible repair front forms a repair trajectory in the cut area, and the front end of the reversible repair front is connected to the preceding trajectory, and the end end of the reversible repair front is connected to the following trajectory.

[0054] Based on node dependencies and time positions, the connection positions between the repair trajectory, preceding trajectory, and subsequent trajectory are matched and adjusted to form an embedded trajectory;

[0055] Apply re-sinking constraints to the embedded trajectory to ensure that the connection positions at the end of the embedded trajectory and the subsequent trajectory maintain consistency in time progression and node dependency, thus forming a debugging trajectory diagram.

[0056] Optionally, step eight specifically includes:

[0057] Extract the execution fragment positions, connection positions, and spatial metric relationships from the debug trajectory diagram, and map the execution fragment positions, connection positions, and spatial metric relationships to the layout units in the improved DynNoSlice iterative layout solver to form a layout solver record;

[0058] Based on the layout solver record, calculate the execution fragment position adjustment amount and the connection position shape adjustment amount, map the execution fragment position adjustment amount to the execution fragment position, and map the connection position shape adjustment amount to the connection position to form a layout adjustment parameter set;

[0059] Based on the layout adjustment parameter set, perform a round of layout updates on the execution segment positions and connection position shapes in the debug trajectory diagram to form an updated trajectory diagram;

[0060] The difference between the execution fragment position and connection position shape in the updated trajectory diagram and the execution fragment position and connection position shape in the debug trajectory diagram is calculated. The difference result is compared with the convergence threshold. The iteration stops when the difference result meets the convergence threshold. When the difference result does not meet the convergence threshold, the updated trajectory diagram is used as the current trajectory diagram and the layout update is re-executed.

[0061] Output the updated trajectory map that meets the convergence threshold. The distribution results of the execution segments in the updated trajectory map are determined as the visualization construction results of the agent workflow. The fault location, reversible repair front and trajectory re-merging results in the updated trajectory map are determined as the debugging results.

[0062] The beneficial effects of this invention are:

[0063] Compared to existing technologies that rely on static flowcharts, rule-driven layouts, and simple log replays, this invention constructs a continuous temporal sequence around the agent's workflow execution data and policy decision data. It merges execution segments based on execution contract signatures to form the main trajectory and expanded set. Furthermore, it combines an improved DynNoSlice spatiotemporal graph to uniformly express the temporal evolution and node dependencies of the workflow. This effectively alleviates the problems of trajectory congestion, connection intersections, mixed primary and secondary paths, and difficulty in accurately representing continuous evolution processes during complex execution. It enables the agent's workflow to maintain a clearer temporal and dependency structure during the visualization construction process, improving the overall readability and construction accuracy of complex workflows.

[0064] Furthermore, this invention performs RUDDER reinforcement learning reward redistribution on the policy sequence and introduces the resulting residual field into the spatial metric adjustment process of the improved DynNoSlice spatiotemporal graph, enabling key decision locations, anomaly propagation locations, and high-impact execution segments to be more accurately highlighted in the visualization results. Simultaneously, by extracting atomic repair operations from fault locations and forming reversible repair fronts, the main trajectory is cut, repair front embedding, and trajectory reconvergence are completed in the metric graph. This unifies the expression of fault locations, repair paths, and recovery results into the same debugging trajectory graph, thereby improving fault location efficiency, repair analysis efficiency, and the interpretability of debugging results. It also reduces the problems of heavy manual analysis burden, long debugging links, and unintuitive repair processes under traditional log comparison and breakpoint investigation methods. Attached Figure Description

[0065] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0066] Figure 1 This is a flowchart of the reinforcement learning-based intelligent agent workflow visualization construction and debugging method proposed in this invention;

[0067] Figure 2 This is a schematic diagram of the improved DynNoSlice spatiotemporal graph construction method for visualizing and debugging intelligent agent workflows based on reinforcement learning, as proposed in this invention.

[0068] Figure 3 This is a schematic diagram of the reversible repair front embedding debugging trajectory of the reinforcement learning-based intelligent agent workflow visualization construction and debugging method proposed in this invention. Detailed Implementation

[0069] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0070] refer to Figures 1-3 A method for visually constructing and debugging intelligent agent workflows based on reinforcement learning includes the following steps:

[0071] Step 1: Obtain the agent workflow execution data and policy decision data. Sort the agent workflow execution data by time position and associate it by node dependency to form a continuous time series. Sort the policy decision data by time position to form a policy sequence.

[0072] Step 2: Extract execution contract features from continuous time series, generate execution contract signatures based on execution contract features, and merge execution fragments based on execution contract signatures to form the main trajectory and expansion set;

[0073] Step 3: Construct an improved DynNoSlice spatiotemporal graph based on node dependencies, temporal positions, main trajectories, and expanded sets;

[0074] Step 4: Perform RUDDER reinforcement learning reward redistribution on the policy sequence to form a reward redistribution sequence. Propagate and aggregate the reward redistribution sequence along node dependencies to form a residual field.

[0075] Step 5: Adjust and improve the spatial metric in the DynNoSlice spatiotemporal diagram based on the residual field to form a metric map;

[0076] Step 6: Locate the fault position from the continuous time series, extract atomic repair operations, and merge atomic repair operations according to compatibility constraints and reversibility constraints to form a reversible repair front.

[0077] Step 7: Cut the main trajectory along the fault location in the measurement map, embed the reversible repair front into the cut area, and apply a re-sinking constraint to the embedded trajectory to form a debugging trajectory map;

[0078] Step 8: Perform an improved DynNoSlice iterative layout solution on the debugging trajectory graph, and output the visualized construction results and debugging results of the agent workflow.

[0079] In this embodiment, step one specifically includes:

[0080] Collect node execution records, edge flow records, and time records during the execution of the intelligent agent workflow. Compare the workflow instance identifiers in the node execution records, edge flow records, and time records. Group records with the same workflow instance identifier into the same record set to form intelligent agent workflow execution data.

[0081] Extract node identifiers, start node identifiers, end node identifiers, execution start time, execution end time, and state transition flags from the intelligent agent workflow execution data. Match the start node identifiers and end node identifiers with the node identifiers, and establish a connection relationship between the nodes corresponding to the start node identifiers and the nodes corresponding to the end node identifiers to form node dependency relationships.

[0082] The execution records of nodes in the intelligent agent workflow execution data are arranged sequentially according to the execution start time, and the node dependencies are mapped to the completed node execution records, so that the node execution records are continuously expanded in time order and connected in dependency order, forming a continuous time sequence.

[0083] Collect status records, action records, reward records, and decision time records during the intelligent agent's workflow decision-making process, and group them according to workflow instance identifiers. State records, action records, reward records, and decision time records with consistent workflow instance identifiers are grouped into the same decision record set to form strategy decision data.

[0084] Extract status identifiers, action identifiers, reward values, and decision times from the strategy decision data. Arrange the status identifiers, action identifiers, and reward values ​​according to the decision time. Then, match the decision time with the time position in the continuous time series, so that each strategy decision record is matched with the corresponding position in the continuous time series, forming a strategy sequence.

[0085] In this embodiment, step two specifically involves:

[0086] The execution records of nodes in a continuous time sequence are checked for continuity based on node dependencies and time positions. The execution records of the preceding and following nodes corresponding to each node execution record are compared one by one. Node execution records with continuous node dependencies and progressive time positions are classified into the same continuous segment. The position where the node dependency is interrupted or the time position jumps is used as the segment boundary. Each continuous segment is determined as an execution fragment.

[0087] Extract input status markers, output status markers, checkpoint markers, and side effect domain markers from the execution fragment. Combine the input status markers, output status markers, checkpoint markers, and side effect domain markers according to their corresponding time positions within the execution fragment, so that the input status markers, output status markers, checkpoint markers, and side effect domain markers at the same time position form a set of fragment feature records. Then, arrange the sets of fragment feature records in chronological order to form the execution contract features.

[0088] The execution contract features are sequentially encoded. The input state marker, output state marker, checkpoint marker, and side effect domain marker in the execution contract features are written into a unified encoding structure according to their time positions. This makes the execution contract features form a feature arrangement result that maintains the time order in the encoding structure, thus forming the execution contract signature.

[0089] The execution contract signatures are matched and compared. Execution segments with the same execution contract signatures are merged into the same signature sequence. The execution segments in the same signature sequence are connected according to their time position, so that the execution segments with the same execution contract signatures form a continuous unfolding result on the time axis, forming the main trajectory.

[0090] Execution segments that do not enter the main trajectory in a continuous time series are grouped according to their time position and node dependencies. The execution segments that do not enter the main trajectory are arranged in chronological order while maintaining the corresponding connections in the node dependencies to form an expanded set.

[0091] In this embodiment, step three specifically includes:

[0092] The connection direction between node execution records is determined by the start node identifier and the end node identifier in the node dependency relationship. The order of node execution records in the unified time axis is determined by the time position. Each node dependency relationship is mapped to a set of connection start points and connection end points. Then, each node execution record is mapped to a time coordinate position in the unified time axis, so that the connection direction and the order of arrangement form a spatiotemporal framework in the same coordinate system where the time axis direction and the dependency axis direction coexist.

[0093] The execution segments in the main trajectory are projected to their positions in the spatiotemporal frame according to their time positions, and the execution segments are connected according to the time order and node dependencies in the main trajectory. The projection interval is determined based on the start time position and end time position corresponding to each execution segment in the main trajectory. Then, adjacent execution segments are arranged in the spatiotemporal frame in the order of time progression, so that the execution segments in the main trajectory that maintain the dependency and connectivity relationship form a continuously extending main path.

[0094] The execution fragments in the expanded set are projected to their positions in the spatiotemporal frame according to their time positions, and the execution fragments in the expanded set are connected to the execution fragments in the main path according to the node dependencies. The projection interval is determined according to the time position corresponding to each execution fragment in the expanded set, and the connection position between the execution fragments in the expanded set and the main path is located according to the node dependencies, so that the execution fragments in the expanded set diverge from the corresponding positions in the main path and form an expanded path in the spatiotemporal frame.

[0095] Temporal connectivity is performed on the temporal progression relationship between each execution segment in the main path, temporal connectivity is performed on the temporal progression relationship between each execution segment in the expanded path, and cross connectivity is performed on the node dependency relationship between the main path and the expanded path. Specifically, temporal connections are established sequentially for adjacent execution segments in the main path according to their time positions, temporal connections are established sequentially for adjacent execution segments in the expanded path according to their time positions, and cross connections are established between the connection nodes in the main path and the connection nodes in the expanded path according to their node dependencies, thus forming a spatiotemporal connection relationship.

[0096] The main path, the expanded path, and the spatiotemporal connection relationships are configured into the spatiotemporal framework. The main path and the expanded path are expressed as continuous trajectories. Specifically, the execution fragment positions in the main path, the execution fragment positions in the expanded path, and the connecting edges in the spatiotemporal connection relationships are written into the same spatiotemporal graph structure. The main path is continuously expanded along the time axis, and the expanded path is separated from the main path along the dependency axis while maintaining continuous extension, thus forming an improved DynNoSlice spatiotemporal graph.

[0097] This invention, based on the DynNoSlice continuous-time dynamic graph layout concept, makes targeted improvements for intelligent agent workflow scenarios. The main improvements are: instead of simply expanding general dynamic graph nodes in a time-slice manner, it introduces node dependencies and a unified time axis to form a spatiotemporal framework, allowing execution segments to simultaneously obtain definite positions in both the temporal and dependency directions; instead of generating trajectories solely based on ordinary graph connectivity, it maps the main trajectory obtained by merging execution contract signatures and the expanded set to the main path and expanded path respectively, enabling repeated execution, branch execution, and abnormal execution to be distinguished and expressed according to business semantics; instead of merely maintaining a static edge layout, it simultaneously establishes temporal connectivity within the main path, temporal connectivity within the expanded path, and cross connectivity between the main path and the expanded path, ensuring that spatiotemporal connectivity fully reflects the execution order, dependency propagation, and branch expansion relationships; and it no longer only pursues a geometric graph. Instead of using a geometric arrangement, the improved DynNoSlice spatiotemporal graph incorporates the positions of execution segments, expanded segments, and connecting edges into a unified spatiotemporal graph structure through continuous trajectory representation. This forms an improved DynNoSlice spatiotemporal graph that adapts to the continuous evolution of the workflow. Therefore, the improved method can more accurately represent the real evolution process of the agent workflow during continuous operation, significantly reduce the trajectory intersection, branch overlap, and path breakage problems commonly found in static flowcharts, highlight the hierarchical differences between the main execution link and branch execution links, and enhance the continuity, readability, and structural stability of complex workflows during the visualization construction process. At the same time, it provides a unified and stable spatiotemporal foundation for subsequent spatial metric adjustment based on residual fields, main trajectory cutting based on fault locations, and local embedding based on reversible repair frontiers. This improves the ability to identify fault propagation relationships, the ability to express debugging trajectories, and the accuracy and efficiency of the entire agent workflow construction and debugging process.

[0098] In this embodiment, step four specifically includes:

[0099] Extract the state identifier, action identifier, reward value, and decision time from the strategy sequence. Maintain a one-to-one correspondence between the state identifier, action identifier, reward value, and decision time in each strategy record and write them into the same record unit. Then, adjust the order of each record unit according to the decision time from smallest to largest so that the state identifier, action identifier, and reward value unfold continuously along the time direction to form a decision trajectory.

[0100] The status and action identifiers in the decision trajectory are combined into decision units according to time position. The reward value corresponding to the time position is written into the corresponding decision unit, so that each decision unit contains a status identifier, action identifier and reward value. Then, the decision units are arranged continuously according to the decision time to form a decision unit sequence.

[0101] RUDDER reinforcement learning reward redistribution is performed on the decision unit sequence. The cumulative reward change position is tracked in the decision unit sequence according to the decision time. The cumulative reward change is established with the status and action labels in each decision unit to establish a contribution correspondence. Then, the original reward value is transferred from the decision unit where the original decision time is located to the decision unit with the contribution correspondence, so that each decision unit receives the redistributed reward amount, forming the redistributed reward value.

[0102] The redistribution reward values ​​are written into the corresponding positions of each decision unit according to the decision time, and arranged continuously from smallest to largest decision time, so that the redistribution reward values ​​form a sequential structure on the time axis that is consistent with the decision unit sequence, thus forming a reward redistribution sequence.

[0103] The redistribution reward value in the reward redistribution sequence is mapped to the time position in the continuous time series according to the decision time. Then, the time position is mapped to the node execution record in the node dependency relationship, so that each node execution record obtains the corresponding redistribution reward value. Then, the redistribution reward value is passed from the previous node execution record to the next node execution record along the node dependency relationship and the cumulative aggregation is performed, so that each node execution record in the continuous time series forms an associated result with the reward difference distribution, forming a residual field.

[0104] In this embodiment, step five specifically includes:

[0105] Extract the residual values ​​corresponding to the node execution records from the residual field, map each node execution record to the execution fragment in the improved DynNoSlice spatiotemporal graph according to the time position, so that a one-to-one correspondence is established between the node execution records and the execution fragments, and then write the residual values ​​on the node execution records into the corresponding execution fragments to form fragment residual records.

[0106] Based on the fragment residual records, the spacing adjustment between adjacent execution fragments, the curvature adjustment at the connection position between adjacent execution fragments, and the density adjustment in the adjacent region of the time position are calculated. During the calculation, the difference in residual values ​​between adjacent execution fragments is mapped to the direction of change in the spacing between execution fragments, the difference in residual values ​​between execution fragments on both sides of the connection position is mapped to the direction of change in the curvature of the connection position, and the distribution of residual values ​​in the adjacent region of the time position is mapped to the direction of change in the aggregation of execution fragments, thus forming a set of spatial metric parameters.

[0107] The spacing adjustment amount in the spatial metric parameter set is configured between adjacent execution segments in the main trajectory and the unfolded set, the curvature adjustment amount in the spatial metric parameter set is configured at the connection position between adjacent execution segments, and the density adjustment amount in the spatial metric parameter set is configured at the distribution position of execution segments in the adjacent region of time position, so that the interval between execution segments in the main trajectory and the unfolded set, the curvature of the connection position and the distribution density of execution segments in the adjacent region of time position respectively obtain corresponding metric constraints, forming a spatial metric constraint set;

[0108] Based on the spatial metric constraint set, the execution fragment positions and connection patterns in the improved DynNoSlice spatiotemporal graph are updated with metric updates. This rearranges the execution fragment positions according to the spacing adjustment amount, readjusts the connection patterns according to the curvature adjustment amount, and redistributes or consolidates the execution fragment distribution in adjacent temporal regions according to the density adjustment amount, thus forming a metric graph.

[0109] In this embodiment, step six specifically includes:

[0110] Anomaly screening is performed on node execution records based on state transition markers and time positions in continuous time sequences. Each node execution record in the continuous time sequence is expanded sequentially according to its time position. Then, the state transition markers in adjacent node execution records are compared before and after. The locations where state transition markers break, bounce, or stagnate are mapped to the node execution records in the continuous time sequence, and the corresponding results are determined as the fault locations.

[0111] The fault execution segment is extracted from the main trajectory along the fault location, and the associated execution segment is extracted from the expanded set according to the node dependency relationship. The main trajectory segment corresponding to the fault location is used as the starting point and ending point of the extraction. Then, the expanded set segment that maintains the connection relationship with the fault execution segment is searched along the node dependency relationship, so that the fault execution segment and the associated execution segment together form a set of repair candidate segments.

[0112] The node dependencies and temporal connections in the candidate fragment set are adjusted to generate a visual trajectory map that can be used to assist debugging. This includes replacement, insertion, rollback, and reconnection operations, forming an atomic repair operation. The node execution records in the candidate fragment set are recombined according to node dependencies, and the connection positions and temporal connection positions between the node execution records are replaced, inserted, rolled back, and reconnected respectively, so that each adjustment result forms an independent repair record, thus forming an atomic repair operation.

[0113] Matching checks are performed on the input state markers, output state markers, and node dependencies in atomic repair operations to form compatibility constraints. Rollback checks are performed on the checkpoint markers, side effect domain markers, and time positions in atomic repair operations to form reversible constraints. The input state markers and output state markers in each atomic repair operation are checked for first-to-last correspondence. The node dependencies are checked for consistency with the connection relationships in the repair candidate fragment set. Then, the checkpoint markers, side effect domain markers, and time positions are compared and rolled back along the original connection direction. This ensures that atomic repair operations that pass the matching check acquire compatibility constraints and atomic repair operations that pass the rollback check acquire reversible constraints.

[0114] Atomic repair operations that satisfy compatibility and reversibility constraints are connected according to node dependencies and arranged according to time position to form a reversible repair front. Atomic repair operations that satisfy compatibility and reversibility constraints are then chained together according to node dependencies, and the chained results are then arranged according to time position to form a continuous unfolding structure of atomic repair operations in the dependency direction and time direction, thus forming a reversible repair front.

[0115] In this embodiment, step seven specifically includes:

[0116] Based on the time position of the fault location in the measurement map and the connection position in the main trajectory, the cut start point and cut end point are determined. The time position corresponding to the fault location is mapped to the connection position in the main trajectory. Then, along the main trajectory, the connection positions that are adjacent to the fault location are found on both sides of the fault location. The connection position located in front of the fault location is determined as the cut start point, and the connection position located behind the fault location is determined as the cut end point. The main trajectory segment between the cut start point and the cut end point is determined as the cut area.

[0117] The main trajectory is decomposed into preceding and following trajectories along the cut start and cut end points, while maintaining the spatial metric relationship between the preceding and following trajectories in the metric graph. The portion of the main trajectory located before the cut start point is separated as the preceding trajectory, and the portion of the main trajectory located after the cut end point is separated as the following trajectory. The preceding and following trajectories continue to maintain the corresponding spacing distribution, connection direction, and temporal position relationship in the metric graph before the decomposition.

[0118] The reversible repair front is mapped into the cutting area according to its time position, so that the reversible repair front forms a repair trajectory in the cutting area. The front end of the reversible repair front is connected to the preceding trajectory, and the end end of the reversible repair front is connected to the following trajectory. The atomic repair operations in the reversible repair front are projected to the corresponding positions in the cutting area according to their time positions, so that the atomic repair operations in the reversible repair front unfold sequentially in the cutting area to form a repair trajectory. Then, the starting position of the repair trajectory is mapped to the end connection position of the preceding trajectory, and the ending position of the repair trajectory is mapped to the starting connection position of the following trajectory.

[0119] Based on node dependencies and time positions, the connection positions between the repair trajectory, the preceding trajectory, and the following trajectory are matched and adjusted to form an embedded trajectory. The connection positions in the repair trajectory are compared one by one with the connection positions in the preceding and following trajectories according to node dependencies, and the connection order is corrected according to time positions to form a continuous and time-progressive embedded result between the repair trajectory and the preceding trajectory, and between the repair trajectory and the following trajectory.

[0120] Apply re-merging constraints to the embedded trajectory to ensure that the connection positions at the end of the embedded trajectory and the subsequent trajectory maintain consistent time progression and node dependencies, thus forming a debugging trajectory diagram. Align the time position corresponding to the end of the embedded trajectory with the connection position in the subsequent trajectory, and apply consistency constraints to the node dependencies corresponding to the end of the embedded trajectory with the node dependencies in the subsequent trajectory, so that the embedded trajectory can be merged into the cut area and form a continuous debugging path together with the preceding and following trajectories, thus forming a debugging trajectory diagram.

[0121] In this embodiment, step eight specifically includes:

[0122] Extract the execution segment positions, connection positions, and spatial metric relationships from the debug trajectory diagram. Map each execution segment in the debug trajectory diagram to a set of position coordinates, map the connection relationships between adjacent execution segments to a set of connection coordinates, and then organize the spacing constraints between execution segments, the curvature constraints between connection positions, and the region distribution constraints into spatial metric relationships. Finally, map the execution segment positions, connection positions, and spatial metric relationships to the layout units in the improved DynNoSlice iterative layout solution to form a layout solution record.

[0123] Based on the layout solver record, the execution fragment position adjustment amount and the connection position shape adjustment amount are calculated. Adjacent distance and region density are compared for the execution fragment positions in the layout solver record to obtain the movement range of the execution fragment positions in the time direction and the dependency direction. Connection length and curvature are compared for the connection positions in the layout solver record to obtain the adjustment range of the connection position shape in the connection direction. Then, the execution fragment position adjustment amount is mapped to the execution fragment position, and the connection position shape adjustment amount is mapped to the connection position to form the layout adjustment parameter set.

[0124] Based on the layout adjustment parameter set, perform a layout update on the execution segment positions and connection position forms in the debugging trajectory diagram. Write the execution segment position adjustment amount from the layout adjustment parameter set into the execution segment position in the debugging trajectory diagram, causing the execution segment position to move according to the adjustment range. Write the connection position form adjustment amount from the layout adjustment parameter set into the connection position in the debugging trajectory diagram, causing the connection position to straighten, bend, converge, and rearrange according to the adjustment range, thus forming an updated trajectory diagram.

[0125] The difference between the execution segment position and connection position shape in the updated trajectory diagram and the execution segment position and connection position shape in the debug trajectory diagram is calculated. The coordinate difference of each execution segment before and after the update and the shape difference of each connection position before and after the update are calculated separately. The difference results are then compared with the convergence threshold. The iteration stops when the difference results meet the convergence threshold. When the difference results do not meet the convergence threshold, the updated trajectory diagram is used as the current trajectory diagram and the layout update is re-executed.

[0126] Output the updated trajectory map that meets the convergence threshold. The distribution results of the execution segments in the updated trajectory map are determined as the visualization construction results of the agent workflow. The fault location, reversible repair front and trajectory re-merging results in the updated trajectory map are determined as the debugging results.

[0127] Example 1: To verify the feasibility of this invention in practice, it was applied to an intelligent agent workflow platform that integrates knowledge-based question answering, work order dispatching, and tool invocation. This platform consists of an intent recognition agent, a retrieval enhancement agent, a rule validation agent, a work order generation agent, and a result verification agent. During daily operation, it automatically selects a path based on user requests and triggers retries, rollbacks, insertion of validation nodes, and branch reconnection when retrieval fails, rule conflicts occur, external tools time out, or answer confidence is insufficient. In existing technologies, platforms primarily use static flowcharts and runtime log playback for construction and debugging. While this can display node connections, it struggles to reflect the temporal evolution, repeated execution, and anomaly propagation processes of the same workflow during continuous operation. Especially during retrieval rollbacks, tool replacements, and partial repairs, the graphical interface is prone to issues such as trajectory intersections, mixed main and branch paths, difficulty in pinpointing fault locations, and difficulty in comparing repair links. This often requires maintenance personnel to simultaneously view logs, node status panels, and manually annotated screenshots, resulting in high analysis costs.

[0128] In this embodiment, the node execution records, edge flow records, state transition markers, reward records, and strategy decision records of the platform during continuous operation are first collected and then grouped according to workflow instance identifiers. The sample contains 12,640 complete workflow runs, covering 43 types of task intents, with 86 node templates. The average number of execution nodes per run is 17.3, the average number of branch expansions is 2.8, the average number of retries is 1.6, and the anomaly trigger rate is 14.7%. When applying this invention, the node execution records and edge flow records are first organized into a continuous time sequence. Then, input state markers, output state markers, checkpoint markers, and side effect domain markers are extracted from the continuous time sequence to form an execution contract signature. Execution segments with consistent execution contract signatures are merged into the main trajectory, and execution segments not merged into the main trajectory are formed into an expansion set. Subsequently, an improved DynNoSlice spatiotemporal graph is constructed based on node dependencies, time positions, the main trajectory, and the expansion set, so that the main path and the expansion path are continuously expressed within the same spatiotemporal framework. For the strategy decision-making part, the platform uses the RUDDER reinforcement learning reward redistribution method to redistribute rewards that originally lagged behind the endpoint to decision-making units that contribute significantly to the cumulative reward change. The redistributed reward values ​​are then propagated and aggregated along node dependencies to generate a residual field. This residual field is used to adjust the execution segment spacing, connection curvature, and adjacent region density in the spatiotemporal graph, thereby highlighting key nodes affecting task results, anomaly propagation locations, and high-value repair locations on the graph. For the debugging process, the system locates state transition breakpoints, bounce points, and stall points from the continuous time sequence, extracts faulty execution segments and related execution segments, and generates atomic repair operations in the form of replacement, insertion, rollback, and reconnection. Reversible repair fronts are then formed through compatibility and reversibility constraints, embedded into the main trajectory cutting region, and finally forming the debugging trajectory map. Operation and maintenance personnel can view the main trajectory, expanded set, fault location, repair path, and trajectory re-aggregation results on a single interface.

[0129] On the same batch of test tasks, this invention was compared with the traditional solution of "static flowchart + log playback". The test data came from 3200 anomaly instances in continuously running samples, including four typical anomalies: empty search results, tool timeouts, rule conflicts, and answer rollbacks. Evaluation metrics included workflow visualization construction time, average number of cross edges, fault location time, first-time repair success rate, and number of manual reviews. The results are shown in Table 1:

[0130] Table 1. Comparison of Trajectory Construction and Debugging Performance

[0131] index Traditional solution This invention range of change Average build time per workflow 2.84s 1.63s Decrease of 42.61% Average number of intersecting edges in a single graph Article 37.2 Article 14.6 A decrease of 60.75% Average fault location time for abnormal instances 11.8min 4.9min A decrease of 58.47% First-time repair success rate 68.4% 86.9% An increase of 18.5 percentage points Number of manual reviews for a single anomaly 3.7 times 1.8 times A decrease of 51.35% Main path identification accuracy 71.2% 92.6% An increase of 21.4 percentage points

[0132] As shown in Table 1, this invention has achieved significant improvements in both workflow visualization construction and debugging. The average construction time decreased from 2.84 seconds to 1.63 seconds, indicating that after forming the main trajectory and unfolded set based on the execution contract signature, the trajectory organization is more compact, reducing the interference of repeated segments on the graph construction process. The average number of intersecting edges per graph decreased to 14.6, indicating that the improved DynNoSlice spatiotemporal graph can more effectively distinguish the main path, unfolded path, and anomaly propagation path under residual field adjustment. The average fault location time for anomaly instances decreased from 11.8 minutes to 4.9 minutes, and the first-time repair success rate increased to 86.9%, indicating that after the reversible repair front is embedded in the cut area, the fault location and repair link can be directly compared in the same graph, reducing the number of times manual switching between logs, flowcharts, and node states is required. The number of manual reviews decreased to 1.8, further demonstrating that this invention can improve the intuitiveness of the debugging process and the ability to interpret results, thereby achieving the advantages of improving workflow visualization construction efficiency, fault location efficiency, and debugging success rate.

[0133] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for visually constructing and debugging intelligent agent workflows based on reinforcement learning, characterized in that, The steps include the following: Step 1: Obtain the agent workflow execution data and policy decision data. Sort the agent workflow execution data by time position and associate it by node dependency to form a continuous time series. Sort the policy decision data by time position to form a policy sequence. Step 2: Extract execution contract features from continuous time series, generate execution contract signatures based on execution contract features, and merge execution fragments based on execution contract signatures to form the main trajectory and expansion set; Step 3: Construct an improved DynNoSlice spatiotemporal graph based on node dependencies, temporal positions, main trajectories, and expanded sets; Step 4: Perform RUDDER reinforcement learning reward redistribution on the policy sequence to form a reward redistribution sequence. Propagate and aggregate the reward redistribution sequence along node dependencies to form a residual field. Step 5: Adjust and improve the spatial metric in the DynNoSlice spatiotemporal diagram based on the residual field to form a metric map; Step 6: Locate the fault position from the continuous time series, extract atomic repair operations, and merge atomic repair operations according to compatibility constraints and reversibility constraints to form a reversible repair front. Step 7: Cut the main trajectory along the fault location in the measurement map, embed the reversible repair front into the cut area, and apply a re-sinking constraint to the embedded trajectory to form a debugging trajectory map; Step 8: Perform an improved DynNoSlice iterative layout solution on the debugging trajectory graph, and output the visualized construction results and debugging results of the agent workflow.

2. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step one specifically involves: Collect node execution records, edge flow records, and time records during the execution of the intelligent agent workflow. Then, aggregate the node execution records, edge flow records, and time records according to the workflow instance identifier to form intelligent agent workflow execution data. Extract node identifiers, start node identifiers, end node identifiers, execution start time, execution end time, and state transition flags from the intelligent agent workflow execution data, and map the start node identifiers and end node identifiers to node identifiers to form node dependency relationships; The execution records of nodes in the intelligent agent workflow execution data are sorted according to the execution start time, and the node dependencies are mapped to the sorted node execution records to form a continuous time sequence. Collect status records, action records, reward records, and decision time records during the intelligent agent's workflow decision-making process, and aggregate them according to workflow instance identifiers to form strategy decision data; Extract status identifiers, action identifiers, reward values, and decision times from the strategy decision data. Sort the status identifiers, action identifiers, and reward values ​​according to the decision time, and map the decision time to the time position in the continuous time series to form a strategy sequence.

3. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step two specifically involves: The execution records of nodes in a continuous time sequence are checked for continuity based on node dependencies and time positions. Node execution records that maintain connectivity in node dependencies and continuity in time positions are divided into execution segments. The input state marker, output state marker, checkpoint marker, and side effect domain marker are extracted from the execution segment. The input state marker, output state marker, checkpoint marker, and side effect domain marker are combined according to their corresponding time positions within the execution segment to form the execution contract features. The execution contract features are sequentially encoded, and the input state marker, output state marker, checkpoint marker, and side effect domain marker in the execution contract features are written into a unified encoding structure to form the execution contract signature. The execution contract signatures are matched and compared. Execution segments with the same execution contract signature are merged into the same signature sequence, and the execution segments in the same signature sequence are connected according to their time position to form the main trajectory. Execution segments that do not enter the main trajectory in a continuous time series are grouped according to their time position and node dependency to form an expanded set.

4. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step three specifically involves: The connection direction between node execution records is determined by the start node identifier and the end node identifier in the node dependency relationship, and the order of node execution records in a unified time axis is determined by the time position. The connection direction and the order of arrangement are combined to form a spatiotemporal framework. The execution segments in the main trajectory are projected to their positions in the spatiotemporal framework according to their time positions, and the execution segments are connected according to the time order and node dependencies in the main trajectory to form the main path; The execution fragments in the expanded set are projected to their positions in the spatiotemporal framework according to their time positions, and the execution fragments in the expanded set are connected to the execution fragments in the main path according to the node dependencies to form the expanded path; Temporal connectivity is performed on the temporal progression relationship between each execution segment in the main path, temporal connectivity is performed on the temporal progression relationship between each execution segment in the expanded path, and cross connectivity is performed on the node dependency relationship between the main path and the expanded path to form a spatiotemporal connection relationship. The main path, the expanded path, and the spatiotemporal connection relationships are configured into the spatiotemporal framework, and the main path and the expanded path are expressed as continuous trajectories to form an improved DynNoSlice spatiotemporal graph.

5. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step four specifically involves: Extract state identifiers, action identifiers, reward values, and decision times from the strategy sequence, and synchronize the state identifiers, action identifiers, and reward values ​​according to the decision time to form a decision trajectory; The status and action markers in the decision trajectory are combined into decision units according to time and location, and the reward value is written into the decision unit according to the decision time to form a decision unit sequence. RUDDER reinforcement learning reward redistribution is performed on the decision unit sequence, decomposing the reward value from the original decision unit where the decision time was located to the decision unit that caused the change in cumulative reward, forming a redistributed reward value; Arrange the redistributed reward values ​​according to the decision time to form a reward redistribution sequence; The redistribution reward values ​​in the reward redistribution sequence are mapped to the node execution records in the node dependencies, and propagation aggregation is performed on the redistribution reward values ​​along the node dependencies to form a residual field.

6. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step five specifically involves: Extract the residual values ​​corresponding to the node execution records from the residual field, and map the residual values ​​to the execution fragments in the improved DynNoSlice spatiotemporal graph according to the time position to form fragment residual records; Based on the fragment residual records, the spacing adjustment between adjacent execution fragments, the curvature adjustment of the connection position between adjacent execution fragments, and the density adjustment in the adjacent regions of time position are calculated to form a set of spatial metric parameters; The spacing adjustment amount in the spatial metric parameter set is configured between the main trajectory and adjacent execution segments in the unfolded set, the curvature adjustment amount in the spatial metric parameter set is configured at the connection position between adjacent execution segments, and the density adjustment amount in the spatial metric parameter set is configured at the distribution position of execution segments in the adjacent regions of time position, thus forming a spatial metric constraint set; Based on the spatial metric constraint set, the execution fragment positions and connection patterns in the improved DynNoSlice spatiotemporal graph are updated with metrics to form a metric graph.

7. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step six specifically involves: Based on the state transition markers and time positions in the continuous time sequence, anomalies are screened in the node execution records. The state transition break position, state transition bounce position, and state stagnation position are mapped to the node execution records in the continuous time sequence to form the fault position. The faulty execution segment is extracted from the main trajectory along the fault location, and related execution segments are extracted from the expanded set according to the node dependency relationship to form a set of repair candidate segments; The node dependencies and temporal connections are adjusted around the set of candidate fragments to be repaired, generating a visual trajectory graph that can be used to assist debugging. This includes replacement, insertion, rollback, and reconnection operations, forming an atomic repair operation. Matching and validation are performed on the input state markers, output state markers, and node dependencies in the atomic repair operation to form compatibility constraints. Rollback validation is performed on the checkpoint markers, side effect domain markers, and time positions in the atomic repair operation to form reversible constraints. Atomic repair operations that satisfy compatibility and reversibility constraints are connected according to node dependencies and arranged according to time position to form a reversible repair front.

8. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step seven specifically involves: Based on the time position of the fault location in the measurement map and the connection position in the main trajectory, the cut start point and cut end point are determined, and the main trajectory segment between the cut start point and cut end point is determined as the cut area; The main trajectory is decomposed into preceding and following trajectories along the cut start and cut end points, while maintaining the spatial metric relationship between the preceding and following trajectories in the metric graph. The reversible repair front is mapped into the cut area according to its time position, so that the reversible repair front forms a repair trajectory in the cut area, and the front end of the reversible repair front is connected to the preceding trajectory, and the end end of the reversible repair front is connected to the following trajectory. Based on node dependencies and time positions, the connection positions between the repair trajectory, preceding trajectory, and subsequent trajectory are matched and adjusted to form an embedded trajectory; Apply re-sinking constraints to the embedded trajectory to ensure that the connection positions at the end of the embedded trajectory and the subsequent trajectory maintain consistency in time progression and node dependency, thus forming a debugging trajectory diagram.

9. The method for visually constructing and debugging an intelligent agent workflow based on reinforcement learning according to claim 1, characterized in that, Step eight specifically involves: Extract the execution fragment positions, connection positions, and spatial metric relationships from the debug trajectory diagram, and map the execution fragment positions, connection positions, and spatial metric relationships to the layout units in the improved DynNoSlice iterative layout solver to form a layout solver record; Based on the layout solver record, calculate the execution fragment position adjustment amount and the connection position shape adjustment amount, map the execution fragment position adjustment amount to the execution fragment position, and map the connection position shape adjustment amount to the connection position to form a layout adjustment parameter set; Based on the layout adjustment parameter set, perform a round of layout updates on the execution segment positions and connection position shapes in the debug trajectory diagram to form an updated trajectory diagram; The difference between the execution fragment position and connection position shape in the updated trajectory diagram and the execution fragment position and connection position shape in the debug trajectory diagram is calculated. The difference result is compared with the convergence threshold. The iteration stops when the difference result meets the convergence threshold. When the difference result does not meet the convergence threshold, the updated trajectory diagram is used as the current trajectory diagram and the layout update is re-executed. Output the updated trajectory map that meets the convergence threshold. The distribution results of the execution segments in the updated trajectory map are determined as the visualization construction results of the agent workflow. The fault location, reversible repair front and trajectory re-merging results in the updated trajectory map are determined as the debugging results.