Intelligent agent workflow optimization method, apparatus and device, and computer program product
Patent Information
- Application Number
- CN202610155865.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-26
Smart Images

Figure CN122089032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent agent technology, and in particular to an optimization method, apparatus and equipment, and computer program product for intelligent agent workflow. Background Technology
[0002] Against the backdrop of deepening digital transformation in the financial industry, the banking sector is at a critical juncture of shifting from process-driven to intelligence-driven operations. Frontline banking operations face structural challenges in three key areas: operational efficiency, cost control, and customer service. Traditional automated process systems exhibit significant limitations in highly dynamic and complex decision-making scenarios. Banking institutions urgently need to build an operational system that combines flexibility and intelligence to ensure service quality while achieving optimal resource allocation and cost control, thereby meeting users' new expectations for intelligent and efficient services.
[0003] Most existing intelligent agents employ linear process control and execution logic, with their decision paths strictly fixed during the task planning phase. This fixed decision path makes the system lack flexibility when facing complex and ever-changing real-world business scenarios. If tool calls fail, interfaces malfunction, or business states deviate from expectations during task execution, the system often cannot take timely and effective countermeasures. Due to the lack of flexible exception handling mechanisms, the entire process can easily be forced to stop, or even lead to complete task failure.
[0004] Existing intelligent agents heavily rely on pre-defined toolsets or APIs, and their capabilities are defined during the development phase. This means that once users raise new business requirements, or problems arise between different tools such as incompatible data formats or input-output mismatches, the system often cannot autonomously expand or adjust its execution logic. The business needs of financial institutions such as banks are constantly changing and evolving, with new business scenarios and demands emerging continuously. Existing intelligent agents, due to their fixed capabilities, struggle to adapt quickly to these changes, leading to a disconnect from actual business requirements.
[0005] Existing intelligent agents lack a systematic mechanism for experience accumulation and review after task execution. They cannot structurally record and transfer successful experiences and failures during execution. This leads to the system repeatedly making the same mistakes even when faced with similar scenarios, exhibiting characteristics of "no memory, no learning, and no evolution." In financial operations, many errors and problems have a certain degree of repetition and regularity. If intelligent agents cannot learn from past experiences, they cannot continuously optimize their execution logic and decision-making capabilities, thereby improving the accuracy and efficiency of business processing.
[0006] In summary, existing intelligent agent technologies have significant shortcomings in terms of process flexibility, capability scalability, and experience learning capabilities, failing to meet the urgent needs of the banking industry for intelligent operating systems under the digital transformation of the financial sector. Therefore, developing an intelligent agent technology that can overcome these shortcomings and possess greater flexibility and intelligence is of significant practical importance. Summary of the Invention
[0007] This application provides a method, apparatus, device, and computer program product for optimizing intelligent agent workflows, so as to realize the self-diagnosis, review, and optimization of intelligent agent workflows and improve the stability, adaptability, and fault tolerance of the system.
[0008] The embodiments of this application adopt the following technical solutions:
[0009] In a first aspect, embodiments of this application provide a method for optimizing an agent workflow, the method comprising:
[0010] Obtain task information input by the user;
[0011] The entire process of the intelligent agent workflow is processed based on the task information. During the entire process, the predefined multi-level self-reflection mechanism is used to optimize the process based on the processing results of each process node in the intelligent agent workflow, so as to obtain the final process result of the intelligent agent workflow.
[0012] The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
[0013] Optionally, the predefined multi-level self-reflection mechanism includes an immediate self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes:
[0014] In the task planning phase, task planning is performed based on the task information to obtain the task planning result.
[0015] If the task planning result is a successful generation of a task execution plan, then proceed to the task review stage;
[0016] If the task planning result is that the task execution plan is not successfully generated, the task planning stage is optimized using the real-time self-reflection mechanism until the task execution plan is successfully generated.
[0017] Optionally, the predefined multi-level self-reflection mechanism includes a short-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes:
[0018] In the task review phase, the task execution plan generated in the task planning phase is reviewed to obtain the task review result;
[0019] If the task review result is "approved", then proceed to the task execution stage;
[0020] If the task review result is that the review fails, the short-term self-reflection mechanism is used to optimize the task review stage until the task execution plan is approved.
[0021] Optionally, the step of performing full-process processing of the agent workflow based on the task information, and optimizing the process using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes:
[0022] During the task execution phase, the approved task execution plan is executed to obtain the task execution results;
[0023] If the task execution result is successful, the task execution result will be output and the entire process log of the agent workflow will be recorded.
[0024] If the task execution result is a failure, the short-term self-reflection mechanism is used to optimize the task execution phase until the task execution plan is successfully executed.
[0025] Optionally, the short-term self-reflection mechanism can be optimized in the following ways:
[0026] Root cause analysis is performed on the results of the task review stage failure or the task execution stage failure to obtain the root cause type, which is at least one of parameter error, logic error, tool failure and intention misunderstanding.
[0027] Determine the corresponding correction strategy based on the root cause type;
[0028] The task execution plan is modified using the corresponding correction strategy to obtain the modified task execution plan;
[0029] The revised task execution plan was reviewed again.
[0030] Optionally, the predefined multi-level self-reflection mechanism includes a long-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes:
[0031] Based on the predefined triggering conditions of the long-term self-reflection mechanism, determine whether the long-term self-reflection mechanism is triggered at present;
[0032] When the long-term self-reflection mechanism is triggered, the full-process operation log of the agent's workflow is obtained;
[0033] The long-term self-reflection mechanism is used to perform multi-dimensional analysis on the entire process operation log to obtain multi-dimensional analysis results.
[0034] Based on the multi-dimensional analysis results, corresponding optimization suggestions are generated, including at least one of RAG-driven dynamic task orchestration optimization, atomic capability upgrades, and system architecture adjustments.
[0035] Optionally, the multi-dimensional analysis of the entire process operation log using the long-term self-reflection mechanism to obtain multi-dimensional analysis results includes:
[0036] The full-process operation log is calculated based on a pre-built multi-dimensional indicator system to obtain multi-dimensional indicator values. The pre-built multi-dimensional indicator system includes at least one dimension of user experience indicators, task-related indicators, and atomic capability indicators.
[0037] Based on the full-process operation log and the multi-dimensional indicator values, different prompt words are constructed and large models are called respectively for anomaly diagnosis and macro review to obtain the multi-dimensional analysis results.
[0038] Secondly, embodiments of this application also provide an intelligent agent workflow system, the intelligent agent workflow system comprising:
[0039] The acquisition unit is used to acquire task information input by the user.
[0040] The task processing and optimization unit is used to process the entire process of the intelligent agent workflow according to the task information, and to optimize the entire process of the intelligent agent workflow by using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the intelligent agent workflow during the entire process processing, so as to obtain the final process processing result of the intelligent agent workflow.
[0041] The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
[0042] Thirdly, embodiments of this application also provide an apparatus, comprising:
[0043] A processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform an optimized method of any of the aforementioned agent workflows.
[0044] Fourthly, embodiments of this application also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the optimization method for any of the aforementioned intelligent agent workflows.
[0045] The above-mentioned technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The intelligent agent workflow optimization method of the embodiments of this application first obtains the task information input by the user; then, it performs full-process processing of the intelligent agent workflow based on the task information; and during the full-process processing, it optimizes the intelligent agent workflow by using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the intelligent agent workflow, and obtains the final full-process processing result of the intelligent agent workflow; wherein, the intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage. The embodiments of this application innovatively introduce a multi-level self-reflection mechanism in the full-process processing of the intelligent agent, realizing the intelligent agent's autonomous diagnosis, self-correction, and continuous optimization. The multi-level self-reflection mechanism works together to quickly handle unexpected problems during the execution process, optimize single tasks locally, and discover systemic problems and trends from a macro perspective and make global improvements. This full-process optimization scheme from local to global significantly improves the execution efficiency, accuracy, and stability of the intelligent agent workflow, reduces the cost of manual intervention, provides users with a better and more efficient service experience, and also provides strong support for the long-term development and optimization of the system. Attached Figure Description
[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0047] Figure 1 This is a flowchart illustrating an optimization method for an intelligent agent workflow in an embodiment of this application.
[0048] Figure 2 This is a schematic diagram illustrating an optimized workflow for an intelligent agent in an embodiment of this application.
[0049] Figure 3 This is a schematic diagram of an instant self-reflection process in an embodiment of this application;
[0050] Figure 4This is a schematic diagram of a short-term self-reflection process in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of a long-term self-reflection process in an embodiment of this application;
[0052] Figure 6 This application provides a schematic diagram of the structure of an intelligent agent workflow system.
[0053] Figure 7 This is a schematic diagram of the architecture of an intelligent agent workflow system according to an embodiment of this application;
[0054] Figure 8 This is a schematic diagram of the structure of a device according to an embodiment of this application. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0056] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0057] The technical terms used in this application mainly include:
[0058] (1) AI Agent: refers to a single, autonomous artificial intelligence individual program that can perceive, reason and act.
[0059] (2) LLM (Large Language Model): A large-scale deep learning model that is pre-trained on a large amount of data. The underlying converter is a set of neural networks consisting of encoders and decoders with self-attention capabilities. The encoders and decoders extract meaning from a series of texts and understand the relationships between words and phrases within them.
[0060] (3) RAG (Retrieval-Augmented Generation): Retrieval-enhanced generation is a technical architecture that combines external knowledge bases and large language models to enhance the accuracy and reliability of generated content by retrieving relevant information.
[0061] (4) API (Application Programming Interface): refers to a set of rules, protocols and tools for communication and interaction between software. It allows one application to call the functions of another application, thereby sharing data and services.
[0062] This application provides an optimization method for intelligent agent workflow, such as... Figure 1 The diagram shows a flowchart illustrating an optimization method for an intelligent agent workflow according to an embodiment of this application. The optimization method for the intelligent agent workflow includes the following steps S110 to S120:
[0063] Step S110: Obtain the task information input by the user.
[0064] Combination Figure 2 This application provides an optimized flowchart of an intelligent agent workflow according to an embodiment. Users convey task requirements to the system through a pre-set interactive interface using natural language text, specific formatted commands, etc. For example, a user can enter "I want to open a company account" in a text box. After receiving the user input, the system performs preliminary parsing and validation, checking whether the input meets basic format requirements and whether there are obvious errors or ambiguities. If there are problems with the input, the system will promptly provide feedback to the user, guiding them to re-enter the correct task command. Once the user's task command passes the preliminary validation, the intelligent agent workflow is initiated.
[0065] Step S120: Perform full-process processing of the intelligent agent workflow based on the task information. During the full-process processing, optimize the intelligent agent workflow by using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the intelligent agent workflow to obtain the final full-process processing result of the intelligent agent workflow. The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
[0066] The entire workflow of an intelligent agent can be mainly divided into stages such as task planning, task review, and task execution.
[0067] The task planning phase primarily utilizes Large Language Modeling (LLM) to deeply analyze and understand the acquired task information, breaking down complex tasks into multiple executable subtasks and arranging these subtasks appropriately. Then, based on the task decomposition and arrangement results, LLM generates a detailed execution plan and standardizes the plan to ensure its executability and consistency.
[0068] The task review phase primarily involves rigorously verifying the compliance of the execution plan generated during the task planning phase. The system pre-sets a series of rules and standards, such as business rules, security rules, and resource constraint rules, to check the execution plan one by one. If any non-compliance is found in the execution plan, a predefined self-reflection mechanism is triggered, prompting the task orchestration system to autonomously correct plan defects, rather than simply reporting an error and halting the process.
[0069] The task execution phase primarily involves the agent executing various sub-tasks based on the execution plan approved in the task review phase. The agent possesses advantages such as adaptability, interpretability, high fault tolerance, and traceability. During execution, it can dynamically adjust execution strategies and tool selection based on actual conditions. For example, if a query interface fails during a query, the agent can automatically switch to other available query methods. When execution fails, the agent can provide the root cause and solutions, helping users or developers quickly locate and resolve issues. Simultaneously, the agent comprehensively records the decision-making process and execution logs, including the execution time, results, tools used, and parameters for each sub-task, for later maintenance and analysis by developers.
[0070] The multi-level self-reflection mechanism defined in this application embodiment can be mainly divided into immediate self-reflection mechanism, short-term self-reflection mechanism and long-term self-reflection mechanism according to different application stages. The multi-level self-reflection mechanism is embedded into the entire process of the agent workflow, thereby realizing the optimization of the entire process of the agent workflow.
[0071] This application's embodiments innovatively introduce a multi-level self-reflection mechanism throughout the entire intelligent agent's workflow, enabling the agent to autonomously diagnose, self-correct, and continuously optimize. The multi-level self-reflection mechanism works in concert to quickly handle unexpected problems during execution, optimize individual tasks locally, and identify systemic problems and trends from a macroscopic perspective for global improvement. This end-to-end optimization scheme significantly improves the execution efficiency, accuracy, and stability of the intelligent agent's workflow, reduces the cost of manual intervention, provides users with a higher-quality and more efficient service experience, and also provides strong support for the system's long-term development and optimization.
[0072] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes an immediate self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: in the task planning stage, performing task planning based on the task information to obtain a task planning result; if the task planning result is a successful generation of a task execution plan, then proceeding to the task review stage; if the task planning result is a failure to generate a task execution plan, then optimizing the task planning stage using the immediate self-reflection mechanism until the task execution plan is successfully generated.
[0073] During the task planning phase, a comprehensive analysis is performed based on the user-input task information, contextual information, historical knowledge, and available atomic capabilities to generate a task execution plan. If, during this process, it is found that there is a lack of corresponding atomic capabilities to meet the task requirements, or that there are problems such as data format incompatibility between different tools, an immediate self-reflection mechanism will be triggered to revise the task execution plan until a task execution plan is successfully generated or the loop termination condition is triggered.
[0074] like Figure 3 The diagram illustrates an immediate self-reflection process according to an embodiment of this application. The immediate self-reflection mechanism of this embodiment is a code-level self-reflection mechanism, and its main process is as follows:
[0075] (1) Requirements Analysis and Code Generation: First, a requirements analysis is conducted to clarify user needs and obtain clear programming tasks. Then, the list of libraries available in the current sandbox environment is read from the dependency management file, and it is specified that the model can only use these dependencies. At the same time, detailed documentation on interactions with other atomic capabilities or APIs is provided. In addition, code snippets that have been successfully verified in the past to solve similar needs are retrieved from the "code knowledge base" and provided to the model as high-quality examples to assist in code generation.
[0076] (2) Static analysis: Before code execution, the generated code is statically scanned using Python's built-in ast and bandit libraries. The focus is on checking for syntax errors, dangerous code patterns such as command injection, hard-coded keys, and insecure use of eval, as well as whether the dependencies are compliant.
[0077] (3) Test case generation: Automatically generate Pytest test cases covering normal paths, boundary conditions and abnormal scenarios to ensure comprehensive testing of the code.
[0078] (4) Sandbox execution: Execute the verification code logic in a secure sandbox.
[0079] (5) Result Check: Capture exceptions that occur during execution, including detailed error types and stack information. Also capture syntax errors, dependency errors, performance issues, etc., and report these issues to the LLM for correction. The maximum number of loops for this correction process can be set, such as 3. If it continues to fail, it will be circuit-broken and marked as a "high failure rate task".
[0080] This application's embodiments introduce an immediate self-reflection mechanism during the task planning phase, which can effectively address issues such as capability deficiencies and format incompatibility. By automatically generating code, performing static analysis, generating test cases, and executing in a sandbox, it ensures the smooth generation of the task execution plan, thereby improving the success rate and quality of task planning.
[0081] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes a short-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: in the task review stage, reviewing the task execution plan generated in the task planning stage to obtain a task review result; if the task review result is approved, proceeding to the task execution stage; if the task review result is not approved, optimizing the task review stage using the short-term self-reflection mechanism until the task execution plan is approved.
[0082] In the entire workflow of an intelligent agent, after the task planning phase successfully generates a task execution plan, the task review phase begins. The reviewer, as the core component of this phase, will conduct a comprehensive review of the task execution plan generated in the task planning phase.
[0083] The reviewer performs logical, compliance, and executability checks on the task execution plan based on a set of preset rules and standards. Logical checks primarily examine the logical relationships between the various steps in the execution plan to ensure they are reasonable and to identify any contradictions or logical loopholes. Compliance checks ensure the execution plan complies with relevant business rules, laws and regulations, and security policies. Executability checks assess whether the execution plan can be successfully executed under the current system environment and resource conditions. Upon completion of the review, the corresponding task review results will be obtained.
[0084] If the task review result is "approved," it indicates that the task execution plan meets all requirements and is ready to enter the next stage. The task will then proceed smoothly into the execution phase, and the task will be completed step by step according to the execution plan.
[0085] When a task review fails, it indicates a problem with the task execution plan, triggering a short-term self-reflection mechanism. This mechanism optimizes the task plan based on error messages and contextual information received during the review process. The optimized plan is then resubmitted to the reviewer. If it still fails, the short-term self-reflection mechanism continues to optimize until the task execution plan passes review or the loop termination condition is triggered.
[0086] This application's embodiments introduce a short-term self-reflection mechanism during the task review phase of the intelligent agent workflow, providing effective assurance for the optimization of task execution plans. Through rigorous review of the task execution plan by the reviewer, high-quality standards in logic, compliance, and executability are ensured. When the review fails, the short-term self-reflection mechanism responds quickly, optimizing the task plan based on error information and context, avoiding process interruptions or task failures due to plan defects, and improving task execution efficiency and success rate. Simultaneously, this mechanism reduces the need for manual intervention, lowers labor costs, and enables the intelligent agent workflow to operate more autonomously and stably, thereby better meeting user needs in complex business scenarios and improving overall system performance and user experience.
[0087] In some embodiments of this application, the step of performing full-process processing of the agent workflow based on the task information, and optimizing the process using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: in the task execution phase, executing the approved task execution plan to obtain the task execution result; if the task execution result is successful, outputting the task execution result and recording the full-process operation log of the agent workflow; if the task execution result is unsuccessful, optimizing the task execution phase using the short-term self-reflection mechanism until the task execution plan is successfully executed.
[0088] In the intelligent agent workflow, once the task execution plan successfully passes the review phase, the task execution phase begins. At this point, the executor becomes the core operational component, strictly adhering to the approved task execution plan and progressively invoking various atomic capabilities or external tools to advance the task. This process strictly follows the sequence and rules set in the plan, ensuring that each operation conforms to the overall task logic. After completing all preset operations, the executor generates the corresponding task execution result, which is categorized into two cases: execution successful or execution failed.
[0089] If the task execution result is determined to be successful, it indicates that the task has been completed smoothly as expected, and the task execution result will be output in a timely manner, feeding back relevant information about the task processing to the user or subsequent stages. At the same time, the entire process of the intelligent agent workflow can be recorded in detail, including the execution time of each process node, input and output data, and operator information (if any), forming a complete operation log for subsequent querying, analysis, and auditing.
[0090] When a task execution fails, a short-term self-reflection mechanism is triggered. This mechanism quickly intervenes, diagnosing and analyzing each stage of the task execution process. It collects relevant data during execution, such as error messages, system status, and parameter settings, and combines this with contextual information to determine the cause of the failure. Based on the diagnostic results, it automatically selects an appropriate correction strategy to adjust and optimize the task execution plan or relevant parameters during execution. The corrected task execution plan will then re-enter the execution phase. If it still fails, the short-term self-reflection mechanism will continue to be triggered for optimization until the task execution plan finally succeeds or the loop termination condition is triggered.
[0091] In the task execution phase of the intelligent agent workflow, this embodiment significantly improves the reliability and stability of task execution by introducing a short-term self-reflection mechanism. When task execution fails, the short-term self-reflection mechanism can respond quickly, automatically diagnose the cause of the failure, and take effective corrective measures, avoiding task interruption due to execution failure, reducing the need for manual intervention, and improving task execution efficiency. The overall solution gives the intelligent agent workflow stronger fault tolerance and adaptability, enabling it to better cope with complex and ever-changing business scenarios, providing users with more stable and efficient services, and promoting the widespread use and continuous development of intelligent agent systems in practical applications.
[0092] In some embodiments of this application, the short-term self-reflection mechanism is optimized as follows: root cause analysis is performed on the results of the task review stage failure or the results of the task execution stage failure to obtain the root cause type, wherein the root cause type is at least one of parameter error, logic error, tool failure, and intention misunderstanding; a corresponding correction strategy is determined according to the root cause type; the task execution plan is corrected using the corresponding correction strategy to obtain a corrected task execution plan; and the corrected task execution plan is reviewed again.
[0093] like Figure 4The diagram illustrates a short-term self-reflection process in an embodiment of this application. This short-term self-reflection mechanism is a task-level mechanism. Throughout the entire workflow of the intelligent agent, it continuously monitors the review results of the task review stage and the execution results of the task execution stage. When a task review fails or an execution failure occurs, the short-term self-reflection mechanism is immediately triggered. For example, in the task orchestration review stage, if the review finds that the execution plan does not conform to preset business rules or logical requirements, this mechanism will be triggered; similarly, if tool call failures or system anomalies prevent the task from completing normally during task execution, the short-term self-reflection mechanism will also be activated.
[0094] Once the short-term self-reflection mechanism is triggered, it collects data from various sources to reconstruct the complete execution context. This data includes the user's original input intent, the original plan formulated by the model, failure points, process execution history, dialogue history, and business process information used in the RAG knowledge base. Based on this rich data, root cause analysis is performed using chain thinking to determine the type of root cause that led to the review failure or execution failure. Root cause types are mainly divided into parameter errors, logical errors, tool malfunctions, and misunderstandings of intent. For example, if a tool indicates a parameter mismatch during task execution, root cause analysis may determine it to be a parameter error; if the sequence of steps in the execution plan does not conform to business logic, it may be determined to be a logical error.
[0095] Based on the root cause type determined by root cause analysis, a corresponding correction strategy is selected from a pre-defined correction strategy library. Table 1 below lists the different correction strategies corresponding to different root cause types:
[0096] Table 1
[0097] Root cause analysis results Correction strategy Typical operation Parameter error Clarification and Retry Check if the correct parameters exist in the dialog. If not, ask the user for the correct parameters, and then only retry the failed steps. Logical error Constraint replanning Using the failure analysis results as a strong constraint, Planner generates a revised new plan. Tool malfunction Backup Plan / Graceful Degradation Try using alternative tools, or explain to users in a friendly manner that the service is temporarily unavailable. Misunderstanding Re-understanding and Clarification Return to the top-level intent recognition, clarify the true intent to the user, and then start the task from scratch.
[0098] The task execution plan is revised using the established correction strategy to obtain a revised task execution plan. The revised plan is then resubmitted to the reviewer for review. The reviewer conducts a comprehensive review of the revised plan using the same logic, compliance, and executability verification standards as the initial review. If the review passes, the task execution phase begins; if the review fails, a short-term self-reflection mechanism is triggered again, and the above steps are repeated until the task execution plan passes the review or the loop termination condition is triggered.
[0099] The short-term self-reflection mechanism in this embodiment, through precise trigger condition settings, can promptly respond to situations where task review fails or task execution fails. Upon triggering, it comprehensively collects multi-dimensional data and conducts in-depth root cause analysis to accurately identify the root cause of the problem. Then, based on different root cause types, it selects targeted correction strategies to revise the task execution plan. This refined processing method effectively solves various problems that arise in the task process, improving the accuracy and feasibility of the task execution plan. The revised plan is then re-examined, ensuring that the task can be executed smoothly according to a high-quality plan, significantly improving the stability and reliability of the agent's workflow, reducing the probability of task failure, and lowering the cost of manual intervention.
[0100] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes a long-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the workflow using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: determining whether the long-term self-reflection mechanism is triggered based on the triggering conditions of the predefined long-term self-reflection mechanism; obtaining the full-process operation log of the agent workflow when the long-term self-reflection mechanism is triggered; performing multi-dimensional analysis on the full-process operation log using the long-term self-reflection mechanism to obtain multi-dimensional analysis results; and generating corresponding optimization suggestions based on the multi-dimensional analysis results. The optimization suggestions include at least one of RAG-driven dynamic task orchestration optimization, atomic capability upgrades, and system architecture adjustments.
[0101] like Figure 5 The diagram illustrates a long-term self-reflection process in an embodiment of this application. The long-term self-reflection mechanism is a system-level mechanism that determines whether to trigger based on predefined triggering conditions. These triggering conditions are categorized into timed triggers and event triggers. Timed triggers can be flexibly configured according to actual business scenarios. For example, they can be set to automatically trigger during system off-peak hours, such as 2 AM daily, to perform a comprehensive macro-level review and analysis of all data. Event triggers include various scenarios, such as triggering in-depth diagnosis of failed cases when the cumulative task failure rate exceeds a certain threshold (e.g., 5%); triggering specific business process analysis when the satisfaction rate of key business operations declines for several consecutive days (e.g., 3 days); and triggering specific diagnosis of atomic capability errors when they surge within a certain timeframe (e.g., 1 hour). Furthermore, administrators can also manually trigger reviews for specific times, business processes, or users.
[0102] Once the long-term self-reflection mechanism is triggered, the entire workflow log of the agent is retrieved. These logs cover detailed information throughout the entire process of the task, from start to finish, including the execution status of each process node, input and output data, user feedback, reflection process records, etc. Regardless of whether the task is successful or not, the relevant records are fully stored, providing comprehensive data support for subsequent analysis.
[0103] A long-term self-reflection mechanism is used to perform multi-dimensional analysis of the acquired full-process operation logs. At the macro level, the overall task execution trends and performance indicator changes are analyzed; at the micro level, the execution details of specific tasks and the performance of individual atomic capabilities are analyzed in depth. Through comprehensive multi-dimensional analysis, existing problems, potential risks, and areas for optimization are identified.
[0104] Based on the multi-dimensional analysis results, corresponding optimization suggestions are generated. These suggestions mainly include RAG-driven dynamic task orchestration optimization, atomic capability upgrades, and system architecture adjustments. For example, if the analysis finds that unreasonable task orchestration leads to low execution efficiency, RAG-driven dynamic task orchestration optimization suggestions are generated; if a certain atomic capability frequently malfunctions or performs poorly, atomic capability upgrade suggestions are proposed; if the system architecture cannot meet the needs of business growth, system architecture adjustment suggestions are given.
[0105] The generated optimization suggestions will undergo manual review, where relevant managers or technical personnel will evaluate their feasibility and effectiveness. Once approved, the optimization plan will be validated in a test environment to ensure it achieves the expected results. If the test environment confirms that the optimization meets the performance criteria, the optimization plan will be fully deployed and simultaneously updated to the knowledge base and workflow engine, enabling the intelligent agent workflow to operate according to the optimized plan.
[0106] This application's embodiments achieve long-term, comprehensive optimization of the agent's workflow by constructing a long-term self-reflection mechanism. Flexible settings for timing and event triggering ensure the system can respond promptly to various situations and perform in-depth analysis of the entire process log. Multi-dimensional analysis methods accurately pinpoint system problems and optimizable points, generating targeted optimization suggestions that effectively improve system performance and stability. Manual review and testing verification ensure the reliability and effectiveness of the optimization solutions, avoiding the risks associated with blind optimization.
[0107] In some embodiments of this application, the step of using the long-term self-reflection mechanism to perform multi-dimensional analysis on the entire process operation log to obtain multi-dimensional analysis results includes: calculating multi-dimensional indicators on the entire process operation log according to a pre-constructed multi-dimensional indicator system to obtain multi-dimensional indicator values, wherein the pre-constructed multi-dimensional indicator system includes at least one dimension of user experience indicators, task-related indicators, and atomic capability indicators; constructing different prompt words based on the entire process operation log and the multi-dimensional indicator values, and respectively calling a large model for anomaly diagnosis and macro-level review to obtain the multi-dimensional analysis results.
[0108] In order to conduct comprehensive and in-depth self-reflection, this application embodiment pre-constructs a multi-dimensional indicator system, as shown in Table 2 below, which lists the multi-dimensional indicators set in this application embodiment and the corresponding calculation methods, etc.
[0109] Table 2
[0110]
[0111] As shown in Table 2, the multi-dimensional indicator system pre-constructed in this application embodiment covers dimensions such as user experience indicators, task-related indicators, and atomic capability indicators. User experience indicators, such as user satisfaction and average session rounds, reflect service quality from the user's perspective; task-related indicators, such as task success rate and task abandonment rate, are used to macroscopically evaluate task execution; atomic capability indicators, such as capability call frequency and average capability time, help to locate performance and stability issues of atomic capabilities.
[0112] Based on the constructed multi-dimensional indicator system, multi-dimensional indicators are calculated for the entire process operation log. The statistical scope includes aggregation by fixed time window, aggregation by session start and end, and aggregation by complete task process, etc., to comprehensively and accurately obtain the values of each indicator. For example, user satisfaction is calculated as the ratio of the number of user feedback items rated as good or above in the statistical window to the total number of feedback items in the window; task success rate is the ratio of the number of successful samples associated with the task type process to the number of task samples of that task type.
[0113] The diagnostic analysis is divided into two parts: anomaly diagnosis and macro-level review. Different prompts are designed for anomaly diagnosis and macro-level review to meet different analytical needs.
[0114] (1) Abnormal diagnosis
[0115] When the system identifies a failed or inefficient session, it automatically packages all log streams for that session and invokes the large model using prompts built for anomaly diagnosis. The large model performs root cause analysis based on the input log streams and prompts to uncover the specific reasons for the failure or inefficiency. For example, in the case of a failed "open account" task, it collects information such as user messages, feedback, and tool error logs, and analyzes this information to determine the cause of the failure.
[0116] (2) Macroeconomic review
[0117] The macro-level review is divided into two phases: overall system analysis and anomaly task-specific analysis. In the overall system analysis phase, all logs are aggregated at preset intervals, comprehensive performance metrics are calculated, and relevant prompts are used to invoke a large-scale model for overall trend analysis and systemic bottleneck identification, resulting in systemic optimization strategies. Once the overall system analysis identifies anomaly task types, the anomaly task-specific analysis phase begins. Data is extracted according to a specific process, and corresponding prompts are used to invoke a large-scale model for in-depth, specific analysis, generating targeted optimization suggestions.
[0118] The data extraction process for anomaly task-specific analysis mainly includes:
[0119] 1) Task filtering: Based on the abnormal task type, filter out all task samples of that task type;
[0120] 2) Log aggregation: For each sample, aggregate log slices related to that task type;
[0121] 3) Data Classification: Organize logs by type, including user interaction, agent internal state, tool execution, system feedback, etc.
[0122] 4) Orchestration result collection: Collect the orchestration results of this task type in a representative sample from the execution plan generation log;
[0123] 5) Pattern Analysis: Analyze the execution pattern, failure pattern, user behavior pattern, etc. of this task type.
[0124] Finally, the previously generated anomaly diagnosis and optimization suggestions are added to the "Pending Review" queue. The review interface clearly displays the problem description, root cause analysis, optimization plan, and AI-predicted priority. Administrators can combine business judgments to ultimately confirm the priority. Approved suggestions are first deployed to the A / B testing environment. Simultaneously, core evaluation metrics and success thresholds are predefined for each experiment. The system monitors the performance of the experimental group in real time. If the core metrics fall below the absolute threshold or are significantly worse than the control group, the experiment will be automatically terminated and rolled back, triggering an alarm. Optimization is only considered effective when the experimental group data shows a statistically significant improvement. Successfully validated optimization plans are fully deployed to the production environment. In the case of atomic capability upgrades, the new version of the code will replace the old version. The entire process from problem discovery to optimization deployment is recorded as the platform's "evolution log."
[0125] This application's embodiments utilize a long-term self-reflection mechanism and a multi-dimensional indicator system to comprehensively calculate and analyze the entire process operation log. Combined with the anomaly diagnosis and macro-level review capabilities of a large model, it can deeply uncover system problems and potential optimization points. Analysis is conducted from multiple dimensions, including user experience, task execution, and atomic capabilities, ensuring the comprehensiveness and accuracy of the analysis. Through review, testing, and deployment processes, the feasibility and effectiveness of optimization suggestions are guaranteed, avoiding the risks of blind optimization. The overall solution forms a complete self-optimization closed loop, enabling the intelligent agent workflow to continuously improve itself, constantly enhancing system stability, performance, and user experience, better adapting to complex and ever-changing business environments, and providing strong support for the long-term, stable, and efficient operation of the intelligent agent.
[0126] In summary, the key points of this application are mainly as follows:
[0127] (1) Architectural innovation - a progressively increasing "three-level self-reflection mechanism" intelligent agent workflow
[0128] This application adds an authentication and error correction layer and an execution and reflection layer to the traditional intelligent agent architecture. Unlike traditional intelligent agent applications, the three-level self-reflection mechanism enables self-diagnosis, review and optimization by utilizing the reasoning and learning capabilities of intelligent agents.
[0129] (2) Capability Innovation - Dynamic Task Generation of "Intelligent Agent as Process"
[0130] This application breaks through the limitations of fixed processes. Traditional automation relies on preset, fixed process templates, which limit flexibility. This application introduces RAG-driven dynamic orchestration, which can combine an enterprise's internal knowledge base (standard processes + historical exception cases) with a real-time available tool catalog for bidirectional collaboration. This application supports customized execution processes, dynamically generating the optimal execution path for non-standard requests, achieving high scenario adaptability. The "intelligent agent as process" model endows the system with extremely high flexibility and scenario adaptability, effectively addressing the diversity and variability of banking business.
[0131] This application achieves systematic innovation in the architecture, capability expansion, and learning optimization of intelligent agents by introducing a three-level self-reflection mechanism, which is manifested in the following ways:
[0132] (1) This application innovatively adds an "authentication and error correction layer" and an "execution and reflection layer" to the traditional intelligent agent architecture, forming a complete closed loop from task planning, execution to reflection and correction. This architecture can automatically trigger the reflection mechanism when the tool call fails, the process is abnormal or the external environment changes, autonomously analyze the cause and replan the execution path, which greatly improves the stability and fault tolerance of the system.
[0133] (2) By introducing a code-level self-reflection mechanism, the agent can automatically generate, optimize, and verify new functional modules when the existing toolset cannot meet new requirements or when data between tools is incompatible, thus realizing the evolution process from dynamic generation to static solidification. This mechanism enables the system to have the ability to learn and iterate its functions, significantly enhancing the agent's scalability and adaptability.
[0134] (3) The system-level self-reflection mechanism of this application can periodically or event-drivenly perform multi-dimensional analysis of system operation logs and feedback data to identify long-term trends and potential bottlenecks, and form actionable optimization suggestions. By continuously accumulating historical execution experience and reviewing task data, a knowledge loop and continuous optimization are achieved, promoting the long-term improvement of system performance and intelligence.
[0135] (4) The execution layer of this application has high fault tolerance and traceability. It can automatically analyze the root cause when the task fails and select an appropriate correction strategy, effectively reducing human intervention and ensuring the continuity and reliability of critical tasks.
[0136] This application can be applied in a variety of intelligent scenarios, including the following typical applications:
[0137] (1) Intelligent meeting scenario
[0138] The system can quickly generate meeting information (such as meeting topic, time, location, and participants) based on user needs and automatically send meeting notifications to relevant personnel, achieving accurate and efficient message delivery. Simultaneously, the built-in intelligent meeting recording function can record and structure meeting content in real time. Combining natural language understanding and generation technology, it automatically generates clear, accurate, and key-point-focused meeting minutes, significantly improving meeting management and recording efficiency.
[0139] (2) Intelligent travel scenarios
[0140] A one-stop intelligent travel ecosystem has been built, integrating various booking services such as hotels, air tickets, and train tickets. Based on employees' travel plans and travel approval information, the system intelligently recommends the optimal travel routes and accommodation options, achieving full-process automation support for travel applications, bookings, and reimbursements. Through intelligent decision-making and task collaboration mechanisms, the traditional travel process is greatly simplified, approval efficiency and employee experience are improved, and efficient and seamless travel management is achieved.
[0141] (3) Document intelligent assistant scenario
[0142] Leveraging the powerful semantic understanding and reasoning capabilities of a large language model, the system can perform a range of intelligent document processing functions, including content polishing, grammar correction, text summarization, report writing, automatic PPT generation, document translation, key information extraction, and data visualization analysis. This module significantly improves the automation and intelligence of office document creation, making content generation more efficient, expression more accurate, and formatting more standardized, thus comprehensively enhancing the productivity and quality of knowledge-based work.
[0143] This application also provides an intelligent agent workflow system 600, such as... Figure 6 As shown in the diagram, this application provides a schematic diagram of the structure of an intelligent agent workflow system 600, which includes:
[0144] The acquisition unit 610 is used to acquire task information input by the user;
[0145] The task processing and optimization unit 620 is used to process the entire process of the intelligent agent workflow according to the task information, and to optimize the entire process of the intelligent agent workflow by using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the intelligent agent workflow during the entire process processing, so as to obtain the final process processing result of the intelligent agent workflow.
[0146] The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
[0147] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes an immediate self-reflection mechanism. The task processing and optimization unit 620 is specifically used for: in the task planning stage, performing task planning based on the task information to obtain a task planning result; if the task planning result is a successful generation of a task execution plan, then proceeding to the task review stage; if the task planning result is a failure to generate a task execution plan, then using the immediate self-reflection mechanism to optimize the task planning stage until the task execution plan is successfully generated.
[0148] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes a short-term self-reflection mechanism. The task processing and optimization unit 620 is specifically used to: review the task execution plan generated in the task planning stage during the task review stage to obtain a task review result; if the task review result is approved, proceed to the task execution stage; if the task review result is not approved, optimize the task review stage using the short-term self-reflection mechanism until the task execution plan is approved.
[0149] In some embodiments of this application, the task processing and optimization unit 620 is specifically used to: execute the reviewed and approved task execution plan during the task execution phase to obtain the task execution result; if the task execution result is successful, output the task execution result and record the full process operation log of the agent workflow; if the task execution result is unsuccessful, optimize the task execution phase using the short-term self-reflection mechanism until the task execution plan is successfully executed.
[0150] In some embodiments of this application, the task processing and optimization unit 620 is specifically used to: perform root cause analysis on the results of the task review stage failure or the results of the task execution stage failure to obtain the root cause type, wherein the root cause type is at least one of parameter error, logic error, tool failure and intention misunderstanding; determine the corresponding correction strategy according to the root cause type; use the corresponding correction strategy to correct the task execution plan to obtain the corrected task execution plan; and re-examine the corrected task execution plan.
[0151] In some embodiments of this application, the predefined multi-level self-reflection mechanism includes a long-term self-reflection mechanism. The task processing and optimization unit 620 is specifically used to: determine whether the long-term self-reflection mechanism is triggered based on the triggering conditions of the predefined long-term self-reflection mechanism; if the long-term self-reflection mechanism is triggered, obtain the full-process operation log of the agent workflow; perform multi-dimensional analysis on the full-process operation log using the long-term self-reflection mechanism to obtain multi-dimensional analysis results; and generate corresponding optimization suggestions based on the multi-dimensional analysis results. The optimization suggestions include at least one of RAG-driven dynamic task orchestration optimization, atomic capability upgrade, and system architecture adjustment.
[0152] In some embodiments of this application, the task processing and optimization unit 620 is specifically used to: perform multi-dimensional indicator calculations on the full-process operation log according to a pre-constructed multi-dimensional indicator system to obtain multi-dimensional indicator values, wherein the pre-constructed multi-dimensional indicator system includes at least one dimension among user experience indicators, task-related indicators, and atomic capability indicators; construct different prompt words according to the full-process operation log and the multi-dimensional indicator values, and call the large model respectively for anomaly diagnosis and macro-review to obtain the multi-dimensional analysis results.
[0153] It is understood that the above-described intelligent agent workflow system can implement each step of the intelligent agent workflow optimization method provided in the foregoing embodiments. The relevant explanations of the intelligent agent workflow optimization method are applicable to the intelligent agent workflow system and will not be repeated here.
[0154] For ease of understanding of the above embodiments, as Figure 7 As shown, a schematic diagram of the architecture of an intelligent agent workflow system according to an embodiment of this application is provided.
[0155] This application adds an authentication and error correction layer and an execution and reflection layer to the traditional intelligent agent architecture. The authentication and error correction layer is responsible for task orchestration, determining the order of tool calls, and includes a code-level self-reflection mechanism that can autonomously review whether the task orchestration results are reasonable. The execution and reflection layer is the core of the intelligent agent in this application, mainly responsible for specific tool calls, and also includes a task-level self-reflection mechanism that can autonomously analyze the reasons for tool call failures and autonomously decide on subsequent execution plans.
[0156] The Planner is primarily responsible for breaking down and orchestrating tasks, generating detailed execution plans using LLM, and standardizing them to ensure consistent and parsable output formats. It supports dynamic, complex, and non-linear conditional branching orchestration, enabling flexible execution paths. It also supports compliance checks, comprehensively reviewing generated execution plans to ensure compliance with business rules, security policies, and resource constraints, and detecting potential logical vulnerabilities or execution risks. Furthermore, it supports a Planner→Critic→Planner self-reflection loop, where the Critic rigorously verifies plan compliance, triggering a feedback loop that prompts task orchestration to autonomously correct plan defects rather than passively reporting errors.
[0157] The executor offers advantages such as adaptability, interpretability, high fault tolerance, and traceability. It can dynamically adjust execution strategies and tool selection based on actual conditions, provide root causes and solutions for execution failures, handle problems that an agent cannot solve independently, and completely record the decision-making process and execution logs for later maintenance by developers.
[0158] The self-reflection process is as follows: the Executor receives and executes the plan → the execution result is detected and analyzed by the Check node → if a failure occurs, the Planner is triggered to replan → the optimized plan is executed by the Executor again, forming a complete self-reflection and correction closed loop.
[0159] Figure 8 This is a schematic diagram of the structure of a device according to an embodiment of this application. For example... Figure 8 As shown, the device includes one or more processors (or processing units), and may also include one or more memories coupled to the processors, and may also include a communication module coupled to the processors.
[0160] A communication module can be used to communicate with other devices or apparatuses, such as sending or receiving data and / or signals. A communication module may have at least one communication module for communication. A communication module may include any interface necessary for communicating with other devices. Exemplarily, a communication module may be a transceiver, circuit, bus, module, or other type of communication module.
[0161] The processor may include, but is not limited to, one or more of the following: a general-purpose computer, a special-purpose computer, a microcontroller, a digital signal processor (DSP), or a controller-based multi-core controller architecture. The device may have multiple processors, such as application-specific integrated circuit (ASIC) chips, which are time-dependent on a clock synchronized with the main processor.
[0162] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (ROM), electrically programmable read-only memory (EPROM), flash memory, hard disk, compact disc (CD), digital video disc (DVD), or other magnetic and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (RAM), or other volatile memories that do not persist during the duration of a power outage.
[0163] A computer program consists of computer-executable instructions that are executed by an associated processor. Programs can be stored in ROM. A processor can perform any appropriate action and processing by loading the program into RAM.
[0164] Possible implementations of this application can be achieved through a program, enabling the communication device to execute any of the processes discussed in the foregoing embodiments. Possible implementations of this application can also be achieved through hardware or a combination of software and hardware.
[0165] In some implementations, the program may be tangibly contained in a computer-readable storage medium, which may include in a device (such as in memory) or other storage device accessible by the device. The program may be loaded from the computer-readable storage medium into RAM for execution. The computer-readable storage medium may include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk, CD, DVD, etc.
[0166] This application also provides a computer-readable storage medium storing computer instructions or program code thereon, which, when executed by a processor, causes the processor to perform the methods and functions involved in any of the above embodiments. A computer-readable medium can be any tangible medium that contains or stores a program for or relating to an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. More detailed examples of computer-readable storage media include electrical connections with one or more wires, magnetic media (e.g., disks, floppy disks, hard disks, magnetic tapes, magnetic storage devices), optical media (e.g., optical storage devices, DVDs), semiconductor media (e.g., solid-state drives), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), or any suitable combination thereof.
[0167] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. Embodiments of this application also provide at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. This computer program product includes one or more computer-executable instructions, such as instructions included in a program module, which execute in a device on a target real or virtual processor to perform the processes, methods, and functions involved in any of the above embodiments. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0168] This application also proposes a computer program product, including a computer program or instructions that, when run on a computer, cause the computer to perform the processes, methods, and functions described in the above embodiments. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided as needed. The machine-executable instructions for the program modules can be executed locally or in a distributed device. In a distributed device, the program modules can reside in both local and remote storage media.
[0169] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software, which can be executed by a controller, microprocessor, or other computing device. Although various aspects of the embodiments of this disclosure are shown and described as block diagrams, flowcharts, or represented using some other illustration, it should be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as, as non-limiting examples, in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0170] It should be noted that although embodiments of this application have been described above with reference to the accompanying drawings, these embodiments are not independent of each other, and they can be combined to obtain other embodiments. The methods, situations, categories, and classifications of embodiments in this application are only for the convenience of description and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined with each other if logically consistent. The various embodiments of this application can be arbitrarily combined to achieve different technical effects. The embodiments of this application will not list various combinations.
[0171] Furthermore, although the operation of the methods of this disclosure is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowcharts may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps. It should also be noted that the features and functions of two or more devices according to this disclosure may be embodied in one device. Conversely, the features and functions of one device described above may be further divided and embodied by multiple devices.
[0172] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0173] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for optimizing an intelligent agent workflow, characterized in that, The optimization method for the intelligent agent workflow includes: Obtain task information input by the user; The entire process of the intelligent agent workflow is processed based on the task information. During the entire process, the predefined multi-level self-reflection mechanism is used to optimize the process based on the processing results of each process node in the intelligent agent workflow, so as to obtain the final process result of the intelligent agent workflow. The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
2. The method for optimizing the intelligent agent workflow according to claim 1, characterized in that, The predefined multi-level self-reflection mechanism includes an immediate self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: In the task planning phase, task planning is performed based on the task information to obtain the task planning result. If the task planning result is a successful generation of a task execution plan, then proceed to the task review stage; If the task planning result is that the task execution plan is not successfully generated, the task planning stage is optimized using the real-time self-reflection mechanism until the task execution plan is successfully generated.
3. The method for optimizing the intelligent agent workflow according to claim 2, characterized in that, The predefined multi-level self-reflection mechanism includes a short-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: In the task review phase, the task execution plan generated in the task planning phase is reviewed to obtain the task review result; If the task review result is "approved", then proceed to the task execution stage; If the task review result is that the review fails, the short-term self-reflection mechanism is used to optimize the task review stage until the task execution plan is approved.
4. The method for optimizing the intelligent agent workflow according to claim 3, characterized in that, The process of performing full-process processing of the agent workflow based on the task information, and the optimization of the process using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, include: During the task execution phase, the approved task execution plan is executed to obtain the task execution results; If the task execution result is successful, the task execution result will be output and the entire process log of the agent workflow will be recorded. If the task execution result is a failure, the short-term self-reflection mechanism is used to optimize the task execution phase until the task execution plan is successfully executed.
5. The method for optimizing the intelligent agent workflow according to claim 4, characterized in that, The aforementioned short-term self-reflection mechanism is optimized in the following ways: Root cause analysis is performed on the results of the task review stage failure or the task execution stage failure to obtain the root cause type, which is at least one of parameter error, logic error, tool failure and intention misunderstanding. Determine the corresponding correction strategy based on the root cause type; The task execution plan is modified using the corresponding correction strategy to obtain the modified task execution plan; The revised task execution plan was reviewed again.
6. The method for optimizing the intelligent agent workflow according to claim 1, characterized in that, The predefined multi-level self-reflection mechanism includes a long-term self-reflection mechanism. The process of performing full-process processing of the agent workflow based on the task information, and optimizing the process using the predefined multi-level self-reflection mechanism based on the processing results of each process node in the agent workflow during the full-process processing, includes: Based on the predefined triggering conditions of the long-term self-reflection mechanism, determine whether the long-term self-reflection mechanism is triggered at present; When the long-term self-reflection mechanism is triggered, the full-process operation log of the agent's workflow is obtained; The long-term self-reflection mechanism is used to perform multi-dimensional analysis on the entire process operation log to obtain multi-dimensional analysis results. Based on the multi-dimensional analysis results, corresponding optimization suggestions are generated, including at least one of RAG-driven dynamic task orchestration optimization, atomic capability upgrades, and system architecture adjustments.
7. The method for optimizing the intelligent agent workflow according to claim 6, characterized in that, The multi-dimensional analysis of the entire process operation log using the long-term self-reflection mechanism yields the following results: The full-process operation log is calculated based on a pre-built multi-dimensional indicator system to obtain multi-dimensional indicator values. The pre-built multi-dimensional indicator system includes at least one dimension of user experience indicators, task-related indicators, and atomic capability indicators. Based on the full-process operation log and the multi-dimensional indicator values, different prompt words are constructed and large models are called respectively for anomaly diagnosis and macro review to obtain the multi-dimensional analysis results.
8. An intelligent agent workflow system, characterized in that, The intelligent agent workflow system includes: The acquisition unit is used to acquire task information input by the user. The task processing and optimization unit is used to process the entire process of the intelligent agent workflow according to the task information, and to optimize the entire process of the intelligent agent workflow by using a predefined multi-level self-reflection mechanism based on the processing results of each process node in the intelligent agent workflow during the entire process processing, so as to obtain the final process processing result of the intelligent agent workflow. The intelligent agent workflow is divided into a task planning stage, a task review stage, and a task execution stage.
9. An apparatus comprising: processor; And a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform an optimized method of the agent workflow according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the optimization method of the intelligent agent workflow according to any one of claims 1 to 7.
