Intelligent agent process debugging method and device, equipment and medium
By collecting and storing complete execution state snapshots of agent process nodes and using a difference analysis engine for visual comparison, the problem of high cost and low efficiency in agent process debugging is solved, enabling rapid location of error root causes and efficient debugging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-10
AI Technical Summary
Existing intelligent agent process debugging is costly and inefficient, and cannot effectively retain intermediate states to facilitate problem localization and repair.
It collects and stores complete execution status snapshots of each node in the process in real time, including runtime context, tool call information and large language model thought chain output, and uses a difference analysis engine for visualization comparison to help users locate differences.
Quickly pinpointing the root cause of errors reduces debugging costs, improves debugging efficiency, and avoids wasting time and resources by repeatedly running the entire process.
Smart Images

Figure CN122364053A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software development technology, and in particular to a method, apparatus, device, and medium for debugging intelligent agent processes. Background Technology
[0002] With the deep application of large language models in key areas such as fintech and healthcare, agent workflows have become a core technology for automating complex business processes (such as financial due diligence, contract review, and data analysis). Users connect multiple functional nodes into complex processes of dozens of steps using a low-code orchestration canvas. However, because the execution of agent workflows is instantaneous and state-driven, if a process fails at an intermediate node, the execution state of all previous nodes, including the complete context, intermediate variables, the original inputs / outputs of tool calls, and the output of the large language model's thought chain, will be lost. Users cannot "pause" or set breakpoints at any node to examine and modify the intermediate states during runtime, as is possible in traditional software development. They can only rely on guesswork and manual reconstruction of the state, making the debugging process like a black box. Because intermediate states cannot be preserved, when users discover that errors in later nodes of the process originate from earlier nodes (for example, in a financial transaction process, an error in market data parsing in step 3 leads to a failed risk control decision in step 10; or in a medical process, an abnormal extraction of examination indicators in step 3 leads to a biased assessment of the patient's condition in step 10), the only way to fix it is to run the entire process from scratch. This not only consumes a lot of time and significantly increases development and debugging costs, but also makes locating problems inefficient. Summary of the Invention
[0003] This invention provides a method, apparatus, device, and medium for debugging intelligent agent processes, in order to solve the technical problems of high cost and low efficiency in existing intelligent agent process debugging.
[0004] Firstly, a method for debugging intelligent agent processes is provided, including: During the execution of the intelligent agent process, complete execution state snapshots of each node in the process are collected and stored in real time. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. In response to the user's debugging and comparison command, the difference analysis engine is invoked to calculate and visualize the difference information between at least two selected state snapshots to assist the user in locating differences in process execution.
[0005] Secondly, an intelligent agent process debugging device is provided, comprising: The acquisition and storage unit is used to acquire and store complete execution state snapshots of each node in the process in real time during the execution of the intelligent agent process. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. The calculation and display unit is used to respond to the user's debugging and comparison command, call the difference analysis engine to calculate and visualize the difference information between at least two selected state snapshots, so as to assist the user in locating the differences in the process execution.
[0006] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described intelligent agent process debugging method.
[0007] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described intelligent agent process debugging method.
[0008] In the above-mentioned intelligent agent process debugging method, device, computer equipment and storage medium, the complete execution state snapshot of each node in the process can be collected and stored in real time during the execution of the intelligent agent process. Each execution state snapshot includes at least the node's runtime context, tool call information and large language model thought chain output information. In response to the user's debugging and comparison commands, the difference analysis engine is invoked to calculate and visualize the difference information between at least two selected state snapshots, assisting the user in locating differences in process execution. In this invention, by collecting and persisting a complete execution state snapshot of each node, the problem of instantaneous state loss is solved; through the difference analysis engine, the snapshot differences of different execution paths can be intuitively compared, quickly locating the root cause of errors and avoiding the waste of time and resources caused by rerunning the entire process due to a single node error. This not only reduces debugging costs but also improves debugging efficiency. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart illustrating an intelligent agent process debugging method according to an embodiment of the present invention; Figure 2 yes Figure 1A schematic diagram of a specific implementation of step S120; Figure 3 This is a flowchart illustrating an intelligent agent process debugging method according to another embodiment of the present invention; Figure 4 yes Figure 1 A schematic diagram of a specific implementation of step S130; Figure 5 This is a schematic block diagram of an intelligent agent process debugging device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 7 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] The intelligent agent process debugging method provided in this invention can be applied to either a client or a server. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. Currently, in the fintech and healthcare fields, existing intelligent agent process debugging methods suffer from high costs and low efficiency. To address these issues, this invention proposes an intelligent agent process debugging method. This method solves the problem of instantaneous state loss by collecting and persisting a complete execution state snapshot of each node. Through a difference analysis engine, it can intuitively compare the snapshot differences of different execution paths, quickly locate the root cause of errors, and avoid the waste of time and resources caused by rerunning the entire process due to a single node error. This not only reduces debugging costs but also improves debugging efficiency. The invention will be described in detail below through specific embodiments.
[0013] Please see Figure 1 As shown, Figure 1 A flowchart of an intelligent agent process debugging method provided in an embodiment of the present invention includes the following steps: S110-S120.
[0014] S110. During the execution of the intelligent agent process, real-time collection and storage of complete execution state snapshots of each node in the process, wherein each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information.
[0015] Specifically, each of the aforementioned execution state snapshots S i It can be characterized as: S i =Snapshot(Context i Tools i ,LLM_Output i ), where Context i Captures the complete runtime context at the moment of execution of node i, including all input parameters, intermediate variables, key business variables, memory state, and environment configuration, providing accurate on-site reconstruction for state backtracking; Tools i It records detailed information about all tools (such as APIs, functions, etc.) called by this node, including call parameters, return results, execution status, and execution time, ensuring the traceability of external dependencies and interaction processes; LLM_Output i This fully preserves the thought chain output information of the large language model at this node, that is, the logical text of the entire process of the model's reasoning, judgment and generation, thereby transforming the "black box" decision into a semantic trajectory that can be reviewed and analyzed.
[0016] Understandably, this snapshot mechanism, through the persistent recording of the runtime context, enables the complete restoration of the execution environment at any historical node, thoroughly solving the problem of lost debugging information caused by the transient nature of the agent's process state. The structured storage of tool call information not only supports the review of tool usage efficiency and correctness but also provides data support for process optimization and automated regression testing. Furthermore, the complete preservation of the output information of the large language model's thought chain significantly enhances the interpretability and transparency of the agent system, enabling developers to deeply understand the model's reasoning path and locate logical deviations, thereby fundamentally improving the reliability, maintainability, and debugging efficiency of complex agent workflows.
[0017] S120. In response to the user's debugging comparison command, the difference analysis engine is invoked to calculate and visualize the difference information between the selected at least two state snapshots to assist the user in locating the differences in process execution.
[0018] Specifically, the runtime context includes key business variables, responds to user debugging and comparison commands, calls the difference analysis engine, performs multi-dimensional difference calculations on at least two state snapshots selected by the user to generate a comprehensive difference score, and then visualizes the difference information in a side-by-side comparison view in the visualization interface, transforming the debugging process that originally required manual line-by-line comparison into automated intelligent analysis, which greatly reduces the debugging difficulty and time cost of complex intelligent agent workflows.
[0019] Among them, such as Figure 2 As shown, step S120 includes steps S121-S122: S121. Extract the values of the key business variables and the output information of the large language model thinking chain from at least two selected state snapshots, and calculate the comprehensive debugging difference score based on the values of the key business variables and the output information of the large language model thinking chain. S122. In the side-by-side comparison view of the debugging interface, the contents of the at least two state snapshots are presented, and the values of the key business variables with the highest degree of difference and the output information of the large language model thinking chain are highlighted according to the comprehensive debugging difference score.
[0020] Specifically, from at least two selected state snapshots, the difference analysis engine first precisely extracts the values of key business variables representing the core business logic of the process, such as the amount in financial transactions, the indicator thresholds in medical diagnosis, and the time nodes in contract review. These variables are the quantitative basis for influencing the process direction and decision-making results. Simultaneously, the difference analysis engine extracts the thought chain output information generated by the large language model, that is, the complete reasoning process, decision basis, and logical chain text displayed by the model when completing a specific node task. Based on the extracted values of key business variables and the thought chain output information of the large language model, the difference analysis engine performs comprehensive analysis and calculation through a multi-dimensional difference calculation model to generate a comprehensive debugging difference score. This score not only reflects changes in surface data but also reveals the profound impact of underlying logical evolution on the process execution results. In the visualization stage, a side-by-side comparison view is generated in the debugging interface, fully displaying the content framework of the selected state snapshots. Based on the calculated comprehensive debugging difference score, the most significant differences are automatically highlighted: for key business variables, visual markers are added next to their values, indicating the magnitude of the change and its business implications; for the output of the large language model's thought chain, text paragraphs where logical transitions, premise changes, or conclusion reconstructions occur are highlighted with background color and focused display. Through this targeted visualization enhancement, developers can instantly capture the core differences that cause the process execution path to branch or fail, thus transforming the debugging process, which originally required manual backtracking and speculation, into precise problem localization based on data and semantics. This greatly improves the debugging and verification efficiency and root cause analysis accuracy of complex intelligent agent workflows.
[0021] In one embodiment, such as this embodiment, the step of calculating the comprehensive debugging difference score based on the values of the key business variables and the output information of the large language model's thought chain includes: calculating the numerical difference measure between the values of the key business variables and the semantic difference measure between the output information of the large language model's thought chain; and fusing the numerical difference measure and the semantic difference measure by weighted summation to generate the comprehensive debugging difference score. Specifically, when calculating the comprehensive debugging difference score, the difference analysis engine first quantifies the differences in the values of key business variables (such as amount, date, status identifier, etc.). This process is usually based on normalized distance measures (such as Euclidean distance, relative error, etc.) to assess the degree of deviation of the values of the same variable in two state snapshots, so as to accurately capture the impact of changes in key data in the business process. At the same time, semantic difference analysis is performed on the output information of the large language model's thought chain in the two state snapshots. This step usually uses a pre-trained language model (such as BERT) to generate text embeddings, and then uses cosine similarity or a difference calculation model based on attention mechanism to quantify the degree of semantic consistency or deviation between the two thought chains in terms of logical reasoning, factual basis, and conclusion derivation. Based on this, the two types of difference measures are fused using a weighted summation method, that is, the final comprehensive debugging difference score D(S) is calculated according to the preset weight coefficients λ1 and λ2. i , S i' The comprehensive debugging difference score is calculated as follows: λ1·VarDiff + λ2·CoT_SemanticDiff, where VarDiff is a measure of the numerical difference between key business variables, and CoT_SemanticDiff is a measure of the semantic difference between the output information of the large language model's thought chain. This comprehensive debugging difference score not only reflects changes at the business data level but also incorporates semantic changes in the model's reasoning logic, thus providing developers with a unified difference indicator that includes both numerical interpretability and semantic traceability. Understandably, the comprehensive debugging difference score enhances the visualization of significantly different parts, helping users quickly locate key variable changes and logical reasoning inflection points that lead to process execution divergences, achieving accurate and efficient agent process debugging.
[0022] In one embodiment, such as this embodiment, the step of extracting the values of the key business variables from the selected at least two state snapshots includes: based on predefined business rules, filtering variables related to the core logic of the process from the runtime context of the selected at least two state snapshots as the key business variables; and / or The system receives and applies user tags to specify key business variables from the runtime context; it then extracts the values of these key business variables, which include at least one of amount, date, and status identifier. Specifically, before the difference analysis begins, a deep analysis is performed on the runtime context of two or more selected state snapshots based on predefined business rules. These business rules are defined according to process models in different domains (e.g., focusing on amount, interest rate, and term in financial scenarios, and focusing on indicator values, diagnostic codes, and time nodes in medical processes), automatically identifying and filtering variables closely related to the core logic of the current agent process and marking them as key business variables. Simultaneously, interactive user tagging is supported, allowing developers to manually specify specific context variables (such as temporary intermediate results) as key business variables during debugging, achieving a combination of rules and manual intervention. The key business variables identified by both methods cover basic types such as amount, date, and status identifier, and can be extended to enumerated values, Boolean flags, and structured objects. After identification, the values of these key business variables are accurately extracted from the runtime context of each state snapshot. For monetary variables, their numerical representation and currency unit are extracted; for date variables, a timestamp or formatted date string is obtained; for status identifiers, their enumeration value or semantic label is extracted. This extraction process ensures that subsequent difference calculations are based on a unified and comparable data representation.
[0023] Figure 3 This is a flowchart illustrating a method for debugging an intelligent agent process according to another embodiment of the present invention, as shown below. Figure 3 As shown, in this embodiment, the method includes steps S110-S130. That is, in this embodiment, the method further includes step S130 after step S120 in the above embodiment.
[0024] S130. In response to the user's debug rollback command, load the selected target state snapshot, and resume the execution of subsequent processes from the node corresponding to the selected target state snapshot according to the debugged and modified state, so as to obtain the debugged and modified results.
[0025] Specifically, in response to the user's debug rollback command, the selected target state snapshot is loaded. This target state snapshot typically originates from problem nodes identified through previous comparative analysis. Users can directly modify the values of key business variables or the thought chain content of the large language model in this snapshot within the interface, forming a new, debugged state. Based on this corrected state, subsequent processes will be re-executed from the corresponding node, consuming computational resources and API calls only in subsequent nodes, thus obtaining the debugged and modified running results. This mechanism is directly integrated with the comparative analysis phase: after identifying the key differences causing process forks or failures during the comparative analysis phase, users can immediately initiate a rollback debug for that node's state, achieving a complete debug loop of "identifying problems - locating differences - modifying states - verifying effects." Compared to traditional debugging methods that require restarting the entire process, this method improves debugging efficiency several times over and significantly reduces resource consumption caused by repeated execution.
[0026] Among them, such as Figure 4 As shown, step S130 includes steps S131-S134: S131. In the debugging interface, load and display the complete content of the target state snapshot finally selected by the user; S132. Based on the complete content shown, receive user's debugging and modification operation on at least one parameter or context in the target state snapshot to generate a corrected process state. S133. Based on the corrected process state, locate the debugging execution breakpoint of the process to the node corresponding to the target state snapshot; S134. Based on the corrected process state, starting from the debug execution breakpoint, only the process logic of subsequent nodes is executed to obtain the debug modification result.
[0027] Specifically, in the debugging interface, the system first responds to the user's final selection, loading and fully displaying the entire content of the selected target state snapshot. For example, in a contract review agent process, if the user selects a state snapshot that previously failed in step five due to "missing contracting entity information," the interface will clearly display all information from that node's execution: including context variables passed from upstream nodes (such as contract amount, contracting party name, and clause list), the results of executed tool calls (such as business registration information retrieved from the enterprise database), and the output information of the thought chain generated by the large language model (such as the complete logical chain of the model inferring "cannot continue temporarily due to inability to verify the client's qualifications" based on the query results). This complete display provides the user with all the on-site information needed to fix the problem. Based on the complete content displayed, the user can directly modify one or more parameters or contexts in the snapshot. Continuing the example above, the user can manually complete the correct full company name in the "Contracting Party Name" field or revise the reasoning premise about "missing qualifications" in the large language model's thought chain, thereby generating a corrected process state. This modification is treated as a deliberate debugging intervention. Based on the corrected state, the debugging execution breakpoint is precisely locked to the fifth step node corresponding to the original target snapshot. Finally, based on this corrected process state, starting from the fifth step debugging execution breakpoint, only the logic execution of subsequent nodes (the sixth step and subsequent contract risk clause analysis, compliance verification, summary generation, etc.) is driven. The first four steps, which have already been verified, are no longer repeated, thus saving significant computing resources and API call costs while quickly obtaining the complete execution result after this debugging modification. Through this mechanism, users can efficiently and accurately verify whether local modifications have resolved process blockages, achieving targeted repair and rapid iteration of the intelligent agent process.
[0028] In one embodiment, such as this embodiment, after step S120 or step S130, the method further includes: associating and storing all state snapshots generated from multiple debug runs of the same intelligent agent process; establishing an index for the associated state snapshots, wherein the index includes at least execution time, node identifier, key business variables, and execution result; receiving user search conditions, wherein the search conditions are based on at least one dimension in the index; searching in all the associated state snapshots according to the search conditions, and returning a list of state snapshots that meet the search conditions; receiving user filtering operations on the list of state snapshots, and updating the displayed results based on the filtering operations. Specifically, all complete state snapshots generated from multiple debug runs associated with the same intelligent agent process are centrally associated and stored, and a traceable link between multiple versions is established through process identifiers and execution batches. On this basis, a structured index is established for each stored state snapshot, and the index dimensions include at least: execution time, node identifier (used to locate specific execution steps in the process), key business variables (such as snapshot values of core parameters such as amount, date, and status), and execution result (such as status markers such as success, failure, and exception). When a user initiates a search, the system receives their query conditions, freely combined based on the aforementioned index dimensions. For example, users can specify multi-dimensional filtering conditions such as "execution time within the last 24 hours," "node identifier is 'contract parsing'," "key business variable 'contract amount' is greater than 1 million," and "execution result is failure." Based on these structured conditions, the system efficiently searches all snapshots in the associated storage, leveraging the index to accelerate the query and quickly locate and return a list of status snapshots that perfectly match the search conditions, such as returning all debugging records where "amount exceeds one million and contract parsing node failed." Subsequently, users can further interactively filter the returned status snapshot list, such as sorting by key variable values, refining by time range, or grouping by execution result. The system responds to user filtering commands in real time, dynamically updating the list content and visual presentation results, thereby helping users quickly focus on the target snapshot in complex, multi-round debugging histories and supporting root cause analysis and process optimization based on historical execution data.
[0029] For ease of understanding, the intelligent agent process debugging method of the present invention will be illustrated with one example each from the fields of fintech and healthcare: In fintech credit approval scenarios, intelligent agent processes typically consist of dozens of nodes, including customer information acquisition, credit check, anti-fraud model invocation, credit limit and interest rate calculation model reasoning, and final approval decision. A financial institution deployed an automated credit approval workflow to process small online loan applications. In one approval process, a "rejection" decision was made after the "interest rate calculation" node. However, business personnel needed to investigate which step led to the rejection and whether it could be salvaged by adjusting parameters.
[0030] First, during process execution, a complete execution status snapshot of each node is collected and stored in real time. For example, in the "Credit Inquiry" node, the status snapshot records the request parameters of the external credit API called and the returned raw credit score; in the "Anti-Fraud Model" node, in addition to dozens of feature variables input to the model, the complete thought chain information output by the large language model is also saved. When business personnel find that a high-quality customer application has been rejected, they initiate a debugging comparison command, selecting another case with a similar background but approved for comparison. The difference analysis engine is invoked to extract key business variables from the status snapshots of the two cases, such as the values of "customer income," "credit score," and "debt-to-income ratio," as well as the thought chain output information of the large language model in the "Anti-Fraud Model" node and the "Credit Limit Calculation" node. The difference analysis engine calculation found that the numerical differences between the two cases are not significant, but the rejected case has a key semantic difference in the thought chain of the "Anti-Fraud Model" node: "The application device is a newly registered device with no historical behavior data, triggering a conservative strategy." Comprehensive debugging difference scoring shows that this semantic difference is the main reason for the subsequent "rejection" decision. Based on this analysis, business personnel initiated a rollback. A snapshot of the target state of the rejected cases at the "Anti-Fraud Model" node was loaded. Business personnel saw the complete context in the debugging interface, including the device information input to the model. They manually modified the interpretation of "new device" in the large language model's thought chain from "high risk triggering a conservative strategy" to "new customer, requires verification based on other strong features," and adjusted the corresponding risk weight parameters. After generating the corrected process state, execution was resumed directly from the "Anti-Fraud Model" node, skipping the already executed customer information acquisition and credit inquiry nodes, and re-running the subsequent credit limit calculation and approval decision. Ultimately, the process output "approved" with a reasonable credit limit. The entire process was completed within minutes, eliminating the need for time-consuming and costly external calls such as re-initiating a complete credit inquiry, significantly reducing debugging costs and improving efficiency. Furthermore, the state snapshots from each debugging run were linked, stored, and indexed. Business experts can quickly retrieve "all cases rejected due to the 'new device' rule within the past week" and filter relevant snapshots for batch analysis.
[0031] In the healthcare field, a hospital deployed an intelligent agent workflow for generating imaging examination reports to aid in diagnosis. This workflow integrates image preprocessing, AI lesion detection model invocation, key indicator extraction, and structured report generation and risk assessment based on a large language model. In a lung CT scan, the final report missed an important minor finding (such as mild emphysema). A doctor needed to investigate whether the AI model missed it or the large language model overlooked this information during report generation. During workflow execution, snapshots of each node's state were captured. At the "AI lesion detection" node, the snapshot saved the coordinates and confidence levels of all suspicious areas output by the model; at the "report generation" node, the snapshot fully recorded the large language model's thought process output. The doctor initiated a debugging comparison, selecting a high-quality report containing the description of "mild emphysema" as a benchmark. The difference analysis engine compared the snapshots of the two report generation nodes. Numerical discrepancy metrics revealed differences in the key business variable "number of secondary findings." Semantic discrepancy metrics pinpointed a break in semantic coherence in the large language model's thought process chain when enumerating secondary findings at a specific point. Comprehensive debugging discrepancy scoring clearly indicated that the core difference lay in the large language model's text generation logic for the feature "mild emphysema." Subsequently, the doctor initiated a debugging rollback, loading the target snapshot of the problem report at the "report generation" node. The debugging interface revealed the large language model's thought process before generating the complete report. It was discovered that the model, when listing findings, may have suppressed the description of "mild emphysema" due to the overly prominent "pulmonary nodule" feature mentioned earlier. The doctor manually added a stronger contextual prompt to the large language model's thought process input through the debugging interface: "Please pay special attention to and describe whether interstitial changes such as emphysema are present." After generating the corrected state, execution resumed from that node, rerunning only the latter half of the report generation logic. The newly generated report successfully included the description of "bilateral mild emphysema" and was formatted correctly. This debugging process quickly corrects report omissions without requiring the time-consuming AI detection model to be re-invoked or a doctor to rewrite the report from scratch. Simultaneously, snapshots of all such debugging cases are indexed and stored, allowing retrieval of "all cases modified at the report generation node," analysis of common neglect patterns in the large language model, and subsequent systematic optimization of prompt word templates or fine-tuning of the large language model, thereby continuously improving the reliability and completeness of the assisted diagnostic system.
[0032] The intelligent agent process debugging method in this invention solves the problem of instantaneous state loss by collecting and persisting a complete execution state snapshot of each node; through the difference analysis engine, the snapshot differences of different execution paths can be intuitively compared, the root cause of the error can be quickly located, and the time and resources wasted due to the need to rerun the entire process due to a single node error are avoided. This not only reduces debugging costs but also improves debugging efficiency.
[0033] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0034] The software tools or components not belonging to our company that appear in the embodiments of this application are merely examples and do not represent actual use.
[0035] In one embodiment, an agent process debugging device 200 is provided, which corresponds one-to-one with the agent process debugging method in the above embodiments. For example... Figure 5 As shown, the intelligent agent process debugging device 200 includes a data acquisition and storage unit 201 and a calculation and display unit 202. Detailed descriptions of each functional module are as follows: The acquisition and storage unit 201 is used to acquire and store complete execution state snapshots of each node in the process in real time during the execution of the intelligent agent process. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. The calculation and display unit 202 is used to respond to the user's debugging and comparison command, call the difference analysis engine to calculate and visualize the difference information between at least two selected state snapshots, so as to assist the user in locating the differences in the process execution.
[0036] In one embodiment, the calculation display unit 202 is specifically used for: Extract the values of the key business variables and the output information of the large language model thinking chain from at least two selected state snapshots, and calculate the comprehensive debugging difference score based on the values of the key business variables and the output information of the large language model thinking chain. In the side-by-side comparison view of the debugging interface, the contents of at least two state snapshots are presented, and the values of the key business variables with the highest degree of difference and the output information of the large language model thinking chain are highlighted according to the comprehensive debugging difference score.
[0037] In one embodiment, the calculation display unit 202 is further configured to: Calculate the numerical difference measure between the values of the key business variables and the semantic difference measure between the output information of the large language model thinking chain, respectively. The numerical difference measure and the semantic difference measure are fused by weighted summation to generate the comprehensive debugging difference score.
[0038] In one embodiment, the calculation display unit 202 is further configured to: Based on predefined business rules, variables related to the core logic of the process are selected as key business variables from the runtime contexts of at least two selected state snapshots; and / or Receive and apply user tags to specify the key business variables from the runtime context; Extract the values of the key business variables, wherein the key business variables include at least one of amount, date, and status identifier.
[0039] In one embodiment, the intelligent agent process debugging device 200 further includes: The loading execution unit is used to respond to the user's debug rollback command, load the selected target state snapshot, and resume the execution of subsequent processes from the node corresponding to the selected target state snapshot according to the debugged and modified state to obtain the debugged and modified results; A storage unit is used to associate and store all state snapshots generated from multiple debug runs of the same intelligent agent process; A creation unit is used to create an index for the state snapshot of the associated storage, wherein the index includes at least the execution time, node identifier, key business variables, and execution result; A receiving unit is configured to receive a user's search criteria, wherein the search criteria are based on at least one dimension in the index; The retrieval unit is configured to perform a retrieval in all the associated state snapshots according to the retrieval conditions, and return a list of state snapshots that meet the retrieval conditions; The update display unit is used to receive the user's filtering operation on the list of status snapshots and update the display results based on the filtering operation.
[0040] In one embodiment, the loading execution unit is specifically used for: In the debugging interface, the full content of the target state snapshot finally selected by the user is loaded and displayed; Based on the complete content shown, receive user debugging and modification operations on at least one parameter or context in the target state snapshot to generate a corrected process state; Based on the corrected process state, the debugging execution breakpoint of the process is located at the node corresponding to the target state snapshot; Based on the corrected process state, starting from the debug execution breakpoint, only the process logic of subsequent nodes is executed to obtain the debug modification result.
[0041] The intelligent agent process debugging device in this invention solves the problem of instantaneous state loss by collecting and persisting a complete execution state snapshot of each node; through the difference analysis engine, the snapshot differences of different execution paths can be compared intuitively, the root cause of the error can be quickly located, and the time and resources wasted due to the need to rerun the entire process due to a single node error are avoided. This not only reduces debugging costs but also improves debugging efficiency.
[0042] Specific limitations regarding the intelligent agent process debugging device can be found in the limitations of the intelligent agent process debugging method described above, and will not be repeated here. Each unit in the aforementioned intelligent agent process debugging device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0043] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side intelligent agent process debugging method.
[0044] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of an intelligent agent process debugging method.
[0045] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: During the execution of the intelligent agent process, complete execution state snapshots of each node in the process are collected and stored in real time. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. In response to the user's debugging and comparison command, the difference analysis engine is invoked to calculate and visualize the difference information between at least two selected state snapshots to assist the user in locating differences in process execution.
[0046] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: During the execution of the intelligent agent process, complete execution state snapshots of each node in the process are collected and stored in real time. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. In response to the user's debugging and comparison command, the difference analysis engine is invoked to calculate and visualize the difference information between at least two selected state snapshots to assist the user in locating differences in process execution.
[0047] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0048] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0049] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0050] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0051] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for debugging intelligent agent processes, characterized in that, include: During the execution of the intelligent agent process, complete execution state snapshots of each node in the process are collected and stored in real time. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. In response to the user's debugging and comparison command, the difference analysis engine is invoked to calculate and visualize the difference information between at least two selected state snapshots to assist the user in locating differences in process execution.
2. The intelligent agent process debugging method as described in claim 1, characterized in that, The runtime context includes key business variables; The step of calling the difference analysis engine to calculate and visualize the difference information between the selected at least two state snapshots includes: Extract the values of the key business variables and the output information of the large language model thinking chain from at least two selected state snapshots, and calculate the comprehensive debugging difference score based on the values of the key business variables and the output information of the large language model thinking chain. In the side-by-side comparison view of the debugging interface, the contents of at least two state snapshots are presented, and the values of the key business variables with the highest degree of difference and the output information of the large language model thinking chain are highlighted according to the comprehensive debugging difference score.
3. The intelligent agent process debugging method as described in claim 2, characterized in that, The step of calculating the comprehensive debugging difference score based on the values of the key business variables and the output information of the large language model's thought chain includes: Calculate the numerical difference measure between the values of the key business variables and the semantic difference measure between the output information of the large language model thinking chain, respectively. The numerical difference measure and the semantic difference measure are fused by weighted summation to generate the comprehensive debugging difference score.
4. The intelligent agent process debugging method as described in claim 2, characterized in that, The step of extracting the values of the key business variables from at least two selected state snapshots includes: Based on predefined business rules, variables related to the core logic of the process are selected as key business variables from the runtime contexts of at least two selected state snapshots; and / or Receive and apply user tags to specify the key business variables from the runtime context; Extract the values of the key business variables, wherein the key business variables include at least one of amount, date, and status identifier.
5. The intelligent agent process debugging method as described in claim 1, characterized in that, The method further includes: In response to the user's debug rollback command, the selected target state snapshot is loaded, and the subsequent process is resumed from the node corresponding to the selected target state snapshot based on the debugged and modified state to obtain the debugged and modified results.
6. The intelligent agent process debugging method as described in claim 5, characterized in that, The steps of loading the selected target state snapshot and resuming the subsequent process from the node corresponding to the selected target state snapshot based on the debugged and modified state to obtain the debugged and modified results include: In the debugging interface, the full content of the target state snapshot finally selected by the user is loaded and displayed; Based on the complete content shown, receive user debugging and modification operations on at least one parameter or context in the target state snapshot to generate a corrected process state; Based on the corrected process state, the debugging execution breakpoint of the process is located at the node corresponding to the target state snapshot; Based on the corrected process state, starting from the debug execution breakpoint, only the process logic of subsequent nodes is executed to obtain the debug modification result.
7. The intelligent agent process debugging method as described in claim 1, characterized in that, The method further includes: All state snapshots generated from multiple debugging runs of the same intelligent agent process are stored together. An index is created for the state snapshot of the associated storage, wherein the index includes at least the execution time, node identifier, key business variables, and execution result; Receive user search criteria, wherein the search criteria are based on at least one dimension in the index; Based on the search criteria, a search is performed in all the associated state snapshots, and a list of state snapshots that meet the search criteria is returned. Receive user filtering operations on the list of status snapshots, and update the displayed results based on the filtering operations.
8. A smart agent process debugging device, characterized in that, include: The acquisition and storage unit is used to acquire and store complete execution state snapshots of each node in the process in real time during the execution of the intelligent agent process. Each execution state snapshot includes at least the node's runtime context, tool call information, and large language model thought chain output information. The calculation and display unit is used to respond to the user's debugging and comparison command, call the difference analysis engine to calculate and visualize the difference information between at least two selected state snapshots, so as to assist the user in locating the differences in the process execution.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent agent process debugging method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent agent process debugging method as described in any one of claims 1 to 7.