A general cross-cascade framework for agent task execution based on large models

By introducing a cross-cascade framework into the large-scale agent system and utilizing the collaborative work of master and slave agents, the problems of inconsistent data formats and poor data quality are solved, the accuracy and efficiency of task execution are improved, and the stability and reliability of the system are enhanced.

CN119883644BActive Publication Date: 2025-10-03NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510049162.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-10-03
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

The existing large-model Agent system has problems such as inconsistent data formats, poor data quality, and poor task completion, which leads to increased task execution complexity and resource consumption.

Method used

A general large-model-based Agent task execution cross-cascade framework is adopted, which includes a master agent and multiple slave agents. Through vertical and horizontal cascade structures, they are responsible for format correction, planning correction, tool calling and result correction respectively, to achieve self-reflection and optimize task execution.

Benefits of technology

It improves the accuracy and efficiency of task processing, reduces dependence on the performance of a single agent, enhances the stability and reliability of the system, and ensures the degree of automation of task execution and the correctness of the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883644B_ABST
    Figure CN119883644B_ABST
Patent Text Reader

Abstract

The present invention relates to a universal large-model-based Agent task execution cross-cascade framework. The framework task execution method includes: a master agent receives user task instructions, decomposes them into subtasks, and outputs a subtask list; a format correction slave agent verifies the list format and corrects it; a planning correction slave agent optimizes the subtask content to ensure rationality and executability; the master agent calls tools to execute subtasks one by one and monitors anomalies; a tool call slave agent analyzes and corrects tool anomalies and resolves problems through tool installation or configuration adjustment; a result correction slave agent verifies the execution results and corrects the operation until it meets the task requirements; the master agent receives the final result and delivers it to the user. This cross-cascade design improves system automation, stability, and reliability, and reduces dependence on the performance of a single agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence and software engineering, and in particular to a general Agent task execution cross cascade framework based on a large model. Background Art

[0002] With the development of artificial intelligence (AI) technology, intelligent agents are increasingly being used, and their ability to simulate human intelligent behavior is also increasing. Agents are able to autonomously perceive their environment, make decisions, and execute actions to complete complex tasks or interact with users and other agents. Guided by specific rules and goals, these software entities can decompose user-entered target requirements and automatically operate to achieve them. However, existing large language model (LLM) agent systems face several key issues that limit their effectiveness and reliability in practical applications.

[0003] First, large-model agents often encounter inconsistent data formats. When specific output formats, such as lists or dictionaries, are required, LLMs often encounter difficulties due to the inconsistency between the number of tools and the corresponding subtasks, resulting in incorrect task execution. Second, the quality of generated data is often questionable, as LLMs may incorrectly decompose subproblems or use inappropriate tools to perform subtasks, such as attempting to solve pure mathematical problems with SQL tools. Furthermore, task completion performance is often hampered by LLMs' tendency to overuse specific tools, which can lead to unnecessary duplication and extension of computations, increasing execution complexity and resource consumption. Summary of the Invention

[0004] The present invention provides a universal cross-cascade framework for Agent task execution based on large models, which aims to solve the problems caused by illusions and lack of knowledge in the prior art, such as inconsistent data formats generated by large models, poor quality of generated data, and poor task completion effects.

[0005] To achieve the above objectives, the present invention provides, in a first aspect, a general large-model-based Agent task execution cross-cascade framework, comprising a master agent and multiple slave agents, wherein the master agent and the slave agents form a vertical cascade structure, and the multiple slave agents form a horizontal cascade structure, wherein the slave agents include a format correction slave agent, a planning correction slave agent, a tool call slave agent, and a result correction slave agent. The task execution method of the framework comprises the following steps:

[0006] Receive task instructions input by the user and pass the instructions to the main agent;

[0007] The main agent decomposes the task instruction into multiple subtasks according to the predetermined rules and outputs a subtask list expressed in a specified format;

[0008] Format correction: The agent performs format verification on the subtask list output by the task decomposition step. If the format does not meet the predetermined standard, it corrects it and generates a subtask list that meets the format requirements.

[0009] The planning correction agent verifies the rationality and executability of the revised subtask list to determine whether the task decomposition is accurate. If there are any problems, the subtask content is corrected to generate an optimized subtask list.

[0010] The main agent receives the optimized subtask list, calls the specified tool to execute each subtask in turn, and monitors abnormal conditions during the tool calling process based on the execution status;

