Agent framework with debugging optimization function and debugging optimization method

Through the Agent framework with debugging and optimization functions, it supports multiple execution modes and data snapshot management, solving the problem of low debugging efficiency during the Agent development process, and achieving efficient debugging and rapid testing.

CN120448244APending Publication Date: 2025-08-081DATA TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510598451.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The debugging methods during the existing Agent development process affect debugging efficiency, especially when repeatedly debugging some node Prompts or tools in complex workflows, resulting in a sharp increase in overall debugging time.

Method used

It provides an Agent framework with debugging and optimization functions, including execution mode selection module, data storage module, breakpoint configuration module and debugging optimization module, supports non-debug mode, debug mode and local debugging mode, and optimizes the debugging process through data snapshots, breakpoint management and suspend state management.

Benefits of technology

By reducing debugging time and improving debugging efficiency, developers are allowed to assist in analyzing the causes of problems based on visual running data and quickly test the node modification effect, achieving efficient production of agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448244A_ABST
    Figure CN120448244A_ABST
Patent Text Reader

Abstract

The invention provides an Agent framework with a debugging optimization function and a debugging optimization method. An execution mode selection module is used for providing multiple execution modes for a user; the data storage module is used for performing data snapshot on input data before operation of each node and then storing the data during operation in a debugging mode or a local debugging mode, and starting and operating a specific node after calling the stored snapshot data according to user requirements in the local debugging mode; the breakpoint configuration module is used for adding or deleting breakpoints to nodes in a non-running state according to user requirements in a debugging mode or a local debugging mode, and changing the state of the nodes with the breakpoints into a suspended state in a running state; and the debugging optimization module is used for displaying or modifying the snapshot data to the user according to a related instruction input by the user in the suspended state, or recovering the state of the node in the suspended state to the running state so as to achieve the purpose of efficiently manufacturing the Agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to an Agent framework with debugging and optimization functions and a debugging and optimization method. Background Art

[0002] Currently, during agent development, developers generally rely on agent frameworks to assist in orchestrating the agent. However, creating a stable and usable agent is extremely time-consuming, and developers often repeatedly test the agent to ensure that customers do not encounter unexpected issues. For example, prompts and tool execution within the agent often require repeated debugging, especially for commercially delivered agents, whose workflows are extremely complex.

[0003] Existing tuning methods typically involve developers reviewing the final output and identifying issues. Alternatively, developers can prematurely terminate the workflow to assess the output of process nodes and determine if there are any issues. Once the issues are resolved, the workflow can be restored. Repeated debugging of prompts or tools at certain nodes during this process can significantly increase overall debugging time, impacting debugging efficiency. Summary of the Invention

[0004] The purpose of this application is to solve at least one of the above technical deficiencies, especially the technical defect in the prior art that the debugging method of Agent during the development process affects the debugging efficiency.

[0005] This application provides an Agent framework with debugging and optimization functions, which includes:

[0006] An execution mode selection module is used to provide a plurality of execution modes to the user, wherein the execution modes include non-debugging mode, debugging mode and local debugging mode, and each execution mode has a different execution method;

[0007] a data storage module for storing a data snapshot of input data before each node is run when running in the debugging mode or the local debugging mode, and for starting and running a specific node after retrieving the stored snapshot data according to user needs in the local debugging mode;

[0008] A breakpoint configuration module, configured to add or delete breakpoints for nodes in a non-running state according to user needs in the debugging mode or the local debugging mode, and to change the state of nodes with breakpoints to a suspended state in the running state;

[0009] The debugging and optimization module is used to display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the node in the suspended state to the running state.

[0010] Optionally, the framework further includes:

[0011] The no-breakpoint suspension module is used to receive a suspension instruction initiated by a user for a node in a running state in the debugging mode or the local debugging mode, and when there is no breakpoint in the node in the running state, wait for the node in the running state to complete its operation and then change its state to a suspended state.

[0012] Optionally, the framework further includes:

[0013] The instruction shielding module is used to shield the data modification instructions initiated by the user in the non-suspended state.

