Multi-agent cooperation method and system, electronic equipment and program product

By using a multi-agent collaboration method, the complexity of the task is identified and the target response agent is selected for division of labor and collaboration. This solves the problem that a single AI assistant is unable to handle multi-domain tasks, and realizes efficient and flexible multi-agent collaboration and integration of external tools, thereby improving task processing efficiency and result quality.

CN121807465APending Publication Date: 2026-04-07MOBVOI (WUHAN) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, single AI assistants struggle to handle complex tasks involving collaboration of expertise across multiple domains, resulting in poor interaction effects, a lack of effective multi-agent collaboration mechanisms, insufficient system flexibility and adaptability, difficulty in meeting the collaborative needs of team-level tasks, and complex integration with external tools.

Method used

By identifying input messages in group dialogues, the complexity of tasks and target response agents are determined. A multi-agent collaboration method is adopted for division of labor and cooperation. External tools are dynamically invoked using the MCP protocol to maintain cross-session dialogue records, construct participant relationship graphs, and realize the self-optimization and personalized customization of agents.

Benefits of technology

It improves the processing efficiency and result quality of complex tasks, reduces semantic conflicts and content duplication, lowers the user's understanding cost, enhances the system's flexibility and adaptability, and supports multi-user and multi-agent hybrid collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807465A_ABST
    Figure CN121807465A_ABST
Patent Text Reader

Abstract

The invention provides a multi-agent cooperation method and system, electronic equipment and a program product. The multi-agent cooperation method comprises the steps that identification is carried out according to an input message received in a group conversation, a to-be-processed task and task complexity are determined, the task complexity is used for representing the size of computing resources needing to be called for completing the to-be-processed task, and the group conversation comprises a plurality of agents; according to the to-be-processed task, the task complexity, a dialogue record in the group dialogue and attribute information of each agent, at least one target response agent is determined from the multiple agents, and the attribute information is used for describing roles or skills of the agents; calling the target response agent to generate response content for the to-be-processed task; and sending the response content to the group conversation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a multi-agent collaboration method, system, electronic device, and program product. Background Technology

[0002] With the advancement of artificial intelligence (AI) technology, especially the development of large language models, intelligent agent systems have been applied to various human-computer interaction scenarios. Current technical solutions generally employ a single-agent architecture, meaning users can only engage in simple question-and-answer interactions with a single AI assistant. However, when faced with complex tasks requiring collaboration across multiple domains of expertise, a single AI assistant cannot effectively handle them, resulting in poor interaction performance. Summary of the Invention

[0003] This disclosure provides a multi-agent collaboration method, system, electronic device, and program product.

[0004] According to one aspect of this disclosure, a multi-agent collaboration method is provided, comprising: identifying, based on input messages received in a group dialogue, a task to be processed and a task complexity, wherein the task complexity characterizes the amount of computing resources required to complete the task to be processed, and the group dialogue includes multiple agents; determining at least one target responding agent from the multiple agents based on the task to be processed, the task complexity, dialogue records in the group dialogue, and attribute information of each agent, wherein the attribute information describes the agent's role or skills; invoking the target responding agent to generate response content for the task to be processed; and sending the response content to the group dialogue.

[0005] According to one technical solution, the task to be processed and its complexity are determined by identifying input messages received in a group dialogue, thereby accurately assessing task requirements. Next, a target responding agent is determined based on the task to be processed, task complexity, dialogue records, and agent attribute information (role or skill). Then, by invoking the target responding agent and returning a response in the group dialogue, multiple agents can collaborate according to their respective expertise in a unified dialogue environment, significantly improving the processing efficiency and result quality of complex tasks.

[0006] According to at least one embodiment of the multi-agent collaboration method of this disclosure, the method identifies and determines the task to be processed and the task complexity based on the input message received in the group dialogue, including: performing semantic recognition based on the input message received in the group dialogue and the dialogue record in the group dialogue to determine semantic information; determining the task to be processed based on the semantic information; and evaluating the complexity of the task to be processed to determine the task complexity, wherein the task complexity includes a single agent task, a multi-agent collaboration task, or a tool invocation task.

[0007] According to the technical solution of this embodiment, through multi-source information fusion and contextual analysis, the task intent can be accurately identified. Furthermore, based on complexity assessment, the most suitable processing strategy can be matched for tasks of different complexities, thereby improving task processing efficiency and processing effect.

[0008] According to at least one embodiment of the multi-agent collaboration method of this disclosure, determining at least one target responding agent from multiple agents based on the task to be processed, task complexity, dialogue records in a group dialogue, and attribute information of each agent, includes: identifying an agent mention pattern in an input message, where the agent mention pattern includes direct mention, role mention, reply mention, or semantic mention; determining the matching degree between each agent and the task to be processed based on the agent mention pattern, the task to be processed, task complexity, dialogue records in a group dialogue, and attribute information of each agent; and determining at least one target responding agent from multiple agents based on the matching degree of each agent.

[0009] According to the technical solution of this embodiment, the determination of the agent mention pattern can accurately capture the user's implicit intent, enabling the user to interact with specific agents in a more natural way without needing to precisely remember the agent's name. Furthermore, by determining the agent mention pattern and comprehensively considering various factors, the matching degree between the determined target response agent and the task to be processed can be improved.

[0010] According to at least one embodiment of the multi-agent cooperation method of this disclosure, a target response agent is invoked to generate response content for a task to be processed, including: when there are multiple target response agents, performing conflict detection on the first response content generated by each target response agent; when there are conflicts between the first response contents, coordinating the multiple first response contents to obtain a second response content.

[0011] According to the technical solution of this embodiment, the multi-dimensional conflict detection and coordination mechanism can effectively reduce semantic conflicts and content redundancy in multi-agent responses, significantly improving the quality and efficiency of group dialogue. Furthermore, the coordinated second response content eliminates the need for users to manually integrate contradictory information, reducing the user's comprehension cost.

[0012] The multi-agent cooperation method according to at least one embodiment of the present disclosure further includes: discovering and identifying one or more external tools based on the task to be processed; sending the task parameters of the task to be processed to the external tools for parallel processing; and receiving the processing results returned by the external tools, wherein the processing results are used for reference by the target response agent when generating response content.

[0013] According to the technical solution of this embodiment, the MCP protocol can reduce the complexity of tool integration and eliminate the need for extensive manual configuration. Furthermore, through the complementary collaboration of multiple tools, the quality of complex task processing can be effectively improved.

[0014] The multi-agent cooperation method according to at least one embodiment of the present disclosure further includes: acquiring performance data of multiple agents during task execution; determining the agent to be optimized and its optimization points based on the performance data of each agent; and generating and executing optimization instructions for the agent to be optimized based on the optimization points.

[0015] According to the technical solution of this embodiment, through comprehensive performance data collection and multi-dimensional analysis, the intelligent agent can continuously improve itself based on actual performance. This ensures that the intelligent agent always maintains its optimal operating state and reduces the fluctuation range of the overall system performance.

[0016] The multi-agent collaboration method according to at least one embodiment of the present disclosure further includes: maintaining cross-session dialogue records of different group dialogues and constructing a participant relationship graph; performing correlation analysis and compression on the cross-session dialogue records based on the participant relationship graph, and extracting key contextual information therein; and sending the key contextual information to the target response agent for reference when generating response content.

[0017] According to the technical solution of this embodiment, by maintaining cross-session dialogue records and constructing participant relationship graphs, the system can maintain long-term dialogue coherence and reduce context breakage issues. Furthermore, by extracting key contextual information, the cost of calling large language models can be significantly reduced while maintaining the integrity of key information, enabling the system to provide high-quality services even in resource-constrained environments.

[0018] The multi-agent collaboration method according to at least one embodiment of the present disclosure further includes: determining the role description and skill tags of the agent to be created based on the received agent creation request; receiving a knowledge file associated with the agent to be created; and initializing the agent based on the role description, skill tags, and knowledge file to complete the creation of the agent.

[0019] According to the technical solution of this embodiment, users can customize the relevant information of the intelligent agent and upload relevant files as its knowledge base, thereby meeting the personalized customization needs under different tasks and scenarios.

[0020] According to another aspect of this disclosure, a multi-agent collaborative system is provided, comprising: an intelligent mention system for recognizing input messages in a group dialogue and triggering responses from corresponding agents; an intent analyzer for performing intent recognition and task complexity assessment on the input messages; and a group AI manager for coordinating the responses and collaborations of at least one agent in a group dialogue based on the analysis results of the intent analyzer.