[0011] The tool call slave agent analyzes the abnormal conditions found in the tool call step and performs tool installation or configuration adjustments based on the analysis results through the tool correction mechanism;

[0012] Result correction: The agent verifies the execution results of the tool call steps. If the execution results do not meet the task requirements, the relevant execution operations are corrected and the subtasks are rerun until a final result that meets the requirements is generated.

[0013] The master agent receives the final result after verification and correction, and returns the result to the user to complete the task delivery.

[0014] Furthermore, the format correction slave agent is configured to detect output format problems through multiple rounds of self-questioning and self-answering, and embed detection results and correction prompts in the context until an output that meets the format requirements is generated.

[0015] Furthermore, the tool correction step includes determining the type of tool missing and calling a preset installation mechanism to automatically complete the installation or version update of the tool.

[0016] Furthermore, the planning correction slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to judge whether the task decomposition is correct, and if not, output the error cause; the correction agent cluster corrects the task decomposition result according to the error cause, and inputs the corrected result into the judgment agent cluster again for verification until the task decomposition result is correct.

[0017] Furthermore, the tool calling slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to analyze the cause of tool call failure; the correction agent cluster is used to complete tool correction according to the cause of failure, including installing missing tools or changing call parameters, and returning the correction results to the main agent to continue executing the task.

[0018] Furthermore, the result correction slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to judge whether the task execution result is correct, and if not, output the error cause; the correction agent cluster is used to correct the task execution result according to the error cause, and return the corrected result to the main agent.

[0019] Furthermore, the main agent executes only the subtasks required for the current step each time based on a progressive task planning strategy, and passes the execution results as context to subsequent steps.

[0020] Furthermore, when the tool calling slave agent detects that a tool is missing, it calls the master agent through a dynamic multi-threading mechanism to install the necessary tool, and automatically resumes the main task execution after the tool installation is completed.

[0021] Furthermore, the result correction slave agent utilizes a context learning mechanism to associate the cause of the task execution error with the current task context.

[0022] Furthermore, the format correction slave agent uses regular expressions or natural language understanding models to identify and correct format errors.

[0023] Beneficial effects of the present invention:

[0024] Compared with the prior art, the present invention provides a general large-model-based Agent task execution cross-cascade framework, in which the main agent is responsible for receiving user instructions and preliminarily disassembling complex tasks, while multiple slave agents are responsible for format correction, task planning optimization, tool selection and calling, and verification of execution results. Through cascading collaboration, these slave agents can independently correct errors and optimize task execution at their respective stages, thereby improving the accuracy and efficiency of overall task processing. Specifically, the format correction slave agent ensures that the output task format is correct, the planning correction slave agent optimizes task decomposition and execution strategies, the tool calling slave agent flexibly responds to tool needs and adjustments, and the result correction slave agent ensures the correctness of the final result. In addition, this cross-cascade design allows the system to be more automated when executing complex tasks, while reducing dependence on the performance of a single agent and improving the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.

[0026] Figure 1 This is a general cross-cascade framework diagram of Agent task execution based on a large model disclosed in an embodiment of the present invention.

[0027] Figure 2 This is a task planning block diagram of a master intelligent agent disclosed in an embodiment of the present invention.

[0028] Figure 3 This is a subtask format correction block diagram disclosed in an embodiment of the present invention.

[0029] Figure 4 This is a subtask planning correction block diagram disclosed in an embodiment of the present invention.

[0030] Figure 5 It is a block diagram of a main intelligent agent tool calling a cyclic execution subtask disclosed in an embodiment of the present invention.

[0031] Figure 6 The present invention discloses a correction block diagram for using a subtask execution tool.

[0032] Figure 7 This is a subtask execution result correction block diagram disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following is a clear and complete description of 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 them. Based on the embodiments of 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.

[0034] In this document, the term "comprising" is intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0035] During desktop agent development, large models are often required to plan complex tasks and execute simple subtasks. To achieve this, the large model must output task descriptions that conform to a specific format, allowing key information to be extracted for task execution using methods such as regular expressions. However, because the output of large models is based on probabilities, it may not always conform to the predetermined format, resulting in failure to extract key information and hindering task execution. Therefore, the output of the large model must be formatted correctly to ensure smooth task execution.

[0036] After the formatting is corrected, the desktop agent should be able to perform the required subtasks. However, not all tasks require detailed decomposition. For example, if the agent already has the ability to automatically generate and save documents, a subtask like "Collect Information" may be unnecessary because it can be directly implemented by other functions within the agent. Therefore, these incorrect or unnecessary subtasks need to be identified and corrected to optimize the task execution process.