[0014] Optionally, the process of displaying snapshot data corresponding to the node in the suspended state to the user according to the relevant instruction input by the user includes:

[0015] The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

[0016] Optionally, the process of saving the user's modification operation on the snapshot data according to the relevant instruction input by the user includes:

[0017] The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.

[0018] The present application also provides a debugging and optimization method, which is applied to the Agent framework with debugging and optimization functions described in any one of the above embodiments, and the method includes:

[0019] When running in debug mode or local debug mode, a snapshot of the input data before each node is run is stored, and the state of the node with a breakpoint is changed to suspended state;

[0020] In the suspended state, according to the relevant instructions input by the user, the snapshot data corresponding to the node in the suspended state is displayed to the user, the user's modification operation on the snapshot data is saved, or the state of the node in the suspended state is restored to the running state.

[0021] Optionally, the method further includes:

[0022] In the local debugging mode, a specific node is started and run after the stored snapshot data is retrieved according to user needs.

[0023] Optionally, the method further includes:

[0024] In the debugging mode or the local debugging mode, a suspend instruction initiated by a user for a node in a running state is received, and when the node in the running state has no breakpoints, the state of the node in the running state is changed to a suspended state after the node has finished running.

[0025] Optionally, displaying snapshot data corresponding to the node in the suspended state to the user according to the relevant instruction input by the user includes:

[0026] The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

[0027] Optionally, the step of saving the user's modification operation on the snapshot data according to the relevant instruction input by the user includes:

[0028] The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.

[0029] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0030] The present application provides an Agent framework and debugging optimization method with debugging and optimization functions. The framework includes an execution mode selection module, which is used to provide users with multiple execution modes, including non-debugging mode, debugging mode and local debugging mode. Each execution mode has a different execution method, so that users can select the corresponding execution mode to perform related tasks according to their own needs; the data storage module is used to take a data snapshot of the input data before each node runs when running in debugging mode or local debugging mode, and in local debugging mode, after retrieving the stored snapshot data according to user needs, start and run a specific node. In this way, when debugging some node prompts or tools, only the node can be started for debugging without starting all nodes. Debugging can be performed, thereby greatly reducing debugging time and improving debugging efficiency; the breakpoint configuration module is used to add or delete breakpoints for nodes in non-running state according to user needs in debugging mode or local debugging mode, and change the state of nodes with breakpoints to suspended state in running state; the debugging optimization module is used to display the snapshot data corresponding to the suspended node to the user according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the suspended node to the running state in the suspended state. In this way, developers can assist in analyzing the cause of the problem based on the visual operation data, and after modifying the node configuration, they can quickly test the node modification effect based on the local debugging capability to achieve the purpose of efficient Agent production. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0032] Figure 1 This is a schematic diagram of the structure of an Agent framework with debugging and optimization functions provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the core implementation design process of the debugging framework provided in an embodiment of the present application;

[0034] Figure 3 A flowchart of a debugging and optimization method provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the node startup process in local debugging mode provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] In one embodiment, Figure 1 As shown, Figure 1 This is a structural diagram of an Agent framework with debugging and optimization functions provided in an embodiment of the present application. The present application provides an Agent framework with debugging and optimization functions, which may include:

[0038] The execution mode selection module is used to provide multiple execution modes to the user, wherein the execution modes include non-debugging mode, debugging mode and local debugging mode, and each execution mode has a different execution method.

[0039] The data storage module is used to store data snapshots of input data before each node runs when running in the debugging mode or the local debugging mode, and to start and run specific nodes after retrieving the stored snapshot data according to user needs in the local debugging mode.

[0040] The breakpoint configuration module is used to add or delete breakpoints to nodes in a non-running state according to user needs in the debugging mode or the local debugging mode, and change the state of nodes with breakpoints to a suspended state in the running state.

[0041] The debugging and optimization module is used to display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the node in the suspended state to the running state.

[0042] In this embodiment, when the Agent framework used by the developer assists in orchestrating the Agent, the present application can define a framework-level debugging design to support developers in viewing and modifying the running context information, and support starting the Agent from any node, thereby quickly completing the fragment debugging optimization, as follows:

