Multi-agent collaborative task process arrangement method and system
By employing a multi-agent collaborative task orchestration method, and utilizing agents for requirement analysis, process modeling, and deviation identification, a workflow topology diagram is generated and optimized. This solves the problem of poor orchestration convenience caused by manual intervention in existing technologies and achieves autonomous intelligent iterative optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, the task flow orchestration process requires manual intervention, resulting in poor convenience and insufficient intelligence.
A multi-agent collaborative approach is adopted. The requirement parsing agent receives user input and processes task requirements through a large language model to generate a structured task description. The process modeling agent generates a workflow topology based on this and schedules the task execution agent through the execution engine. The deviation identification agent compares the expected and actual execution paths and optimizes the process topology based on the modeling agent, thereby achieving autonomous iteration of the entire process.
It has achieved autonomous and intelligent process orchestration, reduced manual intervention, improved the convenience and intelligence of the orchestration process, and realized autonomous iterative optimization of the entire process.
Smart Images

Figure CN121833192A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task flow arrangement method and system based on multi-agent cooperation. BACKGROUND
[0002] Task flow arrangement is a technology for converting complex and changeable business requirements into specific execution processes executable by machines through analyzing user input, and is widely used in fields such as service management and system integration.
[0003] The task flow arrangement scheme proposed in the related art is to manually set custom rules or configurations, convert the input content into a specific execution process by directly applying a template, and then optimize the process arrangement through user operation.
[0004] This way requires user intervention in the process arrangement and optimization stages, but most ordinary users cannot explicitly know how to arrange, adjust and optimize in most cases, resulting in poor convenience in the process arrangement process and the problem of insufficient intelligence. SUMMARY
[0005] Embodiments of the present application provide a task flow arrangement method and system based on multi-agent cooperation to solve the problem of poor convenience and insufficient intelligence in the process arrangement process.
[0006] In a first aspect, the embodiments of the present application provide a task flow arrangement method based on multi-agent cooperation, comprising: receiving a task requirement input by a user by a requirement analysis agent, and processing the task requirement by a large language model by the requirement analysis agent to obtain a structured task description; the structured task description includes each subtask for realizing the task requirement; determining a workflow topology graph based on the structured task description by a process modeling agent; the workflow topology graph is used to define a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes and / or dependency relationships between the nodes, to represent an expected execution path of each subtask; scheduling and running a task execution agent corresponding to each subtask according to the workflow topology graph by an execution engine; determining an actual execution path of each subtask based on a task execution log of each subtask by a deviation identification agent, and comparing the expected execution path and the actual execution path, and comparing expected index data and task execution index data by the deviation identification agent to obtain a comparison result; optimizing the workflow topology graph based on the comparison result by the process modeling agent.
[0007] In a possible implementation, the task execution indicators include time consumption, success rate and / or resource occupation, the actual execution path carries the task execution node sequence of each subtask; the comparison result includes a deviation position, a deviation type corresponding to the deviation position, and a deviation impact assessment; the deviation type includes at least one of the following: node skipping, execution delay, abnormal exit and output not meeting expectations; the deviation identification agent compares the expected execution path and the actual execution path, and compares the expected indicator data and the task execution indicator data, to obtain the comparison result, including: the deviation identification agent compares the node sequence of the expected execution path and the actual execution path, and compares the time consumption, the success rate and / or the resource occupation, to obtain the deviation position and the deviation type corresponding to the deviation position; and the deviation identification agent generates the deviation impact assessment based on the deviation position and the deviation type corresponding to the deviation position.
[0008] In a possible implementation, before the step of optimizing the workflow topology graph based on the comparison result by the process modeling agent, the method further includes: an optimization suggestion agent generates an optimization suggestion based on the comparison result, the workflow topology graph and / or a log analysis result of the task execution log; the optimization suggestion includes node replacement, node execution sequence adjustment and / or node execution parallelization; the optimization suggestion agent sends the optimization suggestion to the automatic iteration engine; and the automatic iteration engine receives the optimization suggestion, and invokes the process modeling agent to enable the process modeling agent to optimize the workflow topology graph based on the optimization suggestion, to obtain an optimized workflow topology graph.
[0009] In a possible implementation, after the step of optimizing the workflow topology graph based on the comparison result by the process modeling agent, the method further includes: the automatic iteration engine tests the optimized workflow topology graph in a sandbox environment using a predefined test case; and the automatic iteration engine determines the optimized workflow topology graph as a new workflow topology graph in a case where the test passes.
[0010] In a possible implementation, the process modeling agent determines the workflow topology graph based on the structured task description, including: the process modeling agent identifies and decomposes each subtask for implementing the task requirement according to the structured task description; the process modeling agent matches each subtask in a process template library to obtain the workflow topology graph; or the process modeling agent generates the workflow topology graph based on a preset knowledge base, an execution condition of each subtask, an execution sequence and a dependency relationship between each subtask.
[0011] In a possible implementation, the execution engine comprises a task scheduler and a cluster of execution agents; the execution engine is configured to schedule and run the task execution agents corresponding to the subtasks according to the workflow topology, including: the task scheduler is configured to parse the workflow topology, and generate and issue task execution instructions according to the nodes in the workflow topology, the execution conditions of the nodes, the execution sequences between the nodes, and / or the dependency relationships between the nodes; the cluster of execution agents is configured to receive the task execution instructions, schedule and run the task execution agents corresponding to the subtasks, to execute the subtasks, and receive the execution results and the task execution logs returned by the task execution agents.
[0012] In a possible implementation, the method further comprises: the log storage and index collection module stores the task execution logs by using a distributed search engine Elasticsearch; and / or the log storage and index collection module collects task execution index data in the subtask execution process by using a time series database Prometheus; and / or the log storage and index collection module visually displays the task execution logs and / or the task execution index data by using a data visualization platform Grafana.
[0013] In a possible implementation, the method further comprises: a log-aware agent is configured to listen to and analyze the task execution logs in real time, to obtain log analysis results, the log analysis results including abnormal pattern analysis results and / or performance bottleneck analysis results; and / or the log-aware agent is configured to search the task execution logs by using a custom condition, to obtain log search results; the custom condition including a regular expression, a time range filter, and / or a specific field filter.
[0014] In a possible implementation, the demand analysis agent processes the task demand by using a large language model, to obtain a structured task description, including: the demand analysis agent performs intent recognition and entity extraction on the task demand by using the large language model, to decompose the subtasks and determine the task target, the task constraint, and the task priority of each subtask; each subtask is located in a subtask chain generated by the large language model by using a preset task execution mechanism; and the structured task description is generated based on each subtask and the task target, the task constraint, and the task priority of each subtask.
[0015] In a second aspect, the embodiments of the present application provide a multi-agent collaborative task flow arrangement system, comprising: a requirement analysis agent, configured to receive a task requirement input by a user, and process the task requirement by a large language model to obtain a structured task description; the structured task description comprises various sub-tasks for realizing the task requirement; a process modeling agent, configured to determine a workflow topology graph based on the structured task description; the workflow topology graph is used to define a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes, to represent an expected execution path of each sub-task; an execution engine, configured to schedule and run a task execution agent corresponding to each sub-task according to the workflow topology graph; a deviation identification agent, configured to determine an actual execution path of each sub-task based on a task execution log of each sub-task, and compare the expected execution path and the actual execution path, and compare expected index data and task execution index data to obtain a comparison result; the process modeling agent is further configured to optimize the workflow topology graph based on the comparison result.
[0016] From the above, the embodiments of the present application provide a multi-agent collaborative task flow arrangement method and system, the method comprising: receiving a task requirement input by a user by a requirement analysis agent, and processing the task requirement by a large language model by the requirement analysis agent to obtain a structured task description; the structured task description comprises various sub-tasks for realizing the task requirement; determining a workflow topology graph based on the structured task description by a process modeling agent; the workflow topology graph is used to define a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes, to represent an expected execution path of each sub-task; scheduling and running a task execution agent corresponding to each sub-task according to the workflow topology graph by an execution engine; determining an actual execution path of each sub-task based on a task execution log of each sub-task by a deviation identification agent, and comparing the expected execution path and the actual execution path by the deviation identification agent, and comparing expected index data and task execution index data to obtain a comparison result; optimizing the workflow topology graph based on the comparison result by the process modeling agent. In this way, a complete closed loop of requirement analysis, process generation, execution, monitoring, diagnosis, optimization and regeneration of process arrangement can be realized, and then autonomous intelligent iteration of the whole process can be realized. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 A process schematic diagram of the multi-agent collaborative task flow arrangement method provided by the embodiments of the present application; Figure 2 A first agent scheduling process schematic diagram provided by the embodiments of the present application; Figure 3 A second agent scheduling process schematic diagram provided by the embodiments of the present application; Figure 4 A structural schematic diagram of a multi-agent collaborative task flow arrangement system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order for those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0019] In order to solve the problems of poor convenience and insufficient intelligence in the process of flow arrangement, the present application provides a multi-agent collaborative task flow arrangement method and system. The method and system can realize closed-loop automation of the whole flow arrangement process through multi-agent (Agent) collaborative driving.
[0020] Specifically, the multi-agent collaborative task flow arrangement method and system can be implemented by multiple agents, and each agent communicates through a message bus (such as Kafka) or an application programming interface (Application Programming Interface, API). The agents include, for example, a requirement analysis agent, a process modeling agent, an execution engine, a log storage and index query module, a log perception agent, a deviation identification agent, an optimization suggestion agent, an automatic iteration engine, etc. These agents can implement a multi-agent system (Multi-Agent Systems, MAS), and through the division of labor and cooperation of multiple artificial intellect (artificial intellect, AI) agents, the solving ability of complex tasks can be significantly improved, and complex requirements can be decomposed into sub-tasks for parallel processing. In addition, the present application can integrate the capabilities of heterogeneous tools (such as databases, APIs) and environmental perception capabilities to achieve capability integration, and the present application can adjust the workflow path according to the real-time state to achieve dynamic arrangement.
[0021] It can be seen that the embodiment of the application realizes the whole life cycle autonomous management of the task flow from the demand understanding to the intelligent optimization by constructing the multi-agent collaborative architecture. Specifically, the demand analysis agent receives the user natural language demand and performs semantic analysis by using a large language model, the flow modeling agent generates a workflow structure including nodes, dependency relationships and execution conditions in combination with a domain knowledge base according to the structured task description, and the execution agent cluster is responsible for scheduling the dedicated Agent to complete the execution of each subtask and report log and index data. On this basis, the log perception agent continuously listens to and analyzes the execution log to identify abnormal patterns and performance bottlenecks, the deviation identification agent discovers the execution deviation by comparing the expected path with the actual execution data, the optimization suggestion agent generates specific optimization suggestions such as node replacement, sequence adjustment or parallelization by comprehensively analyzing the foregoing information, and finally the automatic iteration engine drives a complete closed loop to feed back the optimization suggestions to the flow modeling agent to regenerate the improved process and automatically test and deploy in the sandbox environment, without manual intervention, thereby realizing the continuous iterative optimization.
[0022] Figure 1 A flowchart of a multi-agent collaborative task flow arrangement method provided by the embodiment of the application is shown.
[0023] Figure 2 A first agent scheduling flowchart provided by the embodiment of the application is shown.
[0024] As shown in Figure 1 and Figure 2 The embodiment of the application provides a multi-agent collaborative task flow arrangement method, which can include the following steps S100-S500.
[0025] S100: receiving the task demand input by the user by using the demand analysis agent, and processing the task demand by using the demand analysis agent through a large language model to obtain a structured task description; the structured task description includes each subtask for realizing the task demand.
[0026] In this step, the demand analysis agent can receive the user natural language input through a user input interface, such as “help me monitor the server log and send an email alarm if error code 500 is found”. Then, the demand analysis agent can perform intent recognition and entity extraction by using a large language model (LLM) to obtain a structured task description. The structured task description can be in JSON format and can be composed of task objectives, task constraints, task priorities and the like of each subtask for realizing the task demand. The step of extracting the structured task description will be described in detail below, and will not be repeated here.
[0027] S200: determining a workflow topology graph based on the structured task description by the process modeling agent; the workflow topology graph is used to define a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes, to represent an expected execution path of each subtask.
[0028] In the embodiment of the present application, the input of the process modeling agent is a structured task description in JSON format, and the output is an executable process definition in JSON format. In actual application, the process modeling agent can match or generate a new workflow topology graph in the process template library based on the structured task description.
[0029] Further, the workflow topology graph is a graphical representation method, which is used to show the logical relationship, sequence and data flow between each activity, step or task in the workflow. In the embodiment, the workflow topology graph adopts a directed acyclic graph (DAG), which is composed of vertices and directed edges. "Directed" means that the edges in the graph have directionality, pointing from one vertex to another vertex; "acyclic" means that there is no loop in the graph, which starts from a vertex, passes through a series of directed edges and returns to the vertex.
[0030] In some implementations, the embodiment of the present application can match the workflow topology graph in the preset process template library according to the structured task description, or generate the nodes (tasks) of the workflow topology graph DAG according to the execution target in the structured task description, and generate the edges (dependency relationships) of the workflow topology graph DAG according to the constraint conditions and priorities in the structured task description. The specific generation steps of the workflow topology graph will be described in detail below, and will not be repeated here.
[0031] The workflow topology graph can be used as a visual and logical carrier of the expected execution path of the subtask, which defines in detail a plurality of nodes (one or more nodes correspond to one subtask), trigger execution conditions of each node (such as completion state of the previous node, data threshold, etc.), execution sequence between the nodes, and dependency relationship between the nodes (including data dependency, resource dependency, etc.), to ensure the rigor and feasibility of the subtask execution logic.
[0032] S300: scheduling and running the task execution agent corresponding to each subtask according to the workflow topology graph by using the execution engine.
[0033] In the embodiments of the present application, the execution engine can include a task scheduler and an execution agent cluster. Further, the embodiments of the present application can utilize the task scheduler in the execution engine to first parse the logical structure of the workflow topology graph, and then sequentially schedule the task execution agents in the corresponding execution agent cluster according to the node definition and the dependency relationship. Each task execution agent is a dedicated lightweight service that focuses on completing a specific type of subtask (such as log reading, API calling, data calculation, etc.), and in the execution process, it collects and reports task execution logs (including structured and unstructured log data) and task execution index data (such as time consumption, success rate, resource occupancy rate, etc.) in real time, and synchronously stores them to the log storage and index collection module.
[0034] S400: Utilizing the deviation identification agent, based on the task execution logs of each subtask, determine the actual execution path of each subtask, and utilize the deviation identification agent to compare the expected execution path and the actual execution path, and compare the expected index data and the task execution index data, to obtain a comparison result.
[0035] The embodiments of the present application can utilize the deviation identification agent to extract the task execution logs of each subtask from the log storage and index collection module, and reconstruct the actual execution path of the subtask through log analysis. Then, the embodiments of the present application can compare the reconstructed actual execution path with the expected execution path defined in the workflow topology graph node by node, and simultaneously call the preset expected index data (such as standard time consumption, target success rate, etc.) and compare it with the actually collected task execution index data in multiple dimensions. In the comparison process, various deviation conditions such as node skipping, execution delay, abnormal exit, output not meeting expectations, and index not meeting standards are accurately identified, and finally a comparison result containing deviation type, deviation position, influence range and / or severity evaluation is generated. The comparison result can be a deviation report in JSON format.
[0036] S500: Utilizing the process modeling agent, based on the comparison result, optimizing the workflow topology graph.
[0037] The embodiments of the present application can call the process modeling agent to perform targeted optimization on the original workflow topology graph, generate a new version of the workflow topology graph, ensure that the optimized workflow topology graph can adapt to the actual execution feedback, solve the execution deviation and performance bottleneck existing in the early stage, and at the same time maintain the characteristics of clear logic and strong scalability, to provide more efficient process support for subsequent execution.
[0038] From the above, the embodiment of the application provides a multi-agent collaborative task flow arrangement method, which comprises the following steps: receiving a task demand input by a user by using a demand analysis agent, and processing the task demand by using the demand analysis agent through a large language model to obtain a structured task description; the structured task description comprises various subtasks for realizing the task demand; determining a work flow topology graph based on the structured task description by using a flow modeling agent; the work flow topology graph is used for defining a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes and / or dependency relationships between the nodes, so as to represent an expected execution path of each subtask; scheduling and running task execution agents corresponding to each subtask according to the work flow topology graph by using an execution engine; determining an actual execution path of each subtask based on task execution logs of each subtask by using a deviation identification agent, and comparing the expected execution path and the actual execution path and comparing expected index data and task execution index data by using the deviation identification agent to obtain a comparison result; and optimizing the work flow topology graph based on the comparison result by using the flow modeling agent. Based on the method, the user input is parsed after demand analysis, a work flow topology graph is generated by a flow modeling process, and is executed by an execution engine scheduling execution agent. The logs and indexes generated during the execution process are collected by a log perception and deviation identification module, and are then analyzed by a deviation identification agent, and finally an improvement scheme is generated by an optimization suggestion module, and a new round of process generation and testing is driven by an automatic iteration engine. In this way, a complete closed loop of demand analysis, process generation, execution, monitoring, diagnosis, optimization and regeneration of process arrangement can be realized, and autonomous intelligent iteration of the whole process can be realized.
[0039] Further, step S100 can specifically comprise steps S101-S102.
[0040] S101: The demand analysis agent performs intent recognition and entity extraction on the task demand by using a large language model, so as to decompose various subtasks and determine a task target, a task constraint and a task priority of each subtask; wherein each subtask is located in a subtask chain generated by a large language model through a preset task execution mechanism.
[0041] It is worth noting that the preset task execution mechanism can refer to an Agentic task process abstraction mechanism. Specifically, the demand analysis agent can adopt the Agentic task process abstraction mechanism to decompose the task into a subtask chain of an “observation-decision-execution-feedback” cycle by using a large language model, and the subtask chain is composed of various subtasks.
[0042] For example, for the task requirement of "help me monitor the server log and send an email alarm when error code 500 is found", it can be decomposed into the following subtasks: "monitor the server log", "detect error codes in the server log", and "trigger the email alarm function when error code 500 is found".
[0043] Further, the embodiments of the present application can combine business rules and constraint conditions in the domain knowledge base to determine the specific task target, task constraint and task priority of each subtask one by one. The task priority can be divided into P0, P1, P2, P3 and the like, the priority of P0 is higher than that of P1, the priority of P1 is higher than that of P2, and the priority of P2 is higher than that of P3.
[0044] For example, the task target of the subtask of "monitoring the server log" can be "obtaining the full running log of the specified server in the past 1 hour", the task constraint can be "only reading the logs of ERROR level and above", and the task priority can be P2. The task target of the subtask of "triggering the email alarm function when error code 500 is found" can be "sending an alarm email containing abnormal details to the preset contact list", the task constraint can be "the email sending needs to be completed within 30 seconds after the abnormality is identified", and the email content needs to contain the server IP, error occurrence time, error code and log segment, and the priority can be P0. The above content is only an example, and the specific task target, task constraint and task priority can be determined based on the actual situation, and the embodiments of the present application do not make specific limitations.
[0045] In some implementations, the structure of the subtask chain can be dynamically adjusted according to the complexity of the task requirement, to ensure the coherence and rationality of the subtask execution.
[0046] S102: generating a structured task description based on each subtask and its task target, task constraint and task priority.
[0047] It can be understood that the requirement analysis agent can integrate and construct a machine-readable structured task description based on each subtask and its task target, task constraint and task priority, as a unified input specification for subsequent process modeling and execution.
[0048] Further, step S200 can include the following steps S201-S202.
[0049] S201: The process modeling agent identifies and decomposes each subtask for implementing the task requirement according to the structured task description.
[0050] It can be understood that the structured task description includes each subtask corresponding to the task requirement, the task target of each subtask, the execution constraint, the priority, and the logical association relationship in the subtask chain, and based on the structured task description and / or the business rule in the domain knowledge base, the process modeling agent can identify and decompose each subtask.
[0051] S202: The process modeling agent matches each subtask in the process template library to obtain a workflow topology graph.
[0052] The process template library can store standardized workflow topology template of each field (such as operation and maintenance automation, data processing, business approval, etc.) verified by practice, and each template can clearly define the node definition, execution order, dependency relationship and trigger condition of the subtask in the typical scenario.
[0053] Further, the process modeling agent can filter out the optimal matching template through the similarity matching of the subtask characteristics and the template (such as task type, subtask combination logic, constraint condition coincidence degree, etc.), if the template completely meets the current task requirement, directly reuse and fine-tune the node parameters (such as execution timeout threshold, target data source), quickly generate an executable workflow topology graph, if there is a partial difference, the process modeling agent can add or delete nodes, adjust the dependency relationship based on the template, without building the process from scratch.
[0054] Alternatively, step S201 can further include the following step S203.
[0055] S203: The process modeling agent generates a workflow topology graph based on a preset knowledge base, execution conditions of each subtask, execution order, and dependency relationship between each subtask.
[0056] It can be understood that the embodiments of the present application can also autonomously construct a workflow topology graph. If there is no matching template in the process template library (such as special business logic requirements of subtasks), the process modeling agent can autonomously generate a workflow topology graph based on the preset domain knowledge base, execution conditions of each subtask (such as pre-node completion state, data standard requirement), execution order, and dependency relationship between subtasks (including data dependency, resource dependency, and time sequence dependency) through the logical reasoning ability of the large language model.
[0057] During the generation process, the flow modeling intelligent agent can follow the core rules of a directed acyclic graph (DAG) to ensure that there is only a one-way execution relationship between nodes and no circular dependency, and to convert the priority of a subtask into a node scheduling weight (a high-priority subtask corresponds to a node that is preferentially scheduled), and convert the execution constraint into a node trigger condition (for example, "only when the log reading node returns valid data, the error code identification node triggers execution"), and finally output a standardized JSON format flow definition containing node definition, directed edge association, execution condition configuration, and dependency relationship annotation, to ensure that the execution engine can directly parse and schedule.
[0058] It should be further noted that the flow topology graph can include multiple nodes, each of which can uniquely map a subtask, or multiple nodes can be combined to map to a subtask. The execution condition of a subtask can be mapped to the execution condition of a node, and the execution condition of each node is, for example, the completion state of the preceding node, the data threshold, the resource availability state, etc. The execution order of each subtask can be mapped to the execution order between nodes. In addition, the dependency relationship between subtasks can be mapped to the dependency relationship between subnodes, and the dependency relationship is, for example, data dependency, resource dependency, and timing dependency, etc.
[0059] Further, the execution engine can include a task scheduler and an execution agent cluster, and the execution agent cluster can be composed of multiple agents that provide lightweight services to realize functions such as log reading, API calling, and email sending. Step S300 can include the following steps S301-S303.
[0060] S301: The task scheduler parses the workflow topology graph, and generates and issues task execution instructions according to the multiple nodes in the workflow topology graph, the execution conditions of the nodes, the execution order between the nodes, and / or the dependency relationship between the nodes.
[0061] It can be understood that the task scheduler can be used to parse the flow definition and schedule the execution agent in the DAG order. Specifically, the task scheduler can structurally parse the workflow topology graph, and based on the parsing result, combine the priority configuration of the subtasks (obtained from the structured task description or the workflow topology graph) and the real-time resource state of the system (such as CPU usage, memory occupancy, and execution agent idle condition), to generate a task execution instruction containing "execution agent allocation rule, node trigger timing, data transmission path, and timeout retry strategy", and issue the instruction to the execution agent cluster through a message bus (such as Kafka) or an API, to ensure the reliability and real-time performance of the instruction transmission.
[0062] S302: The execution agent cluster receives the task execution instruction, schedules and runs the task execution intelligent agent corresponding to each subtask, to execute each subtask.
[0063] The execution agent cluster can provide a master node and a plurality of execution agent nodes (or computing resource nodes). The master node can be used to schedule the execution agent nodes. Each execution agent node can serve as an execution agent and be responsible for loading and running a task execution agent.
[0064] In the embodiments of the present application, after the task execution agent is started, the corresponding heterogeneous tools (such as a database query interface, a log reading tool, a mail pushing API, etc.) can be called according to the instruction requirements to access the domain resources, and the sub-tasks are executed in strict accordance with the node execution conditions.
[0065] S303: The execution agent cluster receives the execution results and the task execution logs returned by the task execution agents.
[0066] After the task execution agent completes the execution of the sub-tasks, two types of data can be returned: one is execution result data, and the other is task execution logs. The execution result can be in a structured format and can include task completion status, output data, and result representation, etc. For example, the execution result can include: "whether 500 error code is recognized", "error code occurrence times and time stamp", etc. The task execution logs can include structured logs and unstructured logs. The structured logs include, for example, execution start time, end time, tool name called, return status code, etc. The unstructured logs include, for example, exception error details, debugging information, etc. Further, the execution agent cluster can collect the execution results and the task execution logs returned by all the task execution agents through a unified data receiving interface, complete preliminary data verification (such as data integrity check, format standardization conversion), and then synchronously transmit them to the log storage and index collection module, to provide basic data support for subsequent log analysis and deviation identification.
[0067] It can be understood that in the process of steps S301-S303, the data flow path is: inputting the workflow topology graph to the task scheduler. Then, the task scheduler parses the workflow topology graph and distributes each sub-task to the corresponding task execution agent. The task execution agent can execute the sub-task and feed back the execution result and the task execution log to the task scheduler or the log storage and index collection module.
[0068] Further, continuing to refer to Figure 2The log storage and index collection module can include an Elasticsearch (ES), a Prometheus monitoring tool (a kind of time series database) and a Grafana data visualization platform. Further, the log storage and index collection module stores task execution logs using the Elasticsearch; the log storage and index collection module collects task execution index data (such as execution time consumption, resource occupation rate, progress percentage, etc.) in a subtask execution process using the Prometheus; and the log storage and index collection module visually displays the task execution logs and / or the task execution index data through the Grafana.
[0069] Further, in the embodiment of the application, the deviation recognition intelligent agent can compare the expected execution path and the actual execution path of each subtask in the workflow topology graph, and compare the expected index data and the task execution index data to obtain a deviation result. The actual execution path can carry the task execution node order of each subtask; the task execution index includes time consumption, success rate and / or resource occupation; the comparison result includes a deviation position, a deviation type corresponding to the deviation position, and a deviation influence evaluation; and the deviation type includes at least one of the following: node skipping, execution delay, abnormal exit and output not meeting expectations.
[0070] Figure 3 The second intelligent agent scheduling flowchart provided by the embodiment of the application is shown in FIG. 6.
[0071] As shown in FIG. 4, step S400 can include steps S401-S402. Figure 3
[0072] S401: The deviation recognition intelligent agent compares the node order of the expected execution path and the actual execution path, and compares the time consumption, success rate and / or resource occupation to obtain the deviation position and the deviation type corresponding to the deviation position.
[0073] After all subtasks are executed, the embodiment of the application can query the execution logs to obtain the actual execution path. Then, the expected execution path and the actual execution path can be compared in detail to find the positions of the differences between them, and the specific types of these deviations are determined, and then the deviation influence evaluation is generated according to the deviation position and the deviation type corresponding to the deviation position, so that subsequent optimization can be performed according to the specific information of these deviations.
[0074] In some implementations, the deviation types include node skipping (i.e., a certain step in the expectation is skipped in actual execution), execution delay (actual execution time is later than the expectation), abnormal exit (the task is not completed normally and is terminated in advance), and output does not meet the expectation (actual output is inconsistent with the expected output), etc.
[0075] In addition, the deviation identification agent can perform time-consuming comparison, success rate comparison, and / or resource occupation comparison. In the embodiments of the present application, the time-consuming, success rate, and resource occupation are explained as follows: ① Time-consuming: refers to the total time length from the start of execution to the completion (or termination) of a single subtask or an entire workflow, which is a key indicator for evaluating the efficiency of task execution.
[0076] For a subtask: for example, the time from initiating a log query request to obtaining complete log data of the "log reading subtask", which is usually measured in milliseconds (ms) or seconds (s); For a workflow: the whole process time from the start of the first subtask to the completion of the last subtask, which is used to measure the response speed of the overall process.
[0077] The time-consuming data can help identify performance bottlenecks, for example, if a certain API call subtask consumes much more time than the preset indicator, it can be determined that there is a performance problem in the node.
[0078] ② Success rate: refers to the proportion of the number of times that a subtask / workflow is completed as expected and the output result meets the requirements in a specified period or execution batch to the total number of executions, which is a core indicator for evaluating the stability and reliability of task execution.
[0079] Calculation formula: success rate = (number of successful executions ÷ total number of executions) × 100%; Determination standard: it needs to meet "no abnormal interruption in the execution process + the output result meets the preset specification", for example, the "mail alarm subtask" successfully sends a mail to the specified contact person and receives a receipt, which is considered as successful execution; if the mail sending fails due to interface failure or address error, it is determined as a failure. In the deviation identification process, the success rate and the preset indicator can be compared to locate the failure cause.
[0080] ③ Resource occupation: refers to the server hardware resources and system resources consumed during task execution, which is a key indicator for evaluating the impact of task execution on system load, and the core includes three categories: Computing resources: CPU usage, i.e., the proportion of CPU core processing time occupied during subtask execution to the total time; Storage resources: memory occupation rate, i.e., the size of memory space occupied during task execution, and the disk space occupied by temporarily generated files; Network resource: network bandwidth consumption generated in the task execution process, such as log reading, API calling and other sub-tasks involving data transmission, which will occupy certain uplink / downlink bandwidth.
[0081] Resource occupation data can be used to determine whether the task has resource waste or overload risk, for example, if the CPU usage of a certain sub-task is above 90% for a long time, it means that the node has a resource bottleneck and needs to optimize the execution logic or expand the hardware.
[0082] It can be understood that the above three types of indicators can be collected by Prometheus in real time.
[0083] After time-consuming comparison, success rate comparison and / or resource occupation comparison, the deviation identification agent can determine the deviation position and the deviation type corresponding to the deviation position.
[0084] S402: The deviation identification agent generates a deviation impact assessment based on the deviation position and the deviation type corresponding to the deviation position.
[0085] The embodiments of the present application can further evaluate the impact of the deviation on the overall task execution, including the impact analysis on the task completion time, resource consumption, final result accuracy, etc., and finally obtain the deviation impact assessment.
[0086] Further, the deviation identification agent can generate and output a JSON-formatted structured report, i.e., a deviation result (or a deviation report). The deviation report can include the deviation position, the deviation type, and the deviation impact assessment. It can be understood that the deviation identification agent can transmit the deviation result to the optimization suggestion agent through the message bus.
[0087] In some implementations, the deviation impact assessment can be a standardized evaluation result formed by the deviation identification agent combining the deviation position, the deviation type, and the quantitative and qualitative analysis of the various impacts of the deviation on the overall task execution. It can include "impact dimension, impact degree, impact range, risk level and associated suggestions".
[0088] Referring back to FIG. 5, before step S500, the following steps S601-S603 can also be included. Figure 3
[0089] S601: The optimization suggestion agent generates an optimization suggestion based on the comparison result, the workflow topology graph and / or the log analysis result of the task execution log; the optimization suggestion includes node replacement, node execution order adjustment and / or node execution parallelization.
[0090] In the embodiments of the present application, the log analysis result of the task execution log can be obtained by log-aware intelligent agent. The log-aware intelligent agent can be one of the intelligent agents under the log storage and index collection module. For example, the log analysis result can include the abnormal trigger frequency determined by log retrieval and the execution trajectory of the performance bottleneck node.
[0091] Further, the optimization suggestion intelligent agent can take the comparison result output by the deviation identification intelligent agent as input, and fuse the original logical structure of the workflow topology graph (DAG) and the task execution log deep analysis result provided by the log-aware intelligent agent. Through the logical reasoning ability of the large language model and the process optimization rules in the domain knowledge base, accurate optimization suggestions are generated.
[0092] The optimization suggestion specifically includes but is not limited to: ①Node replacement: For nodes with low response delay, low success rate or insufficient function adaptability (such as a certain API calling node responding too slowly, a certain data processing node with substandard accuracy), replace it with a node with better performance and stronger compatibility (such as replacing a high-efficiency interface or upgrading an algorithm model processing node); ②Node execution order adjustment: Based on the process redundancy or dependency conflict found by log analysis (such as unnecessary pre-node leading to increased overall process time), reorganize the timing relationship and dependency logic between nodes to reduce waiting time and improve process coherence by adjusting the node execution order; ③Node execution parallelization: Identify serial nodes without data dependency or resource conflict (such as independent log collection nodes and parameter verification nodes), and adjust them to parallel execution mode to improve overall process efficiency using distributed resources of the execution agent cluster; In some implementations, the optimization suggestion intelligent agent can also generate node execution condition optimization (such as adjusting trigger threshold, supplementing resource pre-check logic), timeout retry strategy adjustment (such as optimizing retry times, extending core node timeout threshold) and other suggestions according to actual scene requirements to ensure that the optimization covers the entire link of the process.
[0093] S602: The optimization suggestion intelligent agent sends the optimization suggestion to the automatic iteration engine.
[0094] In the embodiments of the present application, after the optimization suggestion intelligent agent generates the optimization suggestion, it can be packaged as standardized JSON format data, i.e. optimization suggestion. The optimization suggestion can include optimization target, involved node identifier, specific adjustment scheme, expected optimization effect (such as response time reduction ratio, success rate improvement target) and other key information, which is sent to the automatic iteration engine through a preset message bus (such as Kafka) or encrypted API interface.
[0095] S603: The automatic iteration engine receives the optimization suggestion, and invokes the process modeling agent to optimize the workflow topology based on the optimization suggestion, so as to obtain the optimized workflow topology.
[0096] In the embodiment of the application, the automatic iteration engine can receive the optimization suggestion through an interface listening or message subscription mechanism, and then immediately start a process optimization triggering process, invoke the process modeling agent and synchronously transmit the optimization suggestion, the original workflow topology and related execution data (such as a deviation report, a log analysis abstract) and the like.
[0097] Further, in step S500, the process modeling agent responds to the scheduling and makes targeted modifications to the original workflow topology. For example, if the optimization suggestion is node replacement, the process modeling agent can update the node identifier, the associated tool interface, the execution parameter and the like, while maintaining the consistency of the dependency relationship of the related nodes; if the optimization suggestion is sequence adjustment or parallelization transformation, the process modeling agent can redraw the directional edge association between the nodes, update the dependency relationship matrix and the execution scheduling rule, and ensure that the adjusted workflow still meets the core requirement of a directed acyclic graph. After the adjustment is completed, the process modeling agent can generate the optimized workflow topology and feed back to the automatic iteration engine, waiting for subsequent test verification.
[0098] Further, step S500 can further include the following steps S701-S702.
[0099] S701: The automatic iteration engine tests the optimized workflow topology in a sandbox environment using pre-defined test cases.
[0100] The sandbox environment refers to a test execution environment that is isolated from the production system and is safe and controllable. The sandbox environment can simulate the hardware resources, network configuration and heterogeneous tool interface of the production environment, but isolates the production data and business traffic to avoid affecting the actual business during the test process. Subsequently, the automatic iteration engine can automatically invoke a pre-defined set of standardized test cases to perform full-dimension testing on the optimized process.
[0101] The test cases can be used to implement the following tests: Expected execution path test: verifying whether the optimized process normally flows according to the preset logic, and whether the node execution sequence and the dependency relationship meet the design requirements; Boundary condition test: simulating extreme data volume (such as massive log input), parameter critical value (such as trigger threshold critical value) and the like, and verifying the fault tolerance and adaptability of the process; Abnormal handling test: simulating tool call failure, network interruption, data format exception and the like, and verifying whether the abnormal capture, retry mechanism and degradation strategy of the process are effective; Performance stress test: simulate high-concurrency request, long-time continuous running, etc. scenarios, collect process execution time consumption, resource occupancy rate, success rate, etc. indicators, and evaluate whether the performance improvement effect after optimization reaches the expected target.
[0102] For example, if the deviation identification shows that a certain API call node responds too slowly, the optimization suggestion is to replace the node with a more efficient alternative interface. In the sandbox environment, the response speed, stability, and data return accuracy of the alternative interface are verified through test cases such as simulating high-concurrency call scenarios and complex data input scenarios. At the same time, the overall time consumption of the process before and after optimization is compared to confirm the optimization effect.
[0103] S702: The automatic iteration engine determines the optimized workflow topology graph as the new workflow topology graph in the case of test passing.
[0104] In the embodiments of the present application, if the test case execution logic is correct, there is no abnormal error, and the performance indicators meet the expected optimization target, it is determined that the test passes. Then, the automatic iteration engine can redeploy the new workflow topology graph as the optimized process orchestration strategy to the production environment, realizing the full-link automation from "demand input" to "intelligent optimization iteration".
[0105] In some implementations, if the test fails, the application embodiments can record and output the failure reason (such as a specific node timeout). It can be understood that the test requirements can be flexibly set according to specific application circumstances. For example, if the following conditions occur, it is determined that the test requirements are not met: key path failure: such as the node that is expected to be executed exits abnormally or times out without completing; performance indicators do not meet the standards: such as task time consumption exceeds the threshold, resource occupancy is too high; output result error: such as the actual output and the expected output have deviations in data format, content or business logic, etc.
[0106] It should be further pointed out that the multi-agent collaborative task process orchestration method provided by the embodiments of the present application can further include the following step S801.
[0107] S801: The log-aware agent real-time monitors and analyzes the task execution log to obtain a log analysis result, which includes an abnormal pattern analysis result and / or a performance bottleneck analysis result.
[0108] Specifically, the log-aware intelligent agent can accurately locate the abnormal triggering scenario (such as failure of calling a certain node tool, mismatch of data format, execution pause caused by network interruption, etc.) by identifying error codes, abnormal error texts, and non-expected execution interruption records in the log, and output abnormal pattern analysis results. The abnormal pattern analysis results can include abnormal occurrence frequency, involved node identifier, abnormal triggering condition, and associated log segment, providing a basis for quickly locating the root cause of the problem. In addition, the log-aware intelligent agent can extract execution timestamps, resource occupation records and other key information contained in the log, and identify performance problems such as execution time exceeding threshold, resource occupation peak abnormality, and execution progress lag by combining the preset performance benchmarks of sub-tasks, and determine the node where the performance bottleneck is located and the possible causes (such as interface response delay, slow processing caused by large data volume, etc.), to obtain performance bottleneck analysis results.
[0109] In addition, the multi-agent collaborative task flow arrangement method provided by the embodiments of the present application can further include the following step S802.
[0110] S802: The log-aware intelligent agent retrieves the task execution log by a self-defined condition to obtain a log retrieval result; the self-defined condition includes a regular expression, a time range filter, and / or a specific field filter.
[0111] It can be understood that the log-aware intelligent agent can provide a SQL-like log query interface, supporting regular matching, time range filtering, and specific field filtering, etc. Specifically as follows: Regular expression matching: supporting filtering log content that meets specific format requirements (such as logs containing specific error codes, key fields) through regular expressions; Time range filtering: all logs generated within a specific time interval (such as the last 1 hour, a specified date range) can be retrieved, meeting the needs of tracing the execution process by time dimension; Specific field filtering: supporting accurate filtering by structured fields in the log (such as node ID, execution intelligent agent identifier, task status code, resource type, etc.), realizing directional query of the log.
[0112] In some implementations, the self-defined condition can be freely specified by the user during use.
[0113] In some implementations, the log-aware agent can push the log analysis result and the log retrieval result to the data visualization platform Grafana synchronously, and visualize the data in the form of a chart (line chart, column chart, heat map, etc.), list, time sequence flow, etc. For example, the time sequence chart is used to present the change trend of the execution time of each node, the pie chart is used to present the proportion of the distribution of the abnormal type, and the list is used to present the details of the retrieved target log, so that the key information in the log data is presented intuitively, the user or the operation and maintenance personnel can quickly master the execution state of the process, and the visualization support is provided for subsequent manual review and system optimization.
[0114] From the above, the embodiment of the application provides a multi-agent collaborative task process arrangement method. Based on the method, an autonomous closed loop, dynamic perception, and intelligent decision automatic workflow system can be constructed, the limitation of a static process engine depending on manual intervention is broken through, and full-link automation from demand input to intelligent optimization iteration of the process is realized. It can be seen that, on the one hand, the functions of the agents in the embodiment of the application are clear in boundary (for example, the log perception and the deviation identification are decoupled), and the efficient communication and data flow conversion collaborative mechanism is realized through a message bus or an API. On the other hand, the closed loop iteration engine automatically triggers the process regeneration and test verification by taking the optimization suggestion as input, and a complete feedback loop of demand analysis, process generation, execution, monitoring, diagnosis, optimization, and regeneration can be formed.
[0115] Figure 4 A structural schematic diagram of a multi-agent collaborative task process arrangement system provided by the embodiment of the application is shown.
[0116] As shown in Figure 4 , the multi-agent collaborative task process arrangement system provided by the embodiment of the application comprises: a demand analysis agent 1001 configured to receive a task demand input by a user, and process the task demand by using a large language model to obtain a structured task description; the structured task description comprises a plurality of subtasks for realizing the task demand; a process modeling agent 1002 configured to determine a workflow topology graph based on the structured task description; the workflow topology graph is used to define a plurality of nodes, an execution condition of the nodes, an execution sequence between the nodes, and / or a dependency relationship between the nodes, so as to represent an expected execution path of the subtasks; an execution engine 1003 configured to schedule and run a task execution agent corresponding to each subtask according to the workflow topology graph; a deviation identification agent 1004 configured to determine an actual execution path of each subtask based on a task execution log of each subtask, and compare the expected execution path and the actual execution path, and compare expected index data and task execution index data, to obtain a comparison result; The process modeling agent 1002 is further configured to optimize the workflow topology based on the comparison result.
[0117] In a possible implementation, the task execution indicators include time consumption, success rate and / or resource occupation, and the actual execution path carries the task execution node sequence of each subtask; the comparison result includes a deviation position, a deviation type corresponding to the deviation position, and a deviation impact assessment; and the deviation type includes at least one of the following: node skipping, execution delay, abnormal exit and output not meeting expectations.
[0118] In a possible implementation, the deviation identification agent 1004 is configured to compare the node sequence of the expected execution path and the actual execution path, and perform time consumption comparison, success rate comparison and / or resource occupation comparison to obtain the deviation position and the deviation type corresponding to the deviation position; and the deviation identification agent 1004 is further configured to generate the deviation impact assessment based on the deviation position and the deviation type corresponding to the deviation position.
[0119] In a possible implementation, the multi-agent collaborative task flow arrangement system provided by the embodiment of the present application further includes an optimization suggestion agent and an automatic iteration engine; the optimization suggestion agent is configured to generate an optimization suggestion based on the comparison result, the workflow topology and / or log analysis result of the task execution log; the optimization suggestion includes node replacement, node execution sequence adjustment and / or node execution parallelization; and the optimization suggestion agent is further configured to send the optimization suggestion to the automatic iteration engine. The automatic iteration engine is configured to receive the optimization suggestion and invoke the process modeling agent 1002, so that the process modeling agent 1002 optimizes the workflow topology based on the optimization suggestion, and thus obtains an optimized workflow topology.
[0120] In a possible implementation, the automatic iteration engine is further configured to test the optimized workflow topology using a predefined test case in a sandbox environment; and the automatic iteration engine is further configured to determine the optimized workflow topology as a new workflow topology if the test is passed.
[0121] In a possible implementation, the process modeling agent 1002 is further configured to identify and decompose each subtask for implementing the task requirement according to the structured task description; and the process modeling agent 1002 is further configured to match each subtask in a process template library to obtain the workflow topology; or the process modeling agent 1002 is further configured to generate the workflow topology based on a preset knowledge base, execution conditions, execution sequences of each subtask and a dependency relationship between each subtask.
[0122] In a possible implementation, the execution engine 1003 includes a task scheduler and an execution agent cluster; the task scheduler is configured to parse the workflow topology graph, and generate and issue task execution instructions according to the plurality of nodes in the workflow topology graph, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes; the execution agent cluster is configured to receive the task execution instructions, schedule and run task execution agents corresponding to each subtask to execute each subtask, and receive execution results and task execution logs returned by each task execution agent.
[0123] In a possible implementation, the multi-agent collaborative task flow arrangement system provided by the embodiment of the application further includes a log storage and index collection module, the log storage and index collection module is configured to store the task execution logs by using a distributed search engine Elasticsearch; and / or, the log storage and index collection module is configured to collect task execution index data in a subtask execution process by using a time series database Prometheus; and / or, the log storage and index collection module is configured to visually display the task execution logs and / or the task execution index data by using a data visualization platform Grafana.
[0124] In a possible implementation, the multi-agent collaborative task flow arrangement system provided by the embodiment of the application further includes a log-aware agent, the log-aware agent is configured to listen to and analyze the task execution logs in real time to obtain log analysis results, the log analysis results include abnormal pattern analysis results and / or performance bottleneck analysis results; and / or, the log-aware agent is configured to search the task execution logs by using a custom condition to obtain log search results; the custom condition includes a regular expression, a time range filter, and / or a specific field filter.
[0125] In a possible implementation, the requirement analysis agent 1001 is further configured to perform intent recognition and entity extraction on the task requirement by using a large language model, to decompose each subtask and determine a task target, a task constraint, and a task priority of each subtask; each subtask is located in a subtask chain generated by the large language model through a preset task execution mechanism; and the requirement analysis agent 1001 is further configured to generate a structured task description based on each subtask and the task target, the task constraint, and the task priority of each subtask.
[0126] From the above, it can be known that the embodiment of the application provides a multi-agent collaborative task flow arrangement system, which realizes full-life-cycle automatic management from requirement understanding to process optimization by introducing a plurality of intelligent agents with exclusive capabilities.
[0127] In specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium can store a program, and the program can include some or all steps in the embodiments of the multi-agent cooperative task flow arrangement method provided by the present application when executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0128] It is easy to understand that, based on the several embodiments provided by the present application, the skilled in the art can combine, split, recombine, etc. the embodiments of the present application to obtain other embodiments, and these embodiments do not exceed the protection scope of the present application.
[0129] The above specific embodiments have further detailed the purposes, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above is only the specific implementation of the embodiments of the present application, and is not used to limit the protection scope of the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. A method for task flow orchestration of multi-agent collaboration, characterized in that, The method comprises the following steps: receiving a task requirement of a user input by a requirement analysis agent, and processing the task requirement by a large language model through the requirement analysis agent to obtain a structured task description; the structured task description comprises a plurality of sub-tasks for realizing the task requirement; determining a workflow topology based on the structured task description by a process modeling agent; the workflow topology is used to define a plurality of nodes, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes, so as to represent an expected execution path of the sub-tasks; scheduling and running a task execution agent corresponding to each sub-task according to the workflow topology by an execution engine; determining an actual execution path of each sub-task based on a task execution log of each sub-task by a deviation identification agent, and comparing the expected execution path and the actual execution path, and comparing expected index data and task execution index data by the deviation identification agent to obtain a comparison result; optimizing the workflow topology based on the comparison result by the process modeling agent.
2. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, The task execution index comprises time consumption, success rate and / or resource occupation, and the actual execution path carries the task execution node sequence of each sub-task; the comparison result comprises a deviation position, a deviation type corresponding to the deviation position, and a deviation influence evaluation; the deviation type comprises at least one of the following: node skipping, execution delay, abnormal exit and output not meeting expectations; the comparison between the expected execution path and the actual execution path by the deviation identification agent, and the comparison between the expected index data and the task execution index data to obtain the comparison result, comprises: the deviation identification agent compares the node sequence of the expected execution path and the actual execution path, and compares the time consumption, the success rate and / or the resource occupation to obtain the deviation position and the deviation type corresponding to the deviation position; the deviation identification agent generates the deviation influence evaluation based on the deviation position and the deviation type corresponding to the deviation position.
3. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, Before the step of optimizing the workflow topology based on the comparison result by the process modeling agent, the method further comprises: generating an optimization suggestion based on the comparison result, the workflow topology and / or a log analysis result of the task execution log by an optimization suggestion agent; the optimization suggestion comprises node replacement, node execution sequence adjustment and / or node execution parallelization; the optimization suggestion agent sends the optimization suggestion to an automatic iteration engine; the automatic iteration engine receives the optimization suggestion and calls the process modeling agent to optimize the workflow topology based on the optimization suggestion by the process modeling agent, thereby obtaining an optimized workflow topology.
4. The multi-agent collaborative task flow orchestration method according to claim 3, characterized in that, After the step of optimizing the workflow topology based on the comparison result by the process modeling agent, the method further comprises: the automatic iteration engine tests the optimized workflow topology in a sandbox environment using a pre-defined test case; The automatic iteration engine determines the optimized workflow topology as a new workflow topology in the case of test passing.
5. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, The workflow modeling agent determines a workflow topology based on the structured task description, including: The workflow modeling agent identifies and decomposes various sub-tasks for implementing the task requirements according to the structured task description; The workflow modeling agent matches various sub-tasks in a process template library to obtain the workflow topology; Alternatively, the workflow modeling agent generates the workflow topology based on a preset knowledge base, execution conditions, execution sequences of various sub-tasks, and dependency relationships between various sub-tasks.
6. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, The execution engine includes a task scheduler and an execution agent cluster; The execution engine schedules and runs task execution agents corresponding to various sub-tasks according to the workflow topology, including: The task scheduler parses the workflow topology and generates and issues task execution instructions according to multiple nodes in the workflow topology, execution conditions of nodes, execution sequences between nodes, and / or dependency relationships between nodes; The execution agent cluster receives the task execution instructions, schedules and runs the task execution agents corresponding to various sub-tasks to execute various sub-tasks; The execution agent cluster receives execution results and task execution logs returned by various task execution agents.
7. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, The method further includes: The log storage and index collection module stores the task execution logs using a distributed search engine Elasticsearch; And / or, the log storage and index collection module collects the task execution index data in the sub-task execution process using a time series database Prometheus; And / or, the log storage and index collection module visually displays the task execution logs and / or the task execution index data through a data visualization platform Grafana.
8. The multi-agent cooperative task flow orchestration method according to claim 1 or 3, characterized in that, The method further includes: The log-aware agent listens to and analyzes the task execution logs in real time to obtain log analysis results, including abnormal pattern analysis results and / or performance bottleneck analysis results; And / or, the log-aware agent retrieves the task execution logs through a custom condition to obtain log retrieval results; the custom condition includes a regular expression, a time range filter, and / or a specific field filter.
9. The multi-agent collaborative task flow orchestration method according to claim 1, characterized in that, The requirement analysis agent processes the task requirements through a large language model to obtain a structured task description, including: The requirement analysis agent performs intent recognition and entity extraction on the task requirements using the large language model to decompose various sub-tasks and determine task objectives, task constraints, and task priorities of each sub-task; each sub-task is located in a sub-task chain generated by the large language model through a preset task execution mechanism; Based on various sub-tasks and their task objectives, task constraints, and task priorities, the structured task description is generated.
10. A multi-agent collaborative task flow orchestration system, characterized in that, including: The demand analysis intelligent agent is configured to receive a task demand input by a user, and process the task demand by using a large language model to obtain a structured task description. The structured task description includes various sub-tasks for implementing the task demand. The process modeling intelligent agent is configured to determine a workflow topology based on the structured task description. The workflow topology is configured to define multiple nodes, execution conditions of the nodes, execution sequences between the nodes, and / or dependency relationships between the nodes, to represent an expected execution path of the various sub-tasks. The execution engine is configured to schedule and run task execution intelligent agents corresponding to the various sub-tasks according to the workflow topology. The deviation identification intelligent agent is configured to determine an actual execution path of each sub-task based on task execution logs of the sub-task, and compare the expected execution path with the actual execution path, and compare expected index data with task execution index data, to obtain a comparison result. The process modeling intelligent agent is further configured to optimize the workflow topology based on the comparison result.
Citation Information
Cited By
Code optimization method based on multi-agent collaboration
CN122064326A