[0021] The multi-agent collaborative system according to at least one embodiment of the present disclosure further includes: a dynamic tool manager for discovering and invoking external tools based on a model context protocol; or a unified context manager for maintaining cross-session dialogue records and implementing fine-grained data privacy control; or an architecture adaptation manager for implementing recursive self-optimization of agents; or a task manager for implementing concurrent processing of tasks; or a dialogue quality manager for evaluating and optimizing dialogue quality.

[0022] According to another aspect of this disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, such that the processor performs a multi-agent cooperative method according to any embodiment of this disclosure.

[0023] According to another aspect of this disclosure, a readable storage medium is provided, wherein executable instructions are stored therein, which, when executed by a processor, are used to implement a multi-agent cooperative method according to any embodiment of this disclosure.

[0024] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a multi-agent cooperative method according to any embodiment of this disclosure. Attached Figure Description

[0025] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0026] Figure 1 A schematic diagram illustrating an application scenario of a multi-agent cooperative method according to an embodiment of the present disclosure is shown.

[0027] Figure 2 A flowchart illustrating a multi-agent cooperation method according to one embodiment of the present disclosure is shown.

[0028] Figure 3 A flowchart illustrating step S210 of a multi-agent cooperative method according to an embodiment of the present disclosure is shown.

[0029] Figure 4 A flowchart illustrating step S220 of a multi-agent cooperative method according to an embodiment of the present disclosure is shown.

[0030] Figure 5 A flowchart illustrating step S230 of a multi-agent cooperative method according to an embodiment of the present disclosure is shown.

[0031] Figure 6 A flowchart illustrating the invocation of external tools is shown in a multi-agent collaboration method according to an embodiment of the present disclosure.

[0032] Figure 7 A flowchart illustrating the optimization agent included in a multi-agent cooperation method according to one embodiment of the present disclosure is shown.

[0033] Figure 8 A flowchart illustrating the extraction of key context information is shown in a multi-agent cooperation method according to an embodiment of the present disclosure.

[0034] Figure 9 A schematic diagram of the process of creating agents is shown in a multi-agent cooperation method according to one embodiment of the present disclosure.

[0035] Figure 10 A schematic block diagram of a multi-agent cooperative system according to one embodiment of the present disclosure is shown.

[0036] Figure 11 A schematic diagram of the workflow of a multi-agent cooperative system according to one embodiment of the present disclosure is shown.

[0037] Figure 12 A schematic structural block diagram of an electronic device according to one embodiment of the present disclosure is shown. Detailed Implementation

[0038] The present disclosure will now be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.

[0039] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0040] In the field of artificial intelligence human-computer interaction, existing technical solutions have several technical problems that urgently need to be solved.

[0041] First, in terms of system architecture, existing solutions are mostly based on single, general-purpose intelligent agents interacting with users. This model struggles to handle complex tasks requiring collaboration of expertise from multiple domains, and lacks effective mechanisms to coordinate the division of roles and complementary cooperation among multiple intelligent agents. This results in insufficient comprehensiveness and professionalism in problem-solving in scenarios such as project planning and product design.

[0042] Secondly, in terms of flexibility and adaptability, existing systems typically only provide preset agent roles. Users cannot easily customize the agent's name, role, skills, and exclusive knowledge base according to specific task scenarios, thus limiting the system's personalized application. At the same time, the systems generally lack unified and efficient management capabilities for long-term, cross-conversation dialogue contexts, resulting in poor coherence in multi-turn interactions and making it difficult for agents to make accurate responses based on complete historical information.

[0043] Furthermore, in terms of collaboration modes, existing technologies are generally limited to "user-single agent" interaction, unable to support mixed collaboration of "multi-user-multi-agent" in the same session, making it difficult to meet the collaborative needs of team-level tasks. In addition, the integration of the system with external tools and services often requires complex hard coding and manual configuration, lacking dynamic discovery and invocation capabilities, resulting in poor functional scalability and weak adaptability.

[0044] To address this, this disclosure proposes the following technical solution, in which the task to be processed and its complexity are determined by identifying input messages received in a group dialogue, thereby accurately assessing task requirements. Next, a target responding agent is determined based on the task to be processed, task complexity, dialogue records, and agent attribute information (role or skill). Then, by invoking the target responding agent and returning a response in the group dialogue, multiple agents can collaborate according to their respective expertise within a unified dialogue environment, significantly improving the processing efficiency and result quality of complex tasks.

[0045] Figure 1A schematic diagram illustrating an application scenario of a multi-agent cooperative method according to an embodiment of the present disclosure is shown.

[0046] In this application scenario, it may include terminal device 101, network 102, and server 103. The terminal device 101 may include, but is not limited to, one or more of smartphones, tablets, and laptops, or other electronic devices with data transmission and data processing functions.

[0047] Network 102 is a medium used to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired communication links, wireless communication links, etc.

[0048] Users can interact with server 103 via network 102 using terminal device 101 to receive or send messages. Server 103 can be a server providing various services. For example, a user can send a message in a created group chat using terminal device 101. Server 103 can identify the input message received in the group chat, determine the task to be processed and its complexity, where the task complexity represents the amount of computing resources required to complete the task, and the group chat contains multiple agents. Then, server 103 can determine at least one target responding agent from among the multiple agents based on the task to be processed, task complexity, dialogue records in the group chat, and attribute information of each agent, where attribute information describes the agent's role or skills; it can then invoke the target responding agent to generate a response for the task to be processed and send the response to the group chat.

[0049] Figure 2 A flowchart illustrating a multi-agent cooperation method according to one embodiment of the present disclosure is shown. This multi-agent cooperation method can be applied to terminal devices (e.g., smartphones, computers, etc.) or servers. Figure 2 As shown, the multi-agent cooperation method may include steps S210 to S240.

[0050] In step S210, the task to be processed and its complexity are determined based on the input messages received in the group dialogue. The task complexity is used to characterize the amount of computing resources required to complete the task to be processed. The group dialogue contains multiple agents.

[0051] Group dialogues can be dialogue environments in which multiple agents and / or real users participate. Users can create group dialogues and add multiple agents to the same session. Each agent can automatically participate in task dialogues and collaborate to solve problems based on its set roles and skills.

[0052] Input messages can be text messages sent by real users or any intelligent agent in a group conversation. Their content can constitute the request body of the current interaction round and serve as a direct data source for subsequent task analysis.

[0053] The task to be processed can be one or more action units with clear objectives, which are abstracted from the parsed input message, such as data analysis and copywriting.

[0054] Task complexity can be an indicator of the amount of computing resources required to complete a task.

[0055] In this implementation, when a new input message is detected in a group conversation, that input message can be acquired. Then, the input message is identified by recognizing task-related keywords to determine explicit instructions or implicit requirements, thus clarifying the task to be processed.

[0056] Then, the complexity of the task to be processed can be evaluated according to a pre-set algorithm or rules to determine the corresponding task complexity. For example, it can be evaluated whether the task requires cross-domain knowledge, whether it needs to call external tools or APIs (Application Programming Interfaces), and the number of core reasoning or execution steps required to complete the task, processing time, etc.

[0057] In step S220, at least one target responding agent is determined from the plurality of agents based on the task to be processed, the task complexity, the dialogue records in the group dialogue, and the attribute information of each agent. The attribute information is used to describe the role or skills of the agent.

[0058] The dialogue record can be a complete interaction history containing the current session, which may include the historical response content of each agent, user feedback, cooperation relationships between agents, or task allocation records, etc.

[0059] The attribute information of an intelligent agent can be feature data used to describe the professional capabilities of the intelligent agent, which may include, but is not limited to, the role description of the intelligent agent (i.e., the functional positioning of the intelligent agent, such as "data analyst", "user interface designer" etc.) and skill tags (i.e. the professional skills mastered by the intelligent agent, such as programming, market analysis etc.).

[0060] In this implementation, based on the task to be processed and the task complexity determined above, the complete dialogue record in the current group dialogue and the attribute information of each agent in the group dialogue can be combined to select one or more agents that best match from the multiple agents in the group dialogue as the target response agent to process the task to be processed.

[0061] For example, the task description of the task to be processed and the attribute information of each agent can be matched first (such as semantic similarity calculation, knowledge relevance assessment, user feedback performance, etc.) to determine the skill matching degree between the two, and then agents with skill matching degree below a certain threshold can be filtered out. Next, based on the task complexity, one or more agents can be selected as the target response agent in descending order of skill matching degree.