[0043] The Agent framework of the present application includes but is not limited to an execution mode selection module, a data storage module, a breakpoint configuration module, and a debugging optimization module. The execution mode selection module of the present application allows users to select multiple execution modes, so that users can select the appropriate execution mode according to their needs. The Agent framework can then perform corresponding orchestration operations based on the execution mode selected by the user. For example, the execution modes of the present application include but are not limited to non-debugging mode, debugging mode, and local debugging mode. Each execution mode has a different execution method. The three execution modes are designed to cope with different usage scenarios. The core difference lies in the disabling and enabling of debugging capabilities and the difference in startup nodes.

[0044] For example, when the Agent framework is in non-debug mode, debugging capabilities are disabled, meaning no debugging features are enabled, breakpoints are disabled, and no snapshot data is recorded. It only supports startup at the start node. This mode operates in the same manner as the default running framework without debugging capabilities. Compared to other modes, this mode offers higher efficiency and is recommended for formal use. When the Agent framework is in debug mode, debugging capabilities can be enabled and the framework can be started at the start node. However, since this mode requires additional debugging logic, its efficiency is relatively low and is generally recommended for use during development. When the Agent framework is in local debug mode, debugging capabilities can also be enabled and the framework can be started at a specific node based on the snapshot data of the specific node. If snapshot data for the specific node does not exist, the framework falls back to debug mode.

[0045] Furthermore, if Figure 2 As shown, Figure 2 A schematic diagram of the core implementation design process of the debugging framework provided in an embodiment of the present application; Figure 2 In the data storage module of the present application, when running the Agent, the input data before each node is run can be snapshotted and stored, so that when the user selects the local debugging mode, the snapshot data of the specific node can be retrieved according to the user's needs and then the specific node can be started and run. It can be understood that a data snapshot refers to a frozen record of the state or data of the system at a specific point in time, which is usually used for debugging, monitoring, rollback or collaborative synchronization. When the present application takes a data snapshot of the input data before the node is run, the snapshot data includes but is not limited to the internal state of the Agent, the conversation history, the knowledge base cache, the policy parameters (such as the Q value in reinforcement learning, the prompt word template of LLM), the request and response of the tool call when the node is running (such as the JSON returned by the API), metadata (such as the execution timestamp, dependencies) and the public status of other agents, etc. The specific settings can be made according to the actual situation and are not limited here.

[0046] Furthermore, the breakpoint configuration module of the present application can also add or delete breakpoints to nodes in a non-running state according to user needs in the debugging mode or local debugging mode, and change the state of nodes with breakpoints to a suspended state in the running state; and the debugging optimization module of the present application can display the snapshot data corresponding to the node in the suspended state to the user in the suspended state according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the node in the suspended state to the running state. Schematically, as shown in FIG. Figure 2 As shown, after debugging and starting the Agent, this application can view snapshot data 1 before the LLM reasoning node runs, or it can modify the corresponding snapshot data before the tool 1 node runs to form snapshot data 2 and view the specific content of snapshot data 2. Similarly, this application can also view the corresponding snapshot data 3 before other nodes run, etc., which will not be repeated here. When the user modifies the data, this application also supports the developer to adjust the data and restore the running status of the corresponding node so that subsequent debugging operations can continue.

[0047] In the above embodiment, the framework includes an execution mode selection module, which is used to provide users with multiple execution modes, wherein the execution modes include non-debugging mode, debugging mode and local debugging mode. Each execution mode is executed in a different way, so that users can select the corresponding execution mode to perform related tasks according to their own needs; the data storage module is used to take a data snapshot of the input data before each node runs and store it when running in debugging mode or local debugging mode, and in local debugging mode, retrieve the stored snapshot data according to user needs and start and run a specific node, so that when debugging some node prompts or tools, only the node can be started for debugging without starting all nodes for debugging, thereby greatly improving the performance. It reduces debugging time and improves debugging efficiency. The breakpoint configuration module is used to add or delete breakpoints for non-running nodes according to user needs in debugging mode or local debugging mode, and change the state of nodes with breakpoints to suspended state in running state. The debugging optimization module is used to display the snapshot data corresponding to the suspended node to the user according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the suspended node to the running state. In this way, developers can analyze the cause of the problem based on the visual operation data, modify the node configuration, and then quickly test the node modification effect based on the local debugging capability to achieve the purpose of efficient Agent production.

