CN-122019091-A - Multi-agent scheduling system and collaborative scheduling method
Abstract
The invention relates to a multi-agent scheduling method and a system, which comprise the steps of receiving user request information, transmitting the request information to a task allocation module and/or an agent for executing tasks, wherein the task allocation module is used for analyzing the user request information, generating a matching mark, and allocating the user request information to the agents for executing the tasks through the matching mark, and the number of the agents for executing the tasks contained in the user request information is multiple. The invention can realize dynamic routing flexibility, routing decisions are automatically made by LLM according to semantic understanding without maintaining a rule base, has strong self-adaptive capacity, can process various complex requests, has low expansion cost, and can realize the new addition of an agent only by registering in configuration without depending on predefined rules.
Inventors
- Qian Haowei
Assignees
- 曜澜智能信息科技(上海)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260127
Claims (10)
- 1. A multi-agent scheduling method is characterized by comprising the following steps of; receiving a user request message; Transmitting the request information to a task distribution module and/or the task execution agent; The task allocation module is used for analyzing the user request information, generating a matching mark and allocating the user request information to the task execution agent through the matching mark; the number of the task execution agents is a plurality of, and the task execution agents are used for executing tasks contained in the user request information.
- 2. The multi-agent scheduling method of claim 1 further comprising a chained depth limit comprising counting an amount of tasks currently performed by each of the task performing agents and stopping the task performing agent delegation to the task when the amount of tasks currently performed reaches a set threshold.
- 3. The multi-agent scheduling method of claim 2 wherein the current chain depth counter is maintained in a workflow state, the depth counter is incremented by 1 each time an inter-agent delegation occurs, the depth counter is decremented by 1 after the delegation task is completed, and continued delegation is stopped when the depth counter reaches a preset maximum value, the depth counter being set in the task execution agent, the task allocation module, or independently set.
- 4. The multi-agent scheduling method of claim 1 wherein the task allocation module is configured to analyze a user request to generate a response text containing the @ introduction tag, then extract the @ introduction tag from the response text via a regular expression, match the extracted tag with a predefined task execution agent configuration, add the successfully matched task execution agent to a delegation list, and dynamically route the task to a corresponding task execution agent according to the delegation list.
- 5. The multi-agent scheduling method of claim 1, comprising context-sync delivery, when a new task execution agent is enabled or a task execution agent is switched, constructing a delegation hint, and then delivering the delegation hint to a task execution agent that needs to execute a task, the delegation hint comprising a user original request, a Supervisor instruction, and a precursor agent response result.
- 6. The multi-agent scheduling method of claim 1 wherein the task allocation module comprises a plurality of modes of operation wherein the task allocation module automatically makes a delegation decision in at least one of the modes of operation wherein the task allocation module pauses waiting for user confirmation prior to delegation and allocates tasks to the task execution agents after user confirmation and wherein at least one of the modes of operation supports parallel responses and streaming output by all of the task execution agents.
- 7. The multi-agent-based scheduling system is characterized by comprising the following steps: The user interaction module is used for receiving user request information; the task allocation module is used for analyzing the user request information, generating a matching mark and allocating the user request information to the task execution agent through the matching mark; and the task execution agent is used for executing the task contained in the user request information.
- 8. The multi-agent based dispatch system of claim 7, wherein the task allocation module comprises: The Supervisor agent is used for the task allocation module to analyze the user request and generate a response text containing the @ introduction mark or identify a mode switching instruction in the user request information. The system comprises a response text, a route analysis unit, a mode control unit and a task execution agent, wherein the response text is used for storing a task execution agent configuration, the route analysis unit is used for extracting a @ segment mark from the response text through a regular expression, matching the extracted mark with the predefined task execution agent configuration, and the mode control unit is used for switching the working mode of the task execution agent according to a mode switching instruction recognized by the Supervisor agent.
- 9. The multi-agent based dispatch system of claim 8, further comprising a depth counter that is incremented by 1 each time an inter-agent delegation occurs, the depth counter being decremented by 1 after the delegation task is completed, and continuing delegation when the depth counter reaches a preset maximum value.
- 10. The multi-agent-based scheduling system of claim 7, further comprising a context management unit configured to isolate and store a delegation hint, wherein the delegation hint is transferred to a task execution agent that needs to execute a task when a new task execution agent is enabled or a task execution agent is switched, and wherein the delegation hint comprises a user original request, a Supervisor instruction, and a precursor agent response result.
Description
Multi-agent scheduling system and collaborative scheduling method Technical Field The invention relates to the technical field of artificial intelligence, in particular to a multi-agent scheduling system. Background With the rapid development of Large Language Model (LLM) technology, LLM-based Agent systems have gained widespread attention in enterprise applications. At present, the multi-agent cooperation system mainly comprises the following technical schemes: (1) Rule-based task allocation system The traditional multi-agent system adopts a predefined rule to carry out task allocation, such as task routing based on keyword matching, namely, allocating tasks to corresponding agents by identifying keywords input by users, and static allocation based on task types, namely, the mapping relation between the task types and the agents is required to be predefined. Such a solution comprises at least the following technical drawbacks: The rule maintenance cost is high, the rule base needs to be updated every time a new task type is added, complex and cross-domain compound tasks cannot be processed, the flexibility is poor, and the diversity of user expression is difficult to deal with (2) Central scheduler based system And (3) uniformly managing all agents by adopting a central scheduler, and distributing tasks according to a preset flow after the scheduler receives a user request. The scheme at least comprises the following technical defects that the intelligent agents lack of dynamic cooperation capability, cannot adaptively adjust an execution strategy according to task complexity and have high single-point fault risk (3) Existing LLM Agent framework The multi-agent frameworks (e.g., autoGen, crewAI, etc.) known in the industry suffer from the following problems: Delegation relationships between agents are typically statically configured, lack of an effective loop delegation protection mechanism may result in infinite loops, context is easily lost or confused when passing between agents, and it is difficult for users to intervene in a workflow in real time. Disclosure of Invention The invention aims to overcome the defects of the prior art, provides a multi-agent scheduling method, and aims to solve the problem that a routing mechanism with regular or static configuration cannot adapt to complex and variable user requirements. The invention relates to a multi-agent scheduling method, which comprises the following steps of; receiving a user request message; Transmitting the request information to a task distribution module and/or the task execution agent; The task allocation module is used for analyzing the user request information, generating a matching mark and allocating the user request information to the task execution agent through the matching mark; the number of the task execution agents is a plurality of, and the task execution agents are used for executing tasks contained in the user request information. Preferably, the method further comprises a chain type depth limitation, wherein the chain type depth limitation comprises the step of counting the currently executed task quantity of each task execution agent, and when the currently executed task quantity reaches a set threshold value, the task execution agent delegation task is stopped to the task. Preferably, the method further comprises the steps of maintaining a current chained depth counter in a workflow state, adding 1 to the depth counter when the delegation among agents occurs each time, subtracting 1 from the depth counter after the delegation task is finished, and stopping continuing delegation when the depth counter reaches a preset maximum value, wherein the depth counter is arranged in the task execution agent, the task distribution module or independently arranged. Preferably, the task allocation module is used for analyzing a user request to generate a response text containing a @ introduction mark, extracting the @ introduction mark from the response text through a regular expression, matching the extracted mark with a predefined task execution agent configuration, adding the successfully matched task execution agent to a delegation list, and dynamically routing the task to the corresponding task execution agent according to the delegation list. Preferably, the method comprises the steps of context synchronous transmission, when a new task execution agent is started or task execution agent is switched, constructing a delegation prompt, and then transmitting the delegation prompt to the task execution agent needing to execute the task, wherein the delegation prompt comprises a user original request, a Supervisor instruction and a precursor agent response result. Preferably, the task allocation module comprises a plurality of working modes, wherein in at least one working mode, the task allocation module automatically makes delegation decisions, and in at least one working mode, the task allocation module pauses to wait for user confirmat