[0037] Furthermore, when performing tasks, the agent may encounter insufficient tools, such as a lack of necessary document processing software. This necessitates tool modification or installation. In desktop feature development, creating tools often involves installing the corresponding software. If the agent's required tools are not already present, it should be able to automatically install them, thus maintaining continuity and automation in task execution.

[0038] Finally, even after the tool installation and task execution are complete, errors may still occur. For example, when installing specific software, using an old, no longer supported package name will cause the installation to fail. In this case, the agent needs to be able to identify this error, automatically update the package name, and retry the installation. After a successful installation, the agent will display the correct execution results to the user, ensuring the correct completion of the entire task process.

[0039] To achieve the above objectives, the present invention provides a general cross-cascade framework for Agent task execution based on large models. The framework adopts a cascade agent mechanism to achieve self-reflection of software agents in terms of planning results, calling tools, and execution results. It effectively solves the problems caused by illusions and lack of knowledge such as inconsistent data formats generated by large models, poor quality of generated data, and poor task completion results. The overall framework is as follows: Figure 1 shown.

[0040] Specifically, the reflection mechanism consists of four cascading components: output format reflection (format correction slave agent), task planning result reflection (plan correction slave agent), tool call reflection (tool call slave agent), and execution result reflection (result correction slave agent). With the collaboration of the master and slave agents, task decomposition and completion are effectively achieved.

[0041] It can be understood that the framework includes a master agent and multiple slave agents. The master agent and the slave agents form a vertical cascade structure, and the multiple slave agents form a horizontal cascade structure. The slave agents include a format correction slave agent, a planning correction slave agent, a tool call slave agent, and a result correction slave agent. The task execution method of the framework includes the following steps:

[0042] Step S100: receiving a task instruction input by a user and passing the instruction to the master agent;

[0043] Step S200: The master agent decomposes the task instruction into multiple subtasks according to a predetermined rule and outputs a subtask list expressed in a specified format;

[0044] Step S300: Format Correction: The slave agent performs format verification on the subtask list outputted from the task decomposition step. If the format does not meet the predetermined standard, the slave agent corrects the format and generates a subtask list that meets the format requirements.

[0045] Step S400: Planning Correction: The slave agent verifies the rationality and executability of the revised subtask list to determine whether the task decomposition is accurate. If there are any problems, the subtask content is corrected to generate an optimized subtask list.

[0046] Step S500: The master agent receives the optimized subtask list, calls the specified tool to execute each subtask in sequence, and monitors abnormal conditions during the tool calling process based on the execution status;

[0047] Step S600: The tool calling slave agent analyzes the abnormality found in the tool calling step and performs tool installation or configuration adjustment through the tool correction mechanism according to the analysis result;

[0048] Step S700: Result Correction: The slave agent verifies the execution result of the tool call step. If the execution result does not meet the task requirements, the slave agent corrects the relevant execution operations and reruns the subtask until a final result that meets the requirements is generated.

[0049] Step S800: The main agent receives the final result after verification and correction, and returns the result to the user to complete the task delivery.

[0050] In this embodiment, as described in steps S100 to S200, Figure 2 In the execution process, the user first provides the system with an instruction, expressing the complex task to be performed. Next, the main agent receives this instruction. The main agent possesses advanced task analysis and planning capabilities, systematically breaking down the user's complex instruction into a series of more specific and manageable subtasks. It should be noted that this task breakdown process is executed using prompts.

[0051] In this embodiment, as described in step S300, Figure 3 During the execution process, if the large model outputs an output that does not meet the format, such as "I think the following is my solution", the intelligent agent has the ability to reflect on and correct the format, and will complete the format correction problem through multiple rounds of self-dialogue.

[0052] In this embodiment, as described in step S400, Figure 4 、 Figure 5 In the execution process, once the task format output by the master agent is corrected, the planning correction slave agent begins to reflect on and optimize the effectiveness of the task plan. This process involves two specialized slave agents: a judgment agent cluster and a correction agent cluster, which operate in a cascading loop. The judgment agent cluster's primary responsibility is to evaluate the rationality and effectiveness of the subtasks decomposed by the master agent, without involving further dialogue or memory preservation. If any problems are found, the judgment agent cluster's evaluation results are passed as input to the correction agent cluster, which is responsible for reorganizing and correcting the tasks. Through these multiple rounds of dialogue and self-tuning, the system can ensure the accuracy and practicality of task decomposition, further optimizing the entire task execution process.