[0062] In one example, in addition to the dimensions mentioned above, when selecting a target response agent, the agent's current load can also be considered to ensure that the agent can respond quickly.

[0063] In this way, through multi-dimensional attribute matching analysis, it can be ensured that each task can be assigned to the most suitable professional intelligent agent, thus guaranteeing the accuracy of agent allocation.

[0064] In step S230, the target response agent is invoked to generate response content for the task to be processed.

[0065] The response content can be a structured result output by the agent after processing the task. It can be, but is not limited to, any or more of the following forms: text response (such as natural language content that directly answers a question), structured data (such as processing results in tables, lists, or JSON format), tool execution results (such as data, charts, or documents obtained by calling external tools), or collaboration suggestions (such as cooperation requests or task decomposition plans made to other agents).

[0066] In this implementation, scattered multi-source information can be integrated into a single task context package, which may include a core task description, compressed historical context, participant relationship graph, and a list of available tools. Then, different invocation strategies can be adopted based on the number of target response agents, enabling the target response agents to generate corresponding response content.

[0067] For example, when there is only one target response agent, the task context packet can be sent directly to the selected target response agent, which can then independently generate the response. When there are multiple target response agents, parallel generation, sequential generation, or hybrid generation modes can be used. In parallel generation, each target response agent synchronously receives the task context packet and generates an initial response from its own perspective. In sequential generation, a predetermined response order is set, and subsequent response agents can refer to the output of preceding agents. In hybrid generation, a key agent responds first, and other agents supplement or modify the key agent's response.

[0068] In one implementation, a single agent can be uniformly displayed and exposed within a group chat. After a task is identified, this agent can coordinate one or more other agents to respond to the task until the final result is output. In one example, a Coding Agent can be uniformly displayed in the group chat. As a specialized code development agent, it can coordinate other relevant agents to participate in collaboration based on the characteristics of the task, forming a complete development collaboration chain with other specialized agents, and achieving automated processing from requirements analysis and task planning to the final implementation of the task.

[0069] In step S240, the response content is sent to the group chat.

[0070] In this implementation, the response content of the target responding agent can first be formatted (e.g., paragraph splitting, code block marking, multimedia content reference processing, etc.), and then an appropriate format template can be applied based on the content type of the response content (e.g., text, code, data table, etc.) to improve readability. Next, the formatted response content is sent to a group chat for users or other agents to access.

[0071] Thus, based on Figure 2 The illustrated implementation identifies the task to be processed and its complexity based on input messages received in a group dialogue, thereby accurately assessing task requirements. Next, a target responding agent is determined based on the task to be processed, task complexity, dialogue history, and agent attribute information (role or skill). Then, by invoking the target responding agent and returning a response in the group dialogue, multiple agents can collaborate according to their respective expertise within a unified dialogue environment, significantly improving the processing efficiency and result quality of complex tasks.

[0072] In some embodiments of this disclosure, after the interaction ends, the user can export the group chat results as structured content in the form of task reports, action lists, etc., thereby assisting the user in making decisions or performing operations.

[0073] Regarding step S210, in some embodiments of this disclosure, it may include, for example... Figure 3 Steps S211 to S213 are shown.

[0074] In step S211, semantic recognition is performed based on the input messages received in the group dialogue and the dialogue records in the group dialogue to determine semantic information.

[0075] Semantic information can be the core semantic elements extracted through in-depth analysis of input messages and dialogue records. This can include user intent, task domain, action type, or constraints. Specifically, user intent can be the goal the user hopes to achieve or the essence of the problem to be solved. The task domain can be the professional field to which the task belongs, such as technology development, data analysis, or creative design. The action type can be the specific operation to be performed, such as analysis, generation, comparison, or optimization. Constraints can be limitations (e.g., data range) or special requirements during task execution.

[0076] In this implementation, semantic recognition can be performed on the input message. Specifically, the current input message can be associated with the dialogue records in the current group conversation to identify referential relationships and topic continuity. Then, key entities in the input message and their interrelationships can be identified. A pre-trained deep learning model can also be used to classify the input message into predefined intent categories. In one example, the urgency and sentiment of the input message can also be evaluated to provide a reference for subsequent priority scheduling.

[0077] After the above processing, the analysis results can be integrated to obtain structured semantic information. In one example, this semantic information may include intent labels, key entities, and contextual relationships.

[0078] In step S212, the task to be processed is determined based on the semantic information.

[0079] In this embodiment, based on the acquired semantic information, the core elements of the task to be processed can be extracted, such as the task's execution objective (i.e., the specific goal the task needs to achieve), input requirements (i.e., the data or resources required to complete the task), or output specifications (i.e., the expected output format or quality standard). Furthermore, in one example, these core elements can be integrated into a standardized task description document for subsequent use.

[0080] In step S213, the complexity of the task to be processed is evaluated to determine the task complexity, which includes single agent task, multi-agent collaborative task, or tool invocation task.

[0081] In this implementation, task complexity can be divided into three categories: single-agent tasks, multi-agent collaborative tasks, and tool-invoking tasks. A single-agent task is one that can be completed by a single agent; a multi-agent collaborative task requires multiple agents to cooperate; and a tool-invoking task requires calling external tools or APIs to complete.

[0082] Once the task to be processed is identified, its complexity can be assessed. This includes evaluating the number of professional fields involved, the depth and breadth of required knowledge, whether external tools or APIs are needed, and the task's reliance on historical dialogues and long-term memory. Based on these assessments, the final task complexity is determined.

[0083] For example, when skill breadth = 1, cognitive depth ≤ 2, and there is no tool dependency, it is determined to be a single-agent task. When skill breadth ≥ 2, or cognitive depth ≥ 3, or moderate collaboration is required, it is determined to be a multi-agent collaborative task. When there is strong tool dependency or system-level resource requirement, it is determined to be a tool-invoking task. It should be noted that the above are merely illustrative examples, and those skilled in the art can determine task complexity in other ways; this disclosure does not impose any special limitations on this.

[0084] In this way, through multi-source information fusion and contextual analysis, task intent can be accurately identified. Furthermore, based on complexity assessment, the most suitable processing strategy can be matched for tasks of different complexities, thereby improving task processing efficiency and effectiveness.

[0085] Regarding step S220, in some embodiments of this disclosure, step S220 may include, for example: Figure 4 Steps S221 to S223 are shown.

[0086] In step S221, the input message is identified to determine the agent mention pattern of the input message. The agent mention pattern includes direct mention, role mention, reply mention, or semantic mention.

[0087] Among them, the agent mention pattern can be a mention method contained in the input message to indicate that a specific agent is participating in the dialogue, which can include direct mention, role mention, response mention and semantic mention.

[0088] Specifically, direct mention can be a way of explicitly specifying the target agent by including the agent's name or unique identifier in the input message, such as following the @ symbol with the agent's name or unique identifier. It should be noted that direct mention, besides @ing agents in group chats, can also involve directly @ing corresponding collaborators in a group chat. These collaborators can be actual users participating in the group chat. For example, you can directly @ the name of the product manager or other collaborators in the group chat.

[0089] Role references can be a way of referring to the target agent by describing a professional role (such as "product manager" or "designer") rather than a specific name in the input message. Similarly, users can directly include the names or nicknames of collaborators in group conversations in the input message to achieve role references targeting real users.

[0090] Reply references can be a way of mentioning a target agent by responding to historical messages of a specific agent within the input message. Semantic references can be a way of mentioning specific information about a particular agent implicitly contained within the input message; the system can infer the type of agent the user needs from the contextual semantics through natural language understanding.

[0091] In this implementation, potential reference keywords and citation markers can be extracted based on the input message. For example, the identifier following the @ symbol in the input message can be scanned and matched with the identification information of agents registered in the system. If a match is successful, it can be identified as a direct reference. Alternatively, a pre-trained role keyword recognition model can be used to identify whether there is a professional role description in the input message, such as "product manager." The message reply chain can also be analyzed to determine whether it is a direct reply to a specific agent's historical messages.

[0092] In this way, the agent mention patterns in the input message can be accurately identified, which can be used as a reference for the subsequent selection of agents.

[0093] In step S222, the matching degree between each agent and the task to be processed is determined based on the agent mention pattern, the task to be processed, the task complexity, the dialogue records in the group dialogue, and the attribute information of each agent.