[0048] In one embodiment, the framework may further include:

[0049] The no-breakpoint suspension module is used to receive a suspension instruction initiated by a user for a node in a running state in the debugging mode or the local debugging mode, and when there is no breakpoint in the node in the running state, wait for the node in the running state to complete its operation and then change its state to a suspended state.

[0050] In this embodiment, when the framework is in debugging mode or local debugging mode, the debugging capability can be enabled. This debugging capability not only includes changing the state of a node with a breakpoint to a suspended state in the running state, but also includes receiving a suspension instruction initiated by the user for a node in the running state, and waiting for the node in the running state and without breakpoints to complete running according to the suspension instruction, and then changing the state of the node to a suspended state.

[0051] Specifically, this application can implement the above process based on the debugging framework's API. For example, when the Agent is running, it can start a message subscription channel to listen for external commands. The user can initiate a suspend command during runtime. When the Agent framework detects that the user has sent a suspend command to this channel, it can switch the state of the node to the suspended state after running the current node. In this way, the developer can view the snapshot data of the next node in the suspended state and modify it, or resume the running state as needed.

[0052] In one embodiment, the framework may further include:

[0053] The instruction shielding module is used to shield the data modification instructions initiated by the user in the non-suspended state.

[0054] In this application, the Agent framework may also include an instruction shielding module, which can shield the user-initiated data modification instructions when the Agent is in a non-suspended state. This can ensure that the data is not tampered with during the control of the Agent operation, resulting in unknown results.

[0055] In one embodiment, the process of displaying snapshot data corresponding to a node in a suspended state to a user according to a relevant instruction input by the user may include:

[0056] The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

[0057] In this embodiment, when the Agent framework displays snapshot data corresponding to a node in a suspended state to the user according to a relevant instruction input by the user, it may first determine the content of the instruction input by the user and then perform visual display according to the content.

[0058] Specifically, the message subscription channel of the Agent in this application will be started in debug mode. After startup, it can listen to external instructions. When the user enters the instruction to view data, the framework can call the pre-stored snapshot data of the node in the suspended state, and serialize the snapshot data and display it to the user so that the user can view or modify the data.

[0059] For example, this application can set breakpoints for error issues reported by users and initiate Agent debugging. When the Agent runs to the problem node, the operation will be suspended. At this time, the cause of the problem can be analyzed based on the visual operation data, thereby effectively improving debugging efficiency.

[0060] In one embodiment, the process of saving the user's modification operation on the snapshot data according to the relevant instructions input by the user may include:

[0061] The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.

[0062] In this embodiment, the Agent framework can not only display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user, but also save the user's modification operation on the snapshot data according to the relevant instructions input by the user.

[0063] Specifically, the message subscription channel of the Agent in this application can listen to external instructions after being started in debug mode. When the user enters a data modification instruction, the framework can modify the snapshot data according to the data modification instruction entered by the user and save the modified snapshot data for subsequent use.

[0064] For example, in this application, developers can modify node configurations (such as large model prompts or tool code logic) by modifying data instructions, and then quickly test the effects of node modifications based on local debugging capabilities to achieve the goal of efficiently creating agents.

[0065] In one embodiment, Figure 3 As shown, Figure 3 A flowchart of a debugging and optimization method provided in an embodiment of the present application is provided. The present application also provides a debugging and optimization method, which is applied to an Agent framework with debugging and optimization functions as described in any of the above embodiments. The method may include:

[0066] S110: When running in debug mode or local debug mode, a data snapshot is taken of the input data of each node before running and stored, and the state of the node with a breakpoint is changed to a suspended state.