[0053] In this embodiment, as described in step S500 and step S600, Figure 6 In the execution process of a task, once the subtasks have been revised, the master agent will take on the responsibility of calling the corresponding tools to execute these subtasks. At this time, the master agent can interact with the tool-calling slave agent to optimize the efficiency and adaptability of the tool. The tool-calling slave agent can create or adjust non-existent tools as needed. For example, if WPS software is required in task execution but WPS is not installed in the system, the tool-calling slave agent can start a multi-threaded process and call another master agent to install the required WPS software. During the installation or tool creation process, the main task will be paused until the background thread completes the installation or creation of the tool and feeds the results back to the master agent.

[0054] In this embodiment, as described in step S700 and step S800, Figure 7 In the execution process, after the main agent completes the tool call and subtask execution, it will submit the output results to the result correction slave agent for verification. The main responsibility of the result correction slave agent is to verify the correctness and validity of these results. If an error is found in the result during the verification process, for example, a software source that no longer exists (such as qt5-default) is used in a software installation task, the result correction slave agent will guide the main agent to update the software source or take other necessary corrective measures, and then continue to execute the corrected installation task. This process ensures the accuracy of the task results and the reliability of the system. If the result verification is correct, the result correction slave agent will allow the main agent to output the final result to the user, thereby completing the overall task planning and execution process. This result verification and correction mechanism is a key step to ensure that the task is completed according to high standards, enhances the system's self-correction ability for errors, and improves users' trust in the system output.

[0055] In the cross-cascade framework of the present invention, the format correction slave agent is responsible for identifying and correcting format output errors generated by the large model, ensuring that the format of the output data meets the standards for subsequent processing. In addition, the planning correction slave agent, the tool calling slave agent, and the result correction slave agent are respectively responsible for task decomposition, tool calling and optimization, and inspection and correction of execution results, and work together to ensure that every link of the entire task from planning to execution to result output is efficient and accurate. The design of this framework effectively reduces the large number of tokens generated by multiple rounds of dialogue required for a single agent in the execution of complex tasks, and avoids possible errors in the semantic understanding of the model. By assigning tasks to dedicated slave agents for processing, this framework not only improves the efficiency and accuracy of task execution, but also optimizes resource utilization, reduces error rates, and enhances the overall reliability and stability of the system.

[0056] In this embodiment, the task planning phase is the initial and critical step in the entire agent execution framework. When a user presents a complex instruction to the system, such as "Please write a weekly work summary and schedule a meeting," the main agent first needs to understand and break down these instructions into actionable subtasks. This process is performed by a large model base within the main agent, which leverages its advanced natural language processing capabilities to break down the complex task into a detailed, structured list of subtasks.

[0057] To ensure the accuracy and enforceability of the split, the large model needs to accurately parse the input instructions, avoiding any additional interpretation or speculative content. This split must not only follow the user's specific needs, but also be strictly executed according to the predetermined output format. For example, the system might break down the original instruction into subtasks such as "write a weekly work summary," "adjust the document format," and "use Tencent Meeting to schedule a Tencent meeting," and list these tasks in detail. Each task is clear, independent, and specific enough to be directly executed.

[0058] In addition, the main agent will automatically generate relevant corpora as needed when performing task planning, and even fine-tune the large model to optimize its task processing capabilities.

[0059] To guide the main agent in correctly outputting task plans, developers can set detailed prompts that clearly indicate the rules the output should follow. These rules include completing the task decomposition in one go, prohibiting interpretation or speculation about task execution methods, and avoiding outputting extraneous text unrelated to the task decomposition. These example prompts guide the agent to simplify complex problems into a clear list of subtasks, each directly corresponding to a specific action step, ensuring that each output is highly actionable and accurate.

[0060] In this embodiment, the format correction slave agent ensures that the task decomposition format output by the master agent strictly adheres to established rules. It is specifically responsible for detecting and correcting any formatting errors generated by the master agent. For example, if the master agent adds an unnecessary prefix to the output, such as "according to your requirements," this additional content that violates the output rules needs to be identified and removed, as it can be considered a "hallucination" by the agent—the output does not meet the task requirements.

[0061] The formatting correction slave agent's workflow begins with a self-diagnosis phase, identifying formatting issues in the output, such as text that should not appear. Once identified, the agent internally analyzes the problem and generates corrective instructions. This correction process is iterative: the slave agent resubmits the corrected output to itself to check for any remaining formatting issues. This self-feedback mechanism ensures that formatting issues are thoroughly resolved until the output fully meets the requirements.