[0094] Among them, the matching degree can be used to characterize the degree of fit between the agent and the task to be processed.

[0095] In this implementation, the matching degree between each agent and the current task to be processed can be calculated based on a pre-set matching degree algorithm, taking into account the agent mention pattern, the task to be processed, the task complexity, the dialogue record, and the attribute information of each agent.

[0096] In one example, when determining agent mention patterns, a confidence score can be calculated for each mention method to characterize the probability that the current mention method belongs to a certain agent mention pattern. Next, the semantic similarity between the task description (e.g., keywords, task domain) related to the task to be processed and the attribute information of each agent can be calculated. The system can analyze the dialogue records of the current group conversation to determine the historical participation and contribution quality of each agent (which can be determined based on user feedback in the group conversation; if positive feedback is received, a certain score is added, etc.). It can also identify agents that have handled similar tasks and add a certain score to them.

[0097] After determining the above information, a weighted fusion algorithm can be used to calculate a comprehensive matching degree for each agent.

[0098] In one example, in addition to considering the factors mentioned above, the current load status of each agent can also be taken into account to assign higher priority to lightly loaded agents, thereby avoiding overload allocation.

[0099] In other examples, agents of the corresponding category can be filtered out based on the determined agent mention pattern. Then, based on the task to be processed, task complexity, dialogue records, and attribute information of each filtered agent, the matching degree between the agent of the corresponding category and the task to be processed can be calculated. In this way, the target responding agent can be determined from the agents of the corresponding category based on the matching degree.

[0100] In step S223, at least one target response agent is determined from the plurality of agents based on the matching degree of each agent.

[0101] In this implementation, a differentiated selection strategy can be implemented based on task complexity. For example, when the task complexity is a single agent task, the single agent with the highest matching degree can be selected. When the matching degrees of multiple agents are close (i.e., the difference is less than a certain range), the agent with better historical performance can be selected first.

[0102] When the task complexity involves multi-agent collaboration, agents with the highest matching degree can be selected first, in descending order. It should be noted that when selecting multiple agents, the skills of the selected agent set should be sufficient to cover the complete task requirements, and the team composition can be optimized through skill complementarity. In one example, the minimum matching degree among the multiple agents can be required to be greater than or equal to a certain threshold.

[0103] When the task complexity is a tool invocation type task, in addition to meeting the matching requirements, it is also possible to verify whether the agent has the relevant tool invocation permissions and capabilities, and agents with successful experience in invoking relevant tools can be selected first.

[0104] Thus, determining the agent mention pattern can accurately capture the user's implicit intent, enabling the user to interact with specific agents in a more natural way without needing to precisely remember the agent's name. Furthermore, by determining the agent mention pattern and comprehensively considering various factors, the matching degree between the identified target response agent and the task to be processed can be improved.

[0105] Regarding step S230, in some embodiments of this disclosure, step S230 may include, for example: Figure 5 Steps S231 to S232 are shown.

[0106] In step S231, when there are multiple target response agents, conflict detection is performed on the first response content generated by each target response agent.

[0107] The first response content can be the original response content generated independently by each agent, which is then coordinated and processed by the higher-level agent. The first response content may contain duplicate information, contradictory viewpoints, or inconsistent conclusions.

[0108] Conflict detection can be a process used to discover logical inconsistencies between the responses of different agents. It can include detecting conflicts of opinion (such as opposing conclusions or conflicting suggestions), data conflicts (such as the same indicator providing different values ​​or statistical results), conflicting solutions (such as providing mutually exclusive implementation plans or technical routes), or conflicting priorities (such as significant differences in the ranking of the importance of task elements).

[0109] In this implementation, when there are multiple target response agents (i.e., any number of two or more), conflict detection can be performed on the first response content generated by the multiple target response agents to determine whether there is a conflict between the first response content. For example, a text similarity algorithm can be used to calculate the semantic similarity between the first response content. If the semantic similarity exceeds a certain threshold, it can be determined as duplicate content. Alternatively, key factual statements and data points in each first response content can be extracted and compared to determine whether there is a data conflict.

[0110] In step S232, when there is a conflict between the first response contents, the multiple first response contents are coordinated to obtain the second response contents.

[0111] Among them, coordination and processing can be an intelligent decision-making process that reaches a consensus by eliminating conflicts, which may include conflict resolution, content integration, etc.

[0112] The second response can be the final response after coordination and processing, which can maintain logical consistency, eliminate conflicts, and optimize expression, making it suitable for display in group conversations.

[0113] In this implementation, if a conflict is determined to exist between the first response contents, multiple first response contents can be coordinated according to a pre-set strategy. For example, for duplicate content, the response content of the agent with higher skill matching can be retained first; for duplicate content but different expressions, the best expression can be generated through text summarization. For data conflicts, statements consistent with authoritative knowledge bases can be adopted first; for data without a clear authoritative source, a weighted voting mechanism can be used, with the weights determined based on the agent's historical performance in the domain. Furthermore, if the conflict cannot be resolved, the existence of different viewpoints can be clearly marked, and supporting evidence for each viewpoint can be provided.

[0114] Then, the coordinated content can be organized logically to generate a unified response framework, such as a problem overview, multi-perspective analysis, comprehensive conclusions, and action recommendations. In one example, each viewpoint in the second response can be labeled with its source agent, thereby enhancing the interpretability of the response.

[0115] Thus, through a multi-dimensional conflict detection and coordination mechanism, semantic conflicts and content redundancy in multi-agent responses can be effectively reduced, significantly improving the quality and efficiency of group dialogues. Furthermore, the coordinated second response eliminates the need for users to manually integrate contradictory information, reducing their comprehension costs.

[0116] In some embodiments of this disclosure, the multi-agent cooperative method may further include, for example: Figure 6 Steps S610 to S630 are shown.

[0117] In step S610, one or more external tools are discovered and identified based on the task to be processed.

[0118] External tools can be third-party services or functional modules, which can be integrated through an MCP (Model Context Protocol) client. These external tools can include, but are not limited to, data query services, chart generation tools, code execution environments, or specialized computing engines, providing specific professional capabilities through standardized interfaces.

[0119] In this implementation, a tool registry based on the MCP protocol can be accessed to obtain a list of available tools. By parsing the functional descriptions, input / output specifications, and compatibility information of each tool and matching them with the task to be processed, one or more external tools that need to be invoked can be determined.

[0120] In one example, one could calculate the semantic match between the task description and tool functionality related to the task to be processed, analyze the historical performance data of the tool, or consider the current load status and availability of external tools. For a single-tool task, the external tool with the highest overall score can be selected; for complex tasks, a combination of complementary tools can be selected to ensure that the tool combination can fully cover all the needs of the task.

[0121] In step S620, the task parameters of the task to be processed are sent to the external tool for parallel processing.

[0122] In this implementation, based on the determined external tools, the task parameters of the task to be processed can be converted into the input format required by the external tools. Contextual information (such as user preferences, quality requirements, etc.) can also be injected simultaneously, so that one or more external tools can process the corresponding tasks in parallel, thereby improving response efficiency.

[0123] In step S630, the processing result returned by the external tool is received, and the processing result is used as a reference for the target response agent when generating response content.

[0124] In this implementation, processing results returned by various external tools can be received. These results can be structured data generated after the external tools perform tasks. In one example, if multiple external tools are invoked, the processing results returned by the multiple external tools can be aggregated to maintain logical consistency.

[0125] Then, the processing results returned by the external tool are sent to the identified target response agent for reference when generating the response content.

[0126] Thus, the MCP protocol reduces the complexity of tool integration, eliminating the need for extensive manual configuration. Furthermore, the complementary collaboration of multiple tools can effectively improve the quality of processing complex tasks.

[0127] In some embodiments of this disclosure, the multi-agent cooperative method may further include, for example: Figure 7 Steps S710 to S730 are shown.

[0128] In step S710, performance data of the multiple intelligent agents during task execution is obtained.

[0129] Performance data can be a set of quantitative metrics generated by the agent during task execution, used to evaluate the agent's performance quality in the task. In one example, performance data may include multi-dimensional data such as response quality score, task completion rate, user satisfaction, response time, and resource consumption rate.

[0130] In this implementation, performance data of each agent can be collected periodically or triggered by key events (such as receiving user feedback). For example, the start and end times of each agent's tasks can be recorded using event tracking technology. The API call time, token consumption, and peak memory usage of the agents can be monitored. The success and failure status and exception information of agents calling external tools can be recorded. User feedback on each response (such as likes or dislikes) can be collected.