[0067] S120: In the suspended state, according to relevant instructions input by the user, the snapshot data corresponding to the node in the suspended state is displayed to the user, the user's modification operation on the snapshot data is saved, or the state of the node in the suspended state is restored to the running state.

[0068] In this embodiment, the Agent framework includes, but is not limited to, an execution mode selection module, a data storage module, a breakpoint configuration module, and a debugging optimization module. The execution mode selection module of this application allows users to select from multiple execution modes, allowing them to choose the appropriate execution mode based on their needs. The Agent framework then performs the corresponding orchestration operations based on the user-selected execution mode. For example, the execution modes of this application include, but are not limited to, non-debugging mode, debugging mode, and local debugging mode. These three execution modes are designed to address different usage scenarios, and their core differences lie in the disabling and enabling of debugging capabilities and the differences in startup nodes.

[0069] When the Agent framework of the present application is running in debug mode or local debug mode, it can take a data snapshot of the input data before each node runs and store it, and change the state of the node with a breakpoint to a suspended state. In this way, the framework can display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions entered by the user, save the user's modification operations on the snapshot data, or restore the state of the node in the suspended state to the running state.

[0070] Schematically, as Figure 2 As shown, after debugging and starting the Agent, this application can view snapshot data 1 before the LLM reasoning node runs, or it can modify the corresponding snapshot data before the tool 1 node runs to form snapshot data 2 and view the specific content of snapshot data 2. Similarly, this application can also view the corresponding snapshot data 3 before other nodes run, etc., which will not be repeated here. When the user modifies the data, this application also supports the developer to adjust the data and restore the running status of the corresponding node so that subsequent debugging operations can continue.

[0071] In one embodiment, Figure 4 As shown, Figure 4 A schematic diagram of a node startup process in a local debugging mode provided in an embodiment of the present application; the method may further include:

[0072] S130: In the local debugging mode, the stored snapshot data is retrieved according to user needs and then a specific node is started and run.

[0073] In this embodiment, the Agent framework can snapshot and store the input data of each node before running the Agent. When the user selects local debugging mode, it retrieves the snapshot data of a specific node according to the user's needs and starts and runs the specific node. This allows you to debug only the node when debugging prompts or tools on a certain node, without having to start all nodes for debugging. This greatly reduces debugging time and improves debugging efficiency.

[0074] In one embodiment, the method may further include:

[0075] In the debugging mode or the local debugging mode, a suspend instruction initiated by a user for a node in a running state is received, and when the node in the running state has no breakpoints, the state of the node in the running state is changed to a suspended state after the node has finished running.

[0076] In this embodiment, when the framework is in debugging mode or local debugging mode, the debugging capability can be enabled. This debugging capability not only includes changing the state of a node with a breakpoint to a suspended state in the running state, but also includes receiving a suspension instruction initiated by the user for a node in the running state, and waiting for the node in the running state and without breakpoints to complete running according to the suspension instruction, and then changing the state of the node to a suspended state.

[0077] Specifically, this application can implement the above process based on the debugging framework's API. For example, when the Agent is running, it can start a message subscription channel to listen for external commands. The user can initiate a suspend command during runtime. When the Agent framework detects that the user has sent a suspend command to this channel, it can switch the state of the node to the suspended state after running the current node. In this way, the developer can view the snapshot data of the next node in the suspended state and modify it, or resume the running state as needed.

[0078] In one embodiment, displaying snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user in S120 may include:

[0079] The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

[0080] In this embodiment, when the Agent framework displays snapshot data corresponding to a node in a suspended state to the user according to a relevant instruction input by the user, it may first determine the content of the instruction input by the user and then perform visual display according to the content.

[0081] Specifically, the message subscription channel of the Agent in this application will be started in debug mode. After startup, it can listen to external instructions. When the user enters the instruction to view data, the framework can call the pre-stored snapshot data of the node in the suspended state, and serialize the snapshot data and display it to the user so that the user can view or modify the data.

[0082] For example, this application can set breakpoints for error issues reported by users and initiate Agent debugging. When the Agent runs to the problem node, the operation will be suspended. At this time, the cause of the problem can be analyzed based on the visual operation data, thereby effectively improving debugging efficiency.