[0062] Furthermore, when a slave agent detects a formatting issue, the master agent pauses other operations and waits for the formatting correction to complete. This waiting mechanism ensures that the task does not continue while a potential formatting error exists. The formatting correction slave agent performs a loop—analyzing errors, adjusting output, and revalidating—to ensure that each output strictly complies with formatting requirements. Throughout this process, the agent leverages its contextual understanding to refine the conversation, repeatedly adjusting until error-free.

[0063] Finally, to further optimize the efficiency and effectiveness of format correction, a slave agent clustering strategy can be employed. This involves deploying multiple format correction slave agents working in parallel, each independently identifying and correcting errors. These slave agents are linked horizontally in a cascade, mutually verifying their corrections, with a single master agent providing final confirmation. This cascaded framework not only accelerates corrections but also improves the system's ability to handle formatting issues, ensuring high-quality output and smooth task execution.

[0064] In the framework of this embodiment, once the slave agent (format correction slave agent) completes the format correction of the task output, the master agent will receive the corrected task and submit it to the planning correction slave agent for further review and optimization.

[0065] This process involves two key slave agent clusters: the judging agent cluster and the correcting agent cluster. The judging agent cluster is responsible for reviewing the revised task decomposition, evaluating the rationality and feasibility of each subtask. They analyze the logical structure and content of the task to ensure that each subtask is necessary and effectively supports the achievement of the ultimate goal. If the judging agent cluster identifies problems with the task decomposition, such as logical incoherence or non-compliance with practical operational standards, it will flag specific issues.

[0066] Once a problem is identified, the corrective agent cluster takes over the task of correcting it. These agents independently analyze and correct the problem using various strategies and algorithms, then submit potential solutions back to the judgment agent cluster for review. This process is iterative, with the corrective and judgment agent clusters continuously communicating and providing feedback to gradually optimize the task plan.

[0067] Through this internal cascading collaborative working model, the group of agents is able to integrate different viewpoints and approaches, adopting the principle of "the minority obeys the majority" to determine the final task decomposition plan. This mechanism enhances the decision-making quality of the agent system and ensures highly accurate and practical task decomposition.

[0068] Finally, once all issues have been resolved and the task plan has been confirmed as correct by all judging agent clusters, the revised task plan is resubmitted to the master agent. At this point, the master agent has all the information necessary to execute these precisely defined subtasks, allowing it to accurately execute complex user-specified tasks such as writing work summaries and scheduling meetings. This close collaboration and continuous feedback between the master and slave agents ensures efficient and accurate task execution.

[0069] In this embodiment, after receiving the correct subtasks, which have been formatted and planned correctly, the master agent will gradually execute them using a progressive ReAct approach. This approach provides real-time feedback on the progress and status of task execution to the master model, updating the task status before each new subtask, ensuring continuity and accuracy throughout the execution process.

[0070] When executing a specific task, the main agent selects the most appropriate tool from the available tool set to complete each subtask. For example, for a task requiring document writing, the main agent would select document processing software such as WPS. If a tool usage error is encountered during execution, such as a lack of the necessary document processing software, the main agent will enter the tool call error handling process.

[0071] This error handling involves both the judgment agent cluster and the corrective agent cluster for tool correction. The judgment agent cluster first diagnoses the problem, determining the cause of the tool failure, such as confirming that the system lacks the necessary document processing software. Once the diagnosis is complete, the corrective agent cluster intervenes and takes specific action to resolve the problem, such as installing the required WPS software. During this process, the corrective agent cluster initiates a new process to complete the software installation, ensuring that the task can continue.

[0072] In this framework, the design of the judgment and correction agent cluster allows multiple agents to jointly participate in decision-making and implement corrective measures, and adopts the principle of "minority obeys majority" to make decisions, which improves the efficiency and accuracy of processing.

[0073] The successful implementation of the entire tool call and correction process relies on close collaboration and efficient communication between agent clusters. Through such cascaded collaboration, tool-related problems encountered during execution can be effectively resolved, ensuring smooth task execution.

[0074] In this example, the final stage of task execution involves correcting the results to ensure they meet expected standards. During this phase, if the master agent encounters any errors during task execution, such as software installation issues, it collaborates with the result correction slave agent to resolve them.