[0131] In step S720, based on the performance data of each agent, the agent to be optimized and its optimization points are determined.

[0132] Among them, the areas to be optimized can be specific aspects of the agent's architecture or behavior that need improvement, such as role prompt optimization, parameter adjustment, skill tag reassignment, and knowledge association optimization.

[0133] In this implementation, the performance of each agent can be quantitatively evaluated based on the collected performance data. For example, performance thresholds can be set for various dimensions, and performance indicators that consistently fall below these thresholds can be identified based on the performance data of each agent, thus determining the deterioration trend and abrupt change points of the performance indicators. Horizontal comparisons can be made within the same domain to identify relatively weak agents, or performance change trends can be analyzed to identify agents that are continuously deteriorating.

[0134] Based on the above methods, agents whose performance does not meet the predetermined requirements can be identified as agents to be optimized. Furthermore, through correlation analysis, a mapping relationship between possible causes of performance problems can be established, thereby clarifying the optimization points for these agents.

[0135] For example, low response quality and insufficient professionalism can be identified as unclear or incomplete role prompts. Low task relevance or responses deviating from the professional domain can be identified as unreasonable skill tag weighting. Abnormal efficiency metrics can be identified as requiring optimization of model parameters or system configuration.

[0136] In step S730, optimization instructions for the agent to be optimized are generated and executed based on the points to be optimized.

[0137] Among them, the optimization instructions can be system-generated executable improvement schemes, which may include specific operation commands, parameter configurations, or target expectations.

[0138] In this embodiment, based on the determined agent to be optimized and the points to be optimized, targeted optimization instructions can be generated and executed according to a pre-set optimization instruction generation strategy, thereby improving the performance of the agent.

[0139] The optimization instruction generation strategy can be based on historical optimization experience. The system can match the most effective optimization instruction generation strategy according to the point to be optimized. If a target agent has multiple points to be optimized, multiple strategies can be combined to form a comprehensive solution. For example, to address ambiguous role definitions, the role description can be reconstructed to enhance professional characteristics. To address low response quality, generation parameters can be adjusted to optimize prompts. To address low collaboration efficiency, collaboration strategies can be modified to enhance context awareness.

[0140] In this way, through comprehensive performance data collection and multi-dimensional analysis, the agent can continuously improve itself based on actual performance. This ensures that the agent always maintains optimal operating conditions and reduces the fluctuation range of overall system performance.

[0141] In one example, a performance comparison of the agent before and after optimization can be established, the actual effect of optimization measures can be monitored in real time, and the optimization strategy can be continuously adjusted based on feedback data.

[0142] In some embodiments of this disclosure, the multi-agent cooperative method may further include, for example: Figure 8 Steps S810 to S830 are shown.

[0143] In step S810, cross-session dialogue records of different group dialogues are maintained, and a participant relationship graph is constructed.

[0144] Among them, cross-session dialogue records can be a complete interaction history that is stored in the system for a long time and spans different points in time and dialogue threads. It can include message sequences, associated files or metadata of users and agents in all group dialogues.

[0145] A participant relationship graph can be a graph data structure used to record the interaction frequency, collaboration history, and relationship strength among all participants (including real users and agents) in a group dialogue. It can be used to optimize context passing and agent selection.

[0146] In this implementation, complete interaction records from each group dialogue can be continuously collected and stored, including message content, sender identifiers, timestamps, mention relationships, and citation relationships. In one example, a hierarchical context memory structure can be used to divide dialogue records into different levels for storage, thereby improving the efficiency of subsequent processing. For example, dialogue records can be divided into conversation memory (such as interaction records) and knowledge memory (such as historical decisions and cited professional knowledge), enabling the agent to quickly locate historically relevant information and reduce context retrieval time.

[0147] Next, graph algorithms can be used to analyze interaction patterns among participants, constructing and updating a participant relationship graph. Within this graph, relationship weights can be calculated for each pair of participants based on interaction frequency, task collaboration depth, and emotional similarity. Furthermore, core participants (those with frequent interactions) and peripheral participants (those with infrequent interactions) can be identified, dynamically adjusting the graph structure.

[0148] In step S820, based on the participant relationship graph, the cross-session dialogue records are subjected to correlation analysis and compression to extract key contextual information.

[0149] The key contextual information can be a set of high-value information extracted from cross-session dialogue records that is highly relevant to the current task. This can include historical conclusions, decision-making basis, task constraints, or professional knowledge.

[0150] In this implementation, multi-dimensional correlation analysis can be performed on cross-session dialogue records, such as determining the text similarity between historical dialogues and current tasks, the target relevance between historical tasks and current tasks, filtering historical records closely related to current participants based on participant relationship graphs, or retaining recent and time-sensitive dialogue content.

[0151] Then, based on multi-dimensional correlation analysis, relevant dialogue records are selected, and key nodes (such as decision points, conclusions, or action items) in the dialogue records are identified, filtering out social content, repetitive discussions, and invalid interactions. The key content is then compressed to generate a dialogue summary, preserving core semantics and maintaining the accuracy of the original text, thereby obtaining key contextual information.

[0152] In step S830, the key context information is sent to the target response agent for reference when generating response content.

[0153] In this implementation, the extracted key contextual information can be sent to the target response agent for reference when generating the response content. By providing accurate and relevant historical context, the agent can generate a response based on complete background information, improving the accuracy and relevance of the answer.

[0154] In this way, by maintaining cross-session dialogue records and constructing participant relationship graphs, the system can maintain long-term dialogue coherence and reduce context breakage issues. Furthermore, by extracting key contextual information, the cost of calling large language models can be significantly reduced while maintaining the integrity of key information, enabling the system to provide high-quality services even in resource-constrained environments.

[0155] In one example, sensitive information that exceeds the target responding agent's permissions can be removed or desensitized before transmitting critical context information, or the scope of accessible context can be dynamically adjusted based on role permissions to ensure that sensitive information is protected accordingly and enhance system credibility.

[0156] In some embodiments of this disclosure, the multi-agent cooperative method may further include, for example: Figure 9 Steps S910 to S930 are shown.

[0157] In step S910, the role description and skill tags of the agent to be created are determined based on the received agent creation request.

[0158] Among them, the agent creation request can be the request information used to define a new agent.

[0159] In this implementation, a user can initiate an agent creation request, which is a set of instructions for defining a new agent. This request may include the user's basic identity information, a role description of the agent to be created, and skill tags. The role description and skill tags can be determined by the user through various options displayed on the agent creation interface. The system can parse the received agent creation request to obtain the aforementioned information.

[0160] In other examples, users can also describe the agent to be created using natural language. The system can respond to a received agent creation request by receiving the user's natural language description. The system can then use natural language processing techniques to extract key functional elements from this description, mapping the natural language text to a standardized role classification system to identify the professional field, service target, and core task type within the description. Next, the system can match the skill keywords extracted from the natural language description with the system's skill tag library to determine the skill tags for the agent to be created.

[0161] In step S920, a knowledge file associated with the agent to be created is received.

[0162] Among them, knowledge files can be documents or document collections uploaded by users to build a knowledge base for intelligent agents. They can support multiple formats such as text, PDF, and charts, and contain domain knowledge, case data, and other relevant professional content.

[0163] In this implementation, the system can provide a file upload interface for users to upload relevant knowledge files. Upon receiving the uploaded knowledge file, the system can identify and preprocess it to obtain a data format readable by the intelligent agent. For example, OCR (Optical Character Recognition) technology can be used to scan PDF documents and extract data from Word documents, tables, charts, and other files.

[0164] In step S930, the agent is initialized based on the role description, skill tags, and knowledge file, thus completing the creation of the agent.

[0165] In this implementation, after obtaining the aforementioned role description, skill tags, and knowledge files, the agent can be initialized based on this information to create a new agent. The role description, skill tags, and knowledge features can be integrated into a system prompt template, which may include role definition, behavioral guidelines, knowledge boundaries, and output specifications. Then, the newly created agent is subjected to relevant tests or verifications (such as knowledge coverage checks, matching degree between skill tags and actual performance, etc.) to ensure that the agent's performance meets expectations.

[0166] Once a new agent is created, a unique identifier can be generated for it and it can be registered in the agent directory for later use.

[0167] This allows users to customize information about the intelligent agent and upload relevant files as its knowledge base, thereby meeting personalized customization needs in different tasks and scenarios.