[0083] In one embodiment, saving the user's modification operation on the snapshot data according to the relevant instruction input by the user in S120 may include:

[0084] The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.

[0085] In this embodiment, the Agent framework can not only display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user, but also save the user's modification operation on the snapshot data according to the relevant instructions input by the user.

[0086] Specifically, the message subscription channel of the Agent in this application can listen to external instructions after being started in debug mode. When the user enters a data modification instruction, the framework can modify the snapshot data according to the data modification instruction entered by the user and save the modified snapshot data for subsequent use.

[0087] For example, in this application, developers can modify node configurations (such as large model prompts or tool code logic) by modifying data instructions, and then quickly test the effects of node modifications based on local debugging capabilities to achieve the goal of efficiently creating agents.

[0088] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0089] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.

[0090] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An Agent framework with debugging and optimization functions, characterized in that: The framework includes: An execution mode selection module is used to provide a plurality of execution modes to the user, wherein the execution modes include non-debugging mode, debugging mode and local debugging mode, and each execution mode has a different execution method; a data storage module for storing a data snapshot of input data before each node is run when running in the debugging mode or the local debugging mode, and for starting and running a specific node after retrieving the stored snapshot data according to user needs in the local debugging mode; A breakpoint configuration module, configured to add or delete breakpoints for nodes in a non-running state according to user needs in the debugging mode or the local debugging mode, and to change the state of nodes with breakpoints to a suspended state in the running state; The debugging and optimization module is used to display the snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user, save the user's modification operations on the snapshot data, or restore the state of the node in the suspended state to the running state.

2. The Agent framework with debugging and optimization functions according to claim 1 is characterized in that: The framework also includes: The no-breakpoint suspension module is used to receive a suspension instruction initiated by a user for a node in a running state in the debugging mode or the local debugging mode, and when there is no breakpoint in the node in the running state, wait for the node in the running state to complete its operation and then change its state to a suspended state.

3. The Agent framework with debugging and optimization function according to claim 1 is characterized in that: The framework also includes: The instruction shielding module is used to shield the data modification instructions initiated by the user in the non-suspended state.

4. The Agent framework with debugging and optimization functions according to any one of claims 1 to 3, characterized in that: The process of displaying snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user includes: The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

5. The Agent framework with debugging and optimization functions according to any one of claims 1 to 3, characterized in that: The process of saving the user's modification operation on the snapshot data according to the relevant instructions input by the user includes: The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.

6. A debugging and optimization method, applied to the Agent framework with debugging and optimization functions according to any one of claims 1 to 5, characterized in that: The method comprises: When running in debug mode or local debug mode, a snapshot of the input data before each node is run is stored, and the state of the node with a breakpoint is changed to suspended state; In the suspended state, according to the relevant instructions input by the user, the snapshot data corresponding to the node in the suspended state is displayed to the user, the user's modification operation on the snapshot data is saved, or the state of the node in the suspended state is restored to the running state.

7. The debugging and optimization method according to claim 6, characterized in that: The method further comprises: In the local debugging mode, a specific node is started and run after the stored snapshot data is retrieved according to user needs.

8. The debugging and optimization method according to claim 6, characterized in that: The method further comprises: In the debugging mode or the local debugging mode, a suspend instruction initiated by a user for a node in a running state is received, and when the node in the running state has no breakpoints, the state of the node in the running state is changed to a suspended state after the node has finished running.

9. The debugging and optimization method according to any one of claims 6 to 8, characterized in that: The displaying of snapshot data corresponding to the node in the suspended state to the user according to the relevant instructions input by the user includes: The pre-stored snapshot data of the node in the suspended state is called according to the viewing data instruction input by the user, and the snapshot data is serialized and then displayed to the user.

10. The debugging and optimization method according to any one of claims 6 to 8, characterized in that: The step of saving the modification operation of the snapshot data by the user according to the relevant instruction input by the user includes: The snapshot data is modified according to the data modification instruction input by the user, and the modified snapshot data is saved.