[0075] Specifically, the result correction process begins with the activity of a cluster of judgment agents, which are responsible for diagnosing the nature of the problem. For example, if an error occurs when attempting to install WPS document processing software, the judgment agent cluster analyzes the error message (e.g., "E: Package wps has no installation candidates") and determines the cause of the error (in this case, the package name has changed). Multiple judgment agents can participate in error diagnosis to ensure comprehensive and accurate analysis.

[0076] Once a problem is identified, a cluster of corrective agents takes over the specific remediation tasks. Based on the information provided by the judgment agent, these agents execute the necessary commands to resolve the issue. In this example, the corrective agent installs WPS using the correct package name ("sudo apt-get install wps-office"). The corrective agent cluster's activities aren't limited to implementing a single solution; they can also perform multiple rounds of adjustments and optimizations to ensure the issue is fully resolved.

[0077] After the corrective action is completed, the judging agent cluster performs another verification to confirm that the problem has been fully resolved and to ensure that the solution has not introduced new problems. This verification step is an important part of the result correction process, ensuring the effectiveness of the solution and the ultimate success of the task.

[0078] Finally, it should be noted that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or make equivalent replacements for some of the technical features therein. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A general large-model-based Agent task execution cross-cascade framework system, characterized by: The system includes a master agent and multiple slave agents, wherein the master agent and the slave agents form a vertical cascade structure, and the multiple slave agents form a horizontal cascade structure. The slave agents include a format correction slave agent, a planning correction slave agent, a tool call slave agent, and a result correction slave agent. The task execution method of the system includes the following steps: Receive task instructions input by the user and pass the instructions to the main agent; The main agent decomposes the task instruction into multiple subtasks according to the predetermined rules and outputs a subtask list expressed in a specified format; Format correction: The agent performs format verification on the subtask list output by the task decomposition step. If the format does not meet the predetermined standard, it corrects it and generates a subtask list that meets the format requirements. The planning correction agent verifies the rationality and executability of the revised subtask list to determine whether the task decomposition is accurate. If there are any problems, the subtask content is corrected to generate an optimized subtask list. The main agent receives the optimized subtask list, calls the specified tool to execute each subtask in turn, and monitors abnormal conditions during the tool calling process based on the execution status; The tool call slave agent analyzes the abnormal conditions found in the tool call step and performs tool installation or configuration adjustments based on the analysis results through the tool correction mechanism; Result correction: The agent verifies the execution results of the tool call steps. If the execution results do not meet the task requirements, the relevant execution operations are corrected and the subtasks are rerun until a final result that meets the requirements is generated. The master agent receives the final result after verification and correction, and returns the result to the user to complete the task delivery.

2. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The format correction slave agent is configured to detect output format problems through multiple rounds of self-questioning and self-answering, and embed detection results and correction prompts in the context until an output that meets the format requirements is generated.

3. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The tool correction step includes determining the type of tool missing and calling a preset installation mechanism to automatically complete the installation or version update of the tool.

4. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The planning correction slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to judge whether the task decomposition is correct. If not, it outputs the cause of the error; the correction agent cluster corrects the task decomposition result according to the cause of the error, and inputs the corrected result into the judgment agent cluster for verification again until the task decomposition result is correct.

5. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The tool calling slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to analyze the cause of tool calling failure; the correction agent cluster is used to complete tool correction according to the cause of failure, including installing missing tools or changing calling parameters, and returning the correction results to the main agent to continue executing the task.

6. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The result correction slave agent includes a judgment agent cluster and a correction agent cluster, wherein the judgment agent cluster is used to judge whether the task execution result is correct, and if not, output the error cause; the correction agent cluster is used to correct the task execution result according to the error cause, and return the corrected result to the main agent.

7. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The main agent is based on a progressive task planning strategy, executing only the subtasks required for the current step each time, and passing the execution results as context to subsequent steps.

8. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: When the tool calling slave agent detects that a tool is missing, it calls the master agent through a dynamic multi-threading mechanism to install the necessary tool, and automatically resumes the main task execution after the tool installation is completed.

9. The universal large-model-based Agent task execution cross-cascade framework system as claimed in claim 1, characterized in that: The result correction slave agent utilizes a context learning mechanism to associate the cause of the task execution error with the current task context.

10. The universal large-model-based Agent task execution cross-cascade framework system according to claim 1, characterized in that: The format correction slave agent uses regular expressions or natural language understanding models to identify and correct format errors.

Citation Information

Patent Citations

  • Intelligent agent construction and application system based on large language model

    CN118966267A

  • Method for Automatically Executing API by LLM-based Agent System

    KR102707512B1