[0168] In other examples, the system also provides agent templates for various common roles (such as product managers, 2D designers, and front-end coders), which users can activate with a single click, improving the efficiency of agent creation. Furthermore, a pre-trained prompt word + skill tag system can be used to bind typical task scenarios with templates, quickly adapting to different usage needs. In this way, even non-professional users can quickly create agents, reducing the knowledge required for agent creation and significantly lowering the barrier to entry.

[0169] In some embodiments of this disclosure, the multi-agent collaboration method can also support users inviting other real users to join group conversations and participate in discussions with the agents, achieving hybrid collaboration between multiple users and multiple agents. Furthermore, it supports the construction of a "human-machine role synchronization mechanism," meaning that each user can bind to or control a specific agent, enabling joint human-machine expression and information supplementation.

[0170] In some embodiments of this disclosure, group dialogues can support referencing user-uploaded files, historical dialogues, and the agent's own knowledge to form a contextual semantic chain, which the target responding agent can refer to when generating corresponding content.

[0171] In some embodiments of this disclosure, a tabbed mechanism can be used to separate and display three different collaboration modes within the same group conversation, achieving clear separation of functions and permissions. Specifically, the system can provide three independent tabs within the same group conversation interface, including collaborative editing, solution consultation, and team discussion. The three tabs can share basic conversation data and context, but implement different interaction modes and permission controls according to functional requirements, and maintain cross-tab context consistency through a unified context manager, ensuring continuity of work when users switch between different views. In one example, a visual differentiation design can be adopted, using color coding and icons to distinguish different modes, improving user cognitive efficiency.

[0172] For the collaborative editing tab, the system implements a read / write agent and a fine-grained permission control mechanism. Specifically, project owners can assign corresponding role permissions to each team member through the permission management panel, determining the permissions of those currently authorized to read, write, and edit with the read / write agent, supporting fine-grained permission control. For example, differentiated permissions can be set for specific documents, tasks, or functional modules, implementing a hybrid model of role-based and attribute-based access control.

[0173] Each time a user attempts to interact with the read / write agent, user permissions can be verified in real time. Based on the user's current permission level, the scope of operations the agent can perform is dynamically adjusted. For example, a user without editing permissions can only see the historical output of the read / write agent and cannot initiate new operations. In one example, the system can record all operation requests and permission verification results to the read / write agent, providing permission usage reports to the project owner, supporting permission policy optimization, and implementing operation traceability functionality. Users can view the history of any content modifications and the operators involved, ensuring system security and auditability.

[0174] For the solution consultation tab, the system is configured with a read-only agent function. This agent has a separate context space from the read-write agent, avoiding permission confusion. The read-only agent can obtain read-only data of the project through a unified context manager, but cannot access unauthorized sensitive information and automatically blocks information requests that exceed the user's permission scope. This read-only agent can focus on providing non-modification services such as solution planning, knowledge Q&A, and document analysis.

[0175] The team discussion tab can serve as an Open-Discussion area, a collaborative space designed specifically for real users. This tab can restrict participation to only project members and supports various communication formats such as text, images, and files. In one example, the system can provide a task conversion function, synchronizing decisions made during the discussion to the AI ​​agent with a single click. It also supports referencing key content from the discussion to other tabs while maintaining traceability of the content's source, automatically generating discussion summaries for team review and knowledge accumulation, and seamlessly integrating purely human discussions into AI-assisted workflows.

[0176] In some embodiments of this disclosure, a multi-agent cooperative system is also provided, such as Figure 10 As shown, the multi-agent collaborative system may include at least an intelligent mention system 1010, an intent analyzer 1020, and a group AI manager 1030.

[0177] Specifically, the Intelligent Mention System 1010, as a core component of user interaction, can extend the existing @mentions system to achieve intelligent participant identification and context-aware mentions. It can automatically trigger responses from corresponding intelligent agents by identifying and parsing various agent mention patterns in input messages during group conversations. Furthermore, it can integrate user intent prediction, proactively suggesting relevant professional intelligent agents to participate in the discussion based on historical interaction patterns and the current conversation context.

[0178] As a key component of the core analysis layer, the Intent Analyzer 1020 enables deep semantic understanding of input messages by building a multimodal intent recognition engine. Its core functions include context-aware intent recognition (i.e., comprehensively analyzing text content, dialogue history, and participant background to extract multi-dimensional feature vectors), task complexity assessment (i.e., quantifying the computational resources required for a complete task), task type classification, and routing decision generation (by developing an intelligent routing decision system to distribute requests to appropriate processing levels based on intent analysis results). Furthermore, the Intent Analyzer supports real-time learning and intent pattern optimization to improve recognition accuracy.

[0179] The Group AI Manager 1030, as a key component of the core coordination layer, can identify one or more agents as target responders from multiple agents based on the analysis results of the intent analyzer, and coordinate the responses of these target responders to achieve efficient collaboration. Specifically, the Group AI Manager may include an intelligent decision engine, a conflict detector, and a participant selector. The intelligent decision engine can select the optimal responder based on participant skill matching, dialogue history analysis, and task requirement assessment. The conflict detector can identify response conflicts between multiple agents and avoid duplicate or contradictory responses through priority algorithms and coordination strategies. The participant selector can dynamically evaluate the expertise matching degree, current workload, and historical performance of each agent, thereby selecting the most suitable combination of agents for the current task.

[0180] In one example, the intelligent mention system listens for new messages in a group conversation, preprocesses and normalizes the input text, identifies mention patterns using a multimodal detection algorithm, and identifies potential target agents. The processed message content and mention information are then passed to an intent analyzer. The intent analyzer receives this preprocessed message, performs deep semantic analysis based on the dialogue history and participant relationship graph, applies a multimodal intent recognition engine to extract key task features, and calculates a task complexity score. Based on the complexity score and task type, a routing decision is then generated to determine whether single or multiple agents are needed.

[0181] The intent analyzer transmits analysis results (task type, task complexity, etc.) to the group AI manager. The group AI manager, combining the analysis results from the intelligent mention system, selects the optimal agent combination based on expertise matching, workload, and historical performance using a participant selector. A conflict detector predicts potential response conflicts, assigns clear responsibility boundaries and response priorities to each agent, and then distributes task parameters and contextual information to the selected agents to coordinate parallel processing. Finally, the responses from multiple agents are integrated to ensure logical consistency and content coherence.

[0182] In this way, through the collaborative work of the intelligent mention system, intent analyzer, and group AI manager, user intent can be accurately identified, enabling efficient coordination among multiple intelligent agents and thus improving the processing efficiency of complex tasks.

[0183] In some embodiments of this disclosure, the multi-agent collaborative system may further include a dynamic tool manager, which can extend the existing DynamicToolManager to achieve automatic tool discovery, performance evaluation, and intelligent selection. Specifically, a tool registry can be established based on a model context protocol to support plug-and-play integration of third-party tools. A tool performance benchmarking framework is developed to evaluate tool quality through response time, accuracy, and reliability metrics. Furthermore, a multi-factor tool selection algorithm can be used to achieve optimal matching and invocation by comprehensively considering task requirements, historical tool performance, and system resource status.

[0184] In some embodiments of this disclosure, the multi-agent collaborative system may further include a unified context manager, which is a core component of the context and privacy layer. The unified context manager is responsible for maintaining the dialogue history, constructing a participant relationship graph, and managing long-term memory storage, thereby achieving historical continuity and accurate context delivery in the dialogue. In one example, the unified context manager may adopt a layered architecture design, comprising three core functional modules: The cross-session context maintenance module is used to build and maintain participant relationship graphs and long-term memory storage, recording the historical interaction patterns, collaborative relationships, and task progress of all participants (including human users and intelligent agents) in group dialogues. It can construct dynamic relationship networks through graph database technology and support multi-dimensional relationship weight calculation (such as interaction frequency, task collaboration depth, and sentiment tendency).

[0185] The intelligent context compression module dynamically compresses historical dialogue information using relevance scoring and importance analysis algorithms, reducing token consumption while maintaining the integrity of key information. This module applies an attention mechanism to identify key nodes in the dialogue (decision points, conclusions, actions), summarizes or removes low-relevance content, and employs a progressive compression strategy to dynamically adjust the compression rate based on the context window size.

[0186] Fine-grained privacy control module: Used to implement multi-layered data classification and dynamic access control to ensure secure access to sensitive information. In one example, it can classify data based on GDPR (General Data Protection Regulation) standards, set differentiated access permissions for different participants, and support field-level data anonymization and access audit trails.

[0187] In some embodiments of this disclosure, the multi-agent collaborative system may further include an architecture adaptive manager. This architecture adaptive manager, as a core component for continuous self-optimization, can improve agent performance through a recursive optimization mechanism. Specifically, the main functions of the architecture adaptive manager include analyzing agent performance through a recursive optimization engine, automatically generating role-based optimization suggestions and parameter adjustment recommendations, adjusting the number of agent instances and resource allocation based on system load and task complexity, and continuously monitoring the performance metrics of agents at each level, thereby forming a self-improvement closed-loop mechanism.

[0188] In some embodiments of this disclosure, the multi-agent cooperative system may further include a high-performance task manager for enabling concurrent task processing. In one example, the task manager may include the following modules: Intelligent Task Scheduling System: A component that achieves optimal concurrent execution of tasks through dependency analysis. This system constructs a task dependency graph, identifies subtasks that can be executed in parallel, and dynamically optimizes the execution order, maximizing parallelism while ensuring the logical order of tasks.

[0189] Dynamic load balancer: A component that allocates resources based on real-time system status and task prediction. This balancer continuously monitors metrics such as CPU utilization, memory usage, and queue length of each processing node, and dynamically adjusts task allocation strategies in conjunction with task prediction models to avoid single-point overload and ensure efficient utilization of system resources.

[0190] Priority Queue Manager: Implements multi-level priority queue management to ensure timely processing of important tasks. This manager can automatically calculate task priorities based on multiple factors such as task type, user permissions, and urgency, and supports dynamic priority adjustments to ensure that critical tasks are not delayed.

[0191] Fault Detection and Recovery Mechanism: Integrates fault detection and automatic recovery mechanisms to ensure system stability under high concurrency scenarios. This mechanism monitors task execution status in real time, identifies abnormal situations (such as timeouts, insufficient resources, and service unavailability), and automatically triggers recovery strategies (such as task retry, node switching, and service degradation).

[0192] In some embodiments of this disclosure, the multi-agent collaborative system may further include a dialogue quality manager for evaluating and optimizing dialogue quality. The main functions of the dialogue quality manager may include the following: Real-time quality monitoring: Continuously evaluate content quality during the conversation, rather than just retrospectively evaluating it after the conversation ends, to enable the immediate detection and correction of quality issues.

[0193] Multi-dimensional quality assurance: The quality of the conversation is comprehensively evaluated from multiple dimensions such as repeatability, naturalness, and relevance to ensure that the output content is both professional and accurate as well as natural and fluent.

[0194] Intelligent correction mechanism: When low-quality content is detected, the correction process is automatically triggered, including regenerating the response, adjusting prompt parameters, or guiding the conversation back on track, reducing the need for manual intervention.

[0195] Dialogue efficiency optimization: Through dialogue flow analysis and intelligent stopping mechanism, the current topic is ended or structured output is provided in a timely manner when the dialogue reaches the expected goal or falls into an ineffective loop, avoiding meaningless extended discussion.

[0196] Quality Standard Evolution: Based on user feedback and historical data, continuously optimize quality assessment standards and thresholds to adapt the system to ever-changing user expectations and professional requirements.

[0197] In some embodiments of this disclosure, the multi-agent cooperative system may further include an adaptive planner, whose main functions may include the following: Responsible for collecting multi-dimensional system performance indicators, including key data such as user satisfaction ratings, task completion quality indicators, system response time, and resource utilization.

[0198] An intelligent engine that automatically adjusts system parameters based on monitoring data uses machine learning algorithms to identify performance bottlenecks and optimization opportunities, and generates parameter adjustment suggestions.

[0199] By applying time series analysis and anomaly detection algorithms, system performance bottlenecks and potential problems can be identified in advance. By analyzing historical performance data and system load patterns, future resource requirements and potential failure points can be predicted, enabling proactive system maintenance.

[0200] Establish a continuous learning framework that transforms user behavior, task results, and system performance into actionable optimization insights through feedback loops, enabling the system to improve its performance with each interaction.

[0201] In some embodiments of this disclosure, the multi-agent collaborative system may further include a streaming response engine, which can leverage existing streaming processing capabilities to achieve real-time output of AI responses and optimize user experience. In one example, the main functions of the streaming response engine may include the following: The response content is segmented into multiple data blocks based on semantic coherence and importance, and each data block is assigned a priority score to ensure that key information is transmitted first. This module applies semantic analysis algorithms to identify decision points, conclusions, and action items in the content, and transmits this high-value information first.

[0202] Merge the results of concurrent processing by multiple AIs while maintaining logical consistency. When multiple agents generate response content simultaneously, semantic fusion algorithms can be used to integrate the scattered outputs into a coherent and conflict-free final response, ensuring the natural and smooth output of multi-agent collaboration.

[0203] During the response transmission process, the content quality is continuously evaluated. The output content is analyzed in real time using multi-dimensional indicators (such as repetition, naturalness, context relevance, etc.). When quality issues are detected, the subsequent content generation strategy is dynamically adjusted or corrective content is inserted.

[0204] Based on the aforementioned system implementation method Figure 11 A schematic diagram of the workflow of a multi-agent cooperative system according to one embodiment of the present disclosure is shown.

[0205] like Figure 11 As shown, the concurrent task manager 1101 serves as the system's task scheduling hub, enabling the construction of an intelligent task scheduling system. Through dependency analysis, it achieves optimal concurrent execution of tasks. This system can identify dependencies between tasks and automatically allocate parallel-executable tasks to different processing units, significantly improving system throughput and response speed.

[0206] Priority queue 1102 is used to manage task priorities and ensure that important tasks are processed in a timely manner. It can automatically calculate task priorities based on multiple factors such as task type, user permissions, and urgency, and supports dynamic adjustments to ensure that critical tasks are not delayed.

[0207] Load balancer 1103 is responsible for the dynamic allocation and balancing of system resources. By continuously monitoring the status and performance indicators of each processing node, it dynamically adjusts the task allocation strategy to avoid single-point overload and ensure maximum overall system efficiency.

[0208] As the core processing area of ​​the system, the work pool 1104 can receive tasks assigned by the load balancer and schedule appropriate AI agents or tools to execute them.

[0209] The result aggregator 1105 is used to integrate the output results of multiple processing units. Especially for multi-agent collaboration scenarios, it can integrate the outputs of different agents into a coherent and logically consistent final response, avoiding information fragmentation.

[0210] The Streaming Engine 1106 is used to achieve real-time delivery of responses. It can intelligently prioritize the delivery of key information to users by analyzing the importance of content, while reasonably delaying the delivery of non-critical content to improve the user experience.

[0211] User input 1107 serves as the entry point for receiving user commands and information. It can receive user requests to create custom agents, configure the agent's role attributes and exclusive knowledge base, and supports both one-on-one and group chat modes.

[0212] The Intelligent Mention System 1010 extends the existing @mentions system to achieve intelligent participant identification and context-aware mentions. Through natural language processing, it identifies implicit mentions and role requirements, automatically recommending the most suitable AI participants.

[0213] The Intent Analyzer 1020, by building a multimodal intent recognition engine, can comprehensively analyze text content, dialogue history, and participant background to implement a task complexity assessment algorithm, automatically determining whether a task requires single AI processing, multi-AI collaboration, or system-level intervention. It can also accurately understand the user's true intent, providing a basis for subsequent routing decisions.

[0214] The Group AI Manager 1030, as a core component of the core coordination layer, is responsible for coordinating the responses and interactions of multiple AI agents.

[0215] The decision engine 1111, as the core algorithm for achieving optimal responders, determines the most suitable combination of agents to handle the current task by calculating the professional matching degree, current load, and historical performance of each agent. Specifically, it can dynamically select agents to participate in the dialogue through the participant selector 1112. The participant selector 1112 can also adjust the set of agents participating in the dialogue in real time according to task requirements and agent states to ensure the best collaborative effect. Furthermore, a conflict detector 1113 can identify and handle multi-agent response conflicts, avoiding duplicate or contradictory responses through priority algorithms and coordination strategies.

[0216] The Dialogue Quality Manager 1114 manages dialogue quality, not only evaluating it but also proactively offering optimization suggestions to create a closed-loop management system. Specifically, a duplication detector 1115 prevents repetitive responses from multiple agents. This component identifies semantically repetitive parts by comparing the responses of different agents. When duplication is detected, a conflict resolution mechanism is triggered to ensure concise final output. The Dialogue Flow Analyzer 1116 monitors dialogue progress, analyzing the rhythm, depth, and participant engagement to determine when to end the current topic or guide the discussion in a new direction, avoiding ineffective discussions. A smart termination mechanism 1117 enables intelligent dialogue termination. When the dialogue has reached its intended goal or entered an ineffective loop, the termination mechanism is automatically triggered, guiding the user to the next step or providing structured output.

[0217] AI Employee 1118 can be an AI agent with specific roles, skills and personality traits. Each AI employee has a unique knowledge base and skill tags, and can perform professional tasks in a specific field.

[0218] The Role-Based Hint Generation 1119 function generates hints tailored to an agent's role. It dynamically generates optimized hints based on the agent's role definition, skill tags, and current task requirements, ensuring the agent maintains role consistency in dialogue and providing responses more aligned with its role.

[0219] The Tool Manager 1120 is used to automatically discover and invoke tools. It can extend the existing DynamicToolManager to achieve automatic tool discovery, performance evaluation, and intelligent selection. Through Dynamic Tool Discovery 1121 (an automatic mechanism for identifying available tools), it can automatically discover newly added tools, evaluate their functionality and performance, and provide a basis for subsequent selection.

[0220] The MCP client 1122 is an intelligent client based on the Model Context Protocol. It can support concurrent connections and tool calls with multiple external AI services, enabling efficient interaction with various external services.

[0221] The knowledge base server 1123 serves as the infrastructure for storing and managing the knowledge of intelligent agents. This server can store knowledge files such as documents and materials uploaded by each intelligent agent, and supports multimodal knowledge embedding. It can also provide intelligent agents with fast and accurate knowledge access capabilities through semantic indexing and retrieval technologies.

[0222] Office document tool 1124 can be an external service that provides document processing capabilities. This tool can automatically convert conversation content into PPT, spreadsheets, or text reports, and allows users to export group chat content as structured output for easier subsequent processing.

[0223] The context manager 1125 is responsible for maintaining cross-session contexts, building participant relationship graphs and long-term memory storage, and ensuring the historical continuity of the conversation.

[0224] The Unified Context Manager 1126 is used to implement system context management. By constructing a hierarchical memory structure (including a session memory layer and a knowledge memory layer), it can efficiently store and retrieve large amounts of dialogue history. It can also extract key context information and reduce token consumption through intelligent compression technology.

[0225] The privacy controller 1127 can be used to implement fine-grained privacy protection, enabling multi-layered data classification and dynamic access control to ensure secure access to sensitive information. Based on data protection 1128, it can control data access permissions according to regulations such as GDPR, thereby implementing comprehensive data security measures, including data encryption, secure storage, and access control.

[0226] System administrator AI1129 can be the AI ​​entity responsible for monitoring and optimizing the entire system. It can analyze the performance of other AIs, automatically generate role-based optimization and parameter adjustment suggestions, and continuously improve system performance.

[0227] The Architecture Adaptive Manager 1130 is used to dynamically adjust the system architecture. It can adjust the number of AI instances and resource allocation in real time based on system load and task complexity, thereby automatically adjusting the system scale according to actual needs and achieving optimal resource utilization.

[0228] The recursive optimization engine 1131 enables agents to self-optimize. By analyzing the performance of other AIs, it automatically generates optimized architecture code, thus achieving recursive self-optimization.

[0229] The Performance Monitor 1132 can continuously monitor system performance, including key metrics such as response time, accuracy, and user satisfaction.

[0230] The Adaptive Planner 1133 can optimize the system based on monitoring data, achieve adaptive parameter adjustment, and automatically optimize AI configuration and system settings based on feedback data.

[0231] Error handler 1134 can handle system exceptions by identifying the error type and applying appropriate handling strategies, such as retrying, downgrading, or reporting the problem to the user.

[0232] This disclosure also provides an electronic device, Figure 12 A schematic diagram of the hardware implementation using the processing system is shown.

[0233] like Figure 12As shown, the hardware structure of electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. Bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules. Bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc. Bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one connection line is used in this figure, but this does not indicate that there is only one bus or one type of bus.

[0234] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means that can contain a program for storage, communication, propagation, or transmission for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.

[0235] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, all or part of the processes or functions of this disclosure are performed.

[0236] Computer programs or instructions can be stored in a readable storage medium or transferred from one readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The readable storage medium can be any available medium capable of access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or it can include both volatile and non-volatile types of storage media.

[0237] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0238] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, electronic devices, and computer program products according to this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0239] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0240] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0241] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment / mode or example, which are included in at least one embodiment / mode or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.

[0242] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.

[0243] It is understood that before using the technical solutions disclosed in the embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained. For example, in response to receiving a user's active request, a prompt message can be sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media that perform the operations of the technical solutions of this disclosure, based on the prompt message. As an optional but non-limiting implementation, the way to send a prompt message to the user in response to receiving a user's active request can be, for example, a pop-up window, in which the prompt message can be presented in text form. Furthermore, the pop-up window can also include a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0244] It is understood that the above notification and user authorization acquisition process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure. The data involved in the technical solution of this disclosure (including but not limited to the data itself, the acquisition or use of data) shall comply with the requirements of relevant laws, regulations and related provisions.

Claims

1. A multi-agent cooperative method, characterized in that, include: Based on the input messages received in the group dialogue, the task to be processed and the task complexity are determined. The task complexity is used to characterize the amount of computing resources required to complete the task to be processed. The group dialogue contains multiple agents. Based on the task to be processed, the task complexity, the dialogue records in the group dialogue, and the attribute information of each agent, at least one target responding agent is determined from the multiple agents, and the attribute information is used to describe the agent's role or skills. The target response agent is invoked to generate response content for the task to be processed; as well as Send the response content to the group chat.

2. The method as described in claim 1, characterized in that, Based on the input messages received in the group conversation, identify the tasks to be processed and their complexity, including: Semantic information is determined by performing semantic recognition based on the input messages received in the group dialogue and the dialogue records in the group dialogue; Based on the semantic information, determine the task to be processed; The complexity of the task to be processed is evaluated to determine the task complexity, which includes single agent tasks, multi-agent collaborative tasks, or tool-calling tasks.

3. The method as described in claim 1, characterized in that, Based on the task to be processed, the task complexity, the dialogue records in the group dialogue, and the attribute information of each agent, at least one target responding agent is determined from a plurality of agents, including: Based on the input message, the agent mention pattern of the input message is identified, and the agent mention pattern includes direct mention, role mention, reply mention or semantic mention; Based on the agent mention pattern, the task to be processed, the task complexity, the dialogue records in the group dialogue, and the attribute information of each agent, the matching degree between each agent and the task to be processed is determined. Based on the matching degree of each of the agents, at least one target response agent is determined from the plurality of agents.

4. The method as described in claim 1, characterized in that, The target response agent is invoked to generate response content for the task to be processed, including: When there are multiple target response agents, conflict detection is performed on the first response content generated by each target response agent; When there is a conflict between the first response contents, the multiple first response contents are coordinated to obtain the second response contents.

5. The method as described in claim 4, characterized in that, Also includes: Based on the task to be processed, identify and determine one or more external tools; The task parameters of the task to be processed are sent to the external tool for parallel processing. The processing result returned by the external tool is received and is used by the target response agent for reference when generating response content.

6. The method as described in claim 1, characterized in that, Also includes: Acquire performance data of the multiple intelligent agents during task execution; Based on the performance data of each intelligent agent, determine the intelligent agent to be optimized and its optimization points; Based on the points to be optimized, optimization instructions are generated and executed for the agent to be optimized.

7. The method as described in claim 1, characterized in that, Also includes: Maintain cross-session dialogue records for different group conversations and construct a participant relationship graph; Based on the participant relationship diagram, the cross-session dialogue records are subjected to correlation analysis and compression to extract key contextual information. The key context information is sent to the target response agent for reference when generating response content.

8. A multi-agent cooperative system, characterized in that, include: Intelligent mention system, used to identify input messages in group conversations and trigger responses from appropriate agents; An intent analyzer is used to identify the intent of input messages and evaluate task complexity. as well as A group AI manager is used to coordinate the responses and collaborations of at least one agent in the group dialogue based on the analysis results of the intent analyzer.

9. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes the execution instructions stored in the memory, causing the processor to perform the multi-agent cooperative method according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the multi-agent cooperative method as described in any one of claims 1 to 8.