A multi-agent group chat arrangement and dynamic scheduling method and system
By acquiring information about the members of the agents, establishing a group chat session and initializing the turn structure, supporting multiple speaking modes, applying silence control, handling interruption commands, and recording and persisting the session state, this solves the problems of single speaking order, insufficient control over non-speaking objects, and lack of interruption recovery mechanism in multi-agent group chats, and achieves flexible session control and efficient session management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING ZHONGWU IND CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-06-09
AI Technical Summary
Existing multi-agent group chat systems have a simplistic speaking order arrangement mechanism, lack effective control over non-speaking participants, lack interruption and recovery mechanisms, and have imperfect round state management, making it difficult to meet diverse needs and real-time control.
By acquiring information about the members of the intelligent agent, establishing a group chat session and initializing the turn structure, supporting multiple speaking modes, applying silence control, handling interruption commands, recording and persisting the session state, flexible speaking order management and session control are achieved.
It enables flexible configuration of multiple speaking modes, avoids multiple agents responding simultaneously, ensures the order and integrity of the conversation, and enhances the robustness of the system and the user experience.
Smart Images

Figure CN122179253A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-agent system scheduling technology, and in particular to a method and system for multi-agent group chat orchestration and dynamic scheduling. Background Technology
[0002] With the rapid development of large language models (LLMs) and multi-agent systems, multi-AI agent group chat interaction has become one of the important forms of artificial intelligence applications. In these application scenarios, multiple AI agents need to discuss, debate, or collaborate around a specific topic. How to reasonably arrange the speaking order of multiple agents, control the speaking rounds, handle interruption events, and maintain the order of the conversation are the core technical challenges for achieving orderly interaction among multiple agents.
[0003] The existing technology has the following main shortcomings: The speaking order arrangement mechanism is simplistic: Most current multi-agent frameworks (such as AutoGen and LangChainMulti-Agent) use fixed polling or predefined task chain patterns for agent scheduling. For example, AutoGen implements multi-agent dialogue through the GroupChat class, and its default strategy is to rotate according to the registration order. This mechanism lacks flexibility and cannot support diverse speaking order arrangement methods such as random mode and roll call mode, making it difficult to meet the needs of different application scenarios.
[0004] Lack of effective control over non-speaking participants: In multi-agent group chats, when a designated agent is to speak, other non-speaking participants should remain in a waiting or silent state to ensure the integrity and order of the conversation. However, existing systems lack explicit control mechanisms for non-speaking participants, which may lead to multiple agents responding simultaneously, causing message chaos and wasted resources.
[0005] Lack of interruption and resumption mechanisms: In practical applications, users (hosts) or system administrators often need to intervene during a session, such as pausing the current speaker, adjusting the speaking order, or terminating the session. Existing systems lack support for interruption commands and lack corresponding session resumption and reordering mechanisms, making it difficult to flexibly control a session once it starts, and unable to cope with unexpected situations or changes in user needs.
[0006] Inadequate round-state management: Multi-agent group chat involves the sequential execution of multiple rounds, each with its own state (pending execution, in progress, paused, completed, terminated, etc.). Existing systems do not adequately manage round states, lacking clear state transition mechanisms and persistent records, making it difficult for the system to trace session history, analyze session processes, or perform fault recovery.
[0007] Therefore, there is an urgent need for a multi-agent group chat orchestration and dynamic scheduling method that can support multiple speaking modes, enable silence control for non-speaking parties, support the reception and processing of interruption commands, provide comprehensive round state management and persistent session records. Summary of the Invention
[0008] Therefore, it is necessary to provide a method and system for orchestration and dynamic scheduling of multi-agent group chats to address the aforementioned technical problems.
[0009] A method for orchestrating and dynamically scheduling multi-agent group chat includes the following steps: acquiring information on multiple agent members in a target room, the agent member information including agent terminal identifier, agent identity identifier, online status, and role attributes; establishing a group chat session based on the room status and initializing the round structure; generating the speaking order for the current round based on a preset speaking mode; specifying the speaking objects for the current round; applying silence control, waiting control, or restricted response control to non-speaking objects; updating the current round status upon receiving an interruption command, a room owner management command, or a status change; restoring, rearranging, or terminating subsequent rounds based on the updated status; and writing the session round results into the session record and persistently storing them.
[0010] In one embodiment, establishing a group chat session based on the room status includes: when the room owner's device or management terminal initiates a group chat session request, creating a session object and assigning a session identifier, wherein the session object includes a session identifier, a room identifier, a start time, topic information, and a round queue; switching the room status to in progress, wherein the room status includes pending startup, in progress, paused, and ended; creating the first round object for the session, assigning a round identifier, and setting the initial round status to pending execution.
[0011] In one embodiment, before establishing a group chat session based on the room status, the method further includes: receiving a discussion topic and initiator identifier input by the user; matching a target template from a preset role configuration template library based on the discussion topic, or having the user select a target template from a template list, wherein the role configuration template defines a set of collaborative role instances, including a host role and at least two member roles, each role having preset personality parameters and speaking perspectives; and creating a corresponding agent member instance based on the target template and joining the target room.
[0012] In one embodiment, the role configuration template includes at least one of a decision-making consulting team template, a learning coaching team template, a creative brainstorming team template, and a custom role configuration template; wherein, the decision-making consulting team template includes a homeowner role, a supporter role, an opponent role, and a neutral analyst role.
[0013] In one embodiment, generating the speaking order for the current round based on a preset speaking mode includes: real-time synchronization of the online status of each agent member, the online status including online, offline, busy, and silent online identifiers; arranging the speaking order and round scheduling for agent members in the online state; and updating the room member set and recalculating the candidate speaking set for the current round when the online status of an agent member changes.
[0014] In one embodiment, the preset speaking mode includes at least one of sequential mode, random mode, and roll call mode; wherein, the sequential mode is to speak in turn according to the registration order, role priority, or preset sorting rules of the intelligent agent members; the random mode is to randomly select the speaking object from the set of online intelligent agent members at the beginning of each round; and the roll call mode is to designate the next speaking object by sending a roll call command by the host device, the management terminal, or the current speaking object.
[0015] In one embodiment, receiving an interruption command includes: verifying the source permission of the interruption command and confirming that the sender has interruption permission; sending a stop speaking notification to the currently speaking object and broadcasting a round status change notification to all members; updating the round status or creating a new round according to the interruption type, wherein the interruption type includes at least one of pause interruption, reorder interruption, insertion interruption, and termination interruption; and recording the interruption event to the session record, including the interruption time, interruption source, interruption type, and interruption reason.
[0016] In one embodiment, the session record includes at least one of the following: round identifier, round sequence number, speaker identifier, speech start time, speech end time, speech content or quoted content, round status, interruption event record, status change timestamp, and session end summary; wherein, the session end summary includes the total number of rounds in the session, the number of times each agent speaks, key points, and interruption event statistics.
[0017] In one embodiment, applying silence control to a non-current speaker includes: sending a silence instruction to the intelligent agent terminal of the non-current speaker, the silence instruction including a round identifier and a silence state identifier; the intelligent agent terminal that receives the silence instruction enters a waiting state and does not actively generate response content.
[0018] A multi-agent group chat orchestration and dynamic scheduling system is provided to implement the multi-agent group chat orchestration and dynamic scheduling method described above. The system includes: a member information acquisition module for acquiring information about multiple agent members in a target room, the agent member information including agent terminal identifier, agent identity identifier, online status, and role attributes; a session management module for establishing a group chat session based on the room status and initializing the round structure; a speaking order generation module for generating the speaking order for the current round based on a preset speaking mode; a speaking object specification module for specifying the speaking object for the current round; a silence control module for applying silence control, waiting control, or restricted response control to non-current speaking objects; an interruption handling module for updating the current round status upon receiving an interruption command, a room owner management command, or a status change; a round control module for restoring, rearranging, or terminating subsequent rounds based on the updated status; and a session recording module for writing the session round results into the session record and persistently storing them.
[0019] Compared to existing technologies, the advantages and beneficial effects of this invention are as follows: By acquiring information on multiple intelligent agent members in the target room, including intelligent agent terminal identifiers, intelligent agent identity identifiers, online status, and role attributes, it facilitates accurate management of group chat members in the future; a group chat session is established based on the room status, and the round structure is initialized. The speaking order of the current round is generated based on a preset speaking mode, supporting flexible configuration of multiple speaking modes to meet the round scheduling needs of different application scenarios; the speaking object of the current round is specified, and silent control, waiting control, or restricted response control are applied to non-speaking objects to avoid chaos caused by multiple intelligent agents responding simultaneously, ensuring the integrity of the current speech and the order of the session; when an interruption command, a room owner management command, or a status change is received, the current round status is updated, and subsequent rounds are restored, rearranged, or terminated based on the updated status, realizing real-time control of the session flow and enhancing robustness and flexibility; the session round results are written to the session record, facilitating subsequent traceability and analysis of the session, which is beneficial for improving user experience and system optimization. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a multi-agent group chat orchestration and dynamic scheduling method in one embodiment; Figure 2 This is a flowchart illustrating the interruption triggering and processing in one embodiment; Figure 3 This is a flowchart illustrating the parallel processing of multi-threaded topics in one embodiment. Figure 4 This is a schematic diagram of the structure of a multi-agent group chat orchestration and dynamic scheduling system in one embodiment; Figure 5This is a schematic diagram of the architecture of a multi-agent group chat orchestration in one embodiment; Figure 6 This is a schematic diagram of the architecture for multi-agent group chat scheduling in one embodiment. Detailed Implementation
[0021] Before describing the specific embodiments of the present invention, the overall concept of the present invention will be explained as follows: This invention is mainly based on the development of multi-agent group chat process. Currently, multi-agent group chat has problems such as a single speaking order arrangement mechanism, lack of effective control over non-speaking objects, lack of interruption and recovery mechanisms, and imperfect round state management.
[0022] Therefore, this invention proposes a multi-agent group chat orchestration and dynamic scheduling method. It acquires information on multiple agent members in a target room, including agent terminal identifiers, agent identity identifiers, online status, and role attributes, facilitating accurate management of group chat members. A group chat session is established based on the room status, and a round structure is initialized. The speaking order for the current round is generated based on a preset speaking mode, supporting flexible configuration of multiple speaking modes to meet the round scheduling needs of different application scenarios. The speaking object for the current round is specified, and silent control, waiting control, or restricted response control are applied to non-speaking objects to avoid chaos caused by simultaneous responses from multiple agents, ensuring the integrity of the current speech and the order of the session. Upon receiving an interruption command, a room owner management command, or a status change, the current round status is updated, and subsequent rounds are restored, rearranged, or terminated based on the updated status, achieving real-time control of the session flow and enhancing robustness and flexibility. The session round results are written to the session record, facilitating subsequent session tracing and analysis, which is beneficial for improving user experience and system optimization.
[0023] Having introduced the overall concept of the present invention, to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0024] In one embodiment, such as Figure 1 As shown, a method for orchestration and dynamic scheduling of multi-agent group chats is provided, including the following steps: Step S110: Obtain information on multiple intelligent agent members in the target room.
[0025] Specifically, before starting a group chat session, information on multiple intelligent agents in the target room is obtained. The obtained intelligent agent member information includes intelligent agent terminal identifier, intelligent agent identity identifier, online status, and role attributes, etc., to facilitate subsequent group chat orchestration and scheduling.
[0026] The sources of agent member information can be: pre-configured agent members in the room member list; agent members dynamically added by the user when creating a room or initiating a session; and agent members automatically recommended and added based on room type or topic.
[0027] Step S120: Establish a group chat session based on the room status and initialize the round structure.
[0028] Specifically, based on the room status and the members' readiness, a multi-agent group chat session is established, and the round structure is initialized to facilitate the subsequent setting of the speaking order of the agents.
[0029] Step S120 includes: when the host device or management terminal initiates a group chat session request, creating a session object and assigning a session identifier, the session object includes a session identifier, a room identifier, a start time, topic information, and a round queue; switching the room status to in progress, the room status includes pending start, in progress, paused, and ended; creating the first round object for the session, assigning a round identifier, and the initial round status is pending execution.
[0030] Specifically, when a group chat session is initiated by the host device or management terminal, a session object is created based on the smart agent members. The session object includes a session identifier, a room identifier, a start time, topic information, and a round queue. A session identifier is assigned to the session object, and the room status is switched to in progress. The room status includes pending, in progress, paused, and ended. After the group chat session is created, the first round object is created for the session, a round identifier is assigned, such as Round_1, the round status is initialized to pending execution, and the speaking order of this round is generated according to the preset speaking mode.
[0031] Before step S120, the process includes: receiving the discussion topic and initiator identifier input by the user; matching the target template from the preset role configuration template library according to the discussion topic, or having the user select the target template from the template list. The role configuration template defines a set of collaborative role instances, including a host role and at least two member roles, each role having preset personality parameters and speaking perspectives; creating corresponding agent member instances according to the target template and joining the target room.
[0032] Specifically, before establishing a group chat session, the system receives the discussion topic and initiator identifier input by the user; it then searches and matches the discussion topic against a preset role configuration template library to obtain the target template, or the user can directly select the corresponding target template from the template list; the role configuration template definition consists of a set of collaborative role instances, including a host role and at least two member roles, each role having preset personality parameters and speaking perspectives; based on the matched target template, a corresponding agent instance is created, and the corresponding agent is added to the target room to realize the creation of the group chat session.
[0033] The role configuration module includes at least one of the following: decision-making consultation team template, learning coaching team template, creative brainstorming team template, and custom role configuration template; the decision-making consultation team template includes the roles of homeowner, supporter, opponent, and neutral analyst.
[0034] Specifically, the role configuration module is used to configure the roles of each agent in a group chat session. It can set various templates, such as the decision-making consultation team template, the learning coaching team template, the creative brainstorming team template, and custom role configuration templates. Among them, the decision-making consultation team template includes the host role, the supporter role, the opponent role, and the neutral analyst role.
[0035] The host role executes the following collaboration protocol during the session: at the start of the session, issue an opening introduction to clarify the discussion topics and rules; insert guiding remarks during the members' turn to speak to adjust the direction of the discussion; generate a phase summary at preset stage nodes; and generate a final summary containing the viewpoints and conclusions of all parties at the end of the session.
[0036] Customizable role configuration templates allow you to configure roles in group chat sessions according to your actual needs, adapting to various scenarios.
[0037] Step S130: Generate the speaking order for the current round based on the preset speaking mode.
[0038] Specifically, multiple speaking modes are set up. After a group chat session is built, the speaking order of the current speaking round is generated according to the selected speaking mode, so that multiple agents speak in turn according to the speaking order. Through the speaking order generation and speaking object specification mechanism, multiple speaking modes can be flexibly configured to meet the round scheduling requirements in different application scenarios.
[0039] Step S130 includes: real-time synchronization of the online status of each agent member, the online status including online, offline, busy and silent online identifiers; arranging the speaking order and round scheduling of agent members in the online state; updating the room member set and recalculating the candidate speaking set for the current round when the online status of an agent member changes.
[0040] Specifically, the system synchronizes in real time based on the online status of the agent members, which includes online, offline, busy, and silent statuses, and displays corresponding online indicators for each. Based on preset speaking modes, the system arranges the speaking order and rounds for online agent members. Simultaneously, the system monitors the online status of agent members in real time; if a member's online status changes, the system updates the room member set and recalculates the candidate speaking set for the current round, thus setting the speaking order for agent members.
[0041] Based on the selected speaking mode, the system generates a speaking order queue for the current round. The speaking order queue is an ordered list of agent identifiers, representing the order in which each agent speaks in this round. The queue can contain a single speaker (single-person speaking round) or multiple speakers (multi-person parallel speaking round).
[0042] The preset speaking modes include at least one of sequential mode, random mode, and roll call mode. In sequential mode, the speakers speak in turn according to the registration order, role priority, or preset sorting rules of the intelligent agent members. In random mode, the speaker is randomly selected from the set of online intelligent agent members at the beginning of each round. In roll call mode, the host device, the management terminal, or the current speaker designates the next speaker by sending a roll call command.
[0043] Specifically, multiple speaking modes are preset for the host or administrator to choose from, including sequential mode, random mode, and roll call mode. Sequential mode requires speakers to speak sequentially according to the registration order, role priority, or preset sorting rules of the agent members, generating a fixed speaking queue based on the sorting attributes of the member list. Random mode randomly selects a speaker from the set of online agent members at the beginning of each round; random selection can be implemented using a pseudo-random algorithm or a weighted random algorithm. Roll call mode allows the host device, administrator, or the current speaker to explicitly designate the next speaker by sending a roll call command, which includes the agent identifier of the member being called.
[0044] Step S140: Specify the speaker for the current round.
[0045] Specifically, the agent identifier at the current position is retrieved from the speaking order queue, the agent is designated as the speaking target for the current round, and a speaking permission notification is sent to the agent terminal. The notification includes the round identifier, speaking permission identifier, and topic context information.
[0046] Step S150: Apply silence control, wait control, or restricted response control to non-current speaking objects.
[0047] Specifically, to ensure the order of speaking and the integrity of the current speech, the system applies silence control, waiting control, or restricted response control to non-current speakers. Restricted responses include tip confirmation, emoticons or status indicators, and annotations or marks on the current speech to ensure the integrity of the speech and the order of the conversation, and to avoid the chaos caused by multiple agents responding at the same time.
[0048] The process of applying silence control to non-current speakers includes: sending a silence command to the intelligent agent terminal of the non-current speaker, the silence command including a round identifier and a silence status identifier; the intelligent agent terminal that receives the silence command enters a waiting state and does not actively generate response content.
[0049] Specifically, after the system designates the current speaker, it sends a silence command to all non-speaking agent terminals. The silence command includes a round identifier and a silence status identifier. Agent terminals that receive the silence command enter a waiting state, neither actively generating response content nor sending messages to the server.
[0050] In certain modes, non-speakers can respond within a limited scope. Limited responses include: brief acknowledgments (such as "agree" or "understand"); emoticons or status indicators; and annotations or tags for the current message. The system controls limited responses through response type filtering and length limits.
[0051] Non-speaking agents remain silent, waiting for their turn to proceed or being called upon. The system maintains a waiting queue, recording the waiting status and queue position of each agent. Once the current speaker finishes speaking, the system selects the next speaker from the waiting queue.
[0052] Step S160: When an interruption command, a homeowner management command, or a status change is received, update the current round status.
[0053] Specifically, during group chat sessions, if an interruption command or host management command is received, or a status change is detected, the system will handle the interruption according to its source and type, and update the current speaking round status. By receiving and processing interruption commands, the system empowers the host and management with real-time control over the session flow, thereby improving reliability and emergency response capabilities.
[0054] Upon receiving an interruption command, the process includes: verifying the source permissions of the interruption command and confirming that the sender has interruption permissions; sending a stop speaking notification to the currently speaking object and broadcasting a round status change notification to all members; updating the round status or creating a new round based on the interruption type, which includes at least one of pause interruption, reorder interruption, insertion interruption, and termination interruption; and recording the interruption event in the session log, including the interruption time, interruption source, interruption type, and interruption reason.
[0055] Specifically, upon receiving an interrupt command, the system first verifies the source permissions of the command to confirm that the sender has interruption authority. Interruption sources include the host device, the management terminal, and specific control terminals. Among these, the host device, as the room manager, has the highest control authority and can send interrupt commands at any time to pause the current round, reassign the speaker, or terminate the session. The management terminal or operations management terminal can send interrupt commands to intervene in the session flow for content review, anomaly handling, or service control purposes. In certain application scenarios, authorized third-party control terminals (such as teacher terminals or host terminals) can also send interrupt commands.
[0056] A stop speaking notification is sent to the current speaker. Since the speaking order has changed due to the interruption, a round status change notification is broadcast to all members.
[0057] The interruption type updates the round status or creates a new round. Interruption types include pause interruption, rearrangement interruption, insertion interruption, and termination interruption. A pause interruption pauses the current round's speaking, the current speaker stops speaking, and all members enter a waiting state. The round status is updated to "Paused". A rearrangement interruption terminates the current round, regenerates the speaking order, and starts a new round. This is suitable for scenarios involving topic changes, member changes, or adjustments to the speaking mode. An insertion interruption allows a specific agent to insert into the current round to speak; after speaking, the original round order is restored. This is suitable for emergency supplements, Q&A, or the host's speaking. A termination interruption immediately terminates the current session; all agents exit the speaking state, and the room status is updated to "Ended".
[0058] Interruption events are recorded in the session log, including the interruption time, source, type, and reason, to facilitate subsequent tracing.
[0059] Step S170: Restore, rearrange, or terminate subsequent rounds based on the updated state.
[0060] Specifically, the round status is updated in real time based on session progress, interruption events, and host management instructions, and session recovery, reordering, and termination are supported.
[0061] The round status includes indicators such as pending, in progress, paused, completed, and terminated. Status update trigger conditions include: the current speaker begins speaking (pending → in progress); the current speaker finishes speaking (in progress → completed); a pause / interruption command is received (in progress → paused); a termination / interruption command is received (any status → terminated); changes in room members or abnormal online status are detected (in progress → paused).
[0062] When a round's status is "paused," the host or administrator can send a restore command to resume the session. The system will update the round's status to "in progress," restore the original speaker's speaking privileges, or reassign the speaker based on the parameters in the restore command.
[0063] When a reordering interruption command or a homeowner management command is received, the system terminates the current round, creates a new round, regenerates the speaking queue according to the new speaking mode or the specified speaking order, and starts the scheduling of the new round.
[0064] When a termination interruption command is received, the preset round limit is reached, or the host manually ends the session, the system terminates the session, updates the room status to "ended," stops the speaking privileges of all agents, and triggers the writing and summary generation of session records.
[0065] Write the execution results and state changes of each session round into the session record and persist them to a database or log system.
[0066] Step S180: Write the session round results into the session record and persist them.
[0067] Specifically, after a group chat session ends, the execution results and status changes of each session round are written to the session record and persistently stored in a database or log system. The persistence of the session record provides a data foundation for the tracing, analysis, and auditing of the session, facilitating subsequent optimization.
[0068] The conversation record includes at least one of the following: round identifier, round sequence number, speaker identifier, speech start time, speech end time, speech content or quoted content, round status, interruption event record, state change timestamp, and conversation end summary; the conversation end summary includes the total number of rounds in the conversation, the number of times each agent speaks, key points, and interruption event statistics.
[0069] Specifically, the session record contains the following key information: round identifier, round sequence number, speaker identifier, speech start time, speech end time, speech content or content reference, round status, interruption event record, status change timestamp, etc.
[0070] Persistence operations are triggered at the following times: upon completion of each round, the content of the speech and the execution result of this round are recorded; when an interruption event occurs, the interruption type, source, and processing result are recorded; when the session terminates, the session end status and summary are recorded.
[0071] After the session ends, the system can generate an end summary based on the session record. The end summary includes information such as the total number of rounds in the session, statistics on the number of times each agent spoke, key points extracted, and interruption event statistics, which can be viewed by users and used for subsequent analysis.
[0072] In this embodiment, information on multiple intelligent agents in the target room is acquired. This information includes the intelligent agent terminal identifier, intelligent agent identity identifier, online status, and role attributes, facilitating accurate management of group chat members. A group chat session is established based on the room status, and a round structure is initialized. The speaking order for the current round is generated based on a preset speaking mode, supporting flexible configuration of multiple speaking modes to meet the round scheduling needs of different application scenarios. The speaking object for the current round is specified, and silent control, waiting control, or restricted response control are applied to non-speaking objects to avoid chaos caused by multiple agents responding simultaneously, ensuring the integrity of the current speech and the order of the session. Upon receiving an interruption command, a room owner management command, or a status change, the current round status is updated, and subsequent rounds are restored, rearranged, or terminated based on the updated status, achieving real-time control of the session flow and enhancing robustness and flexibility. The session round results are written to the session record and persistently stored, facilitating subsequent session tracing and analysis, which is beneficial for improving user experience and system optimization.
[0073] In one embodiment, the above method can also perform the interruption triggering and processing process as follows: Figure 2 As shown, the process includes: during the current agent's speech, detecting interruption trigger conditions, which include being directly called out, factual errors, highly relevant information, and deviating from the topic; when the trigger conditions are met, calculating the interruption urgency according to set rules; if the interruption urgency is less than a preset threshold, continuing to wait; if the interruption urgency is greater than or equal to the preset threshold, interruption is allowed, and the agent is permitted to speak.
[0074] In one embodiment, the above method can also perform multi-threaded topic parallel processing as follows: Figure 3 As shown, this includes: during the main topic discussion, detecting topic branching, for example, sub-topic thread A is technical, with speakers including technical experts, engineers, and product managers, and sub-topic thread B is social, with speakers including sociologists, economists, and psychologists; merging the thread conclusions of sub-topic thread A and sub-topic thread B; and returning to the main topic discussion.
[0075] like Figure 4As shown, a multi-agent group chat orchestration and dynamic scheduling system is provided to implement the multi-agent group chat orchestration and dynamic scheduling method described above. The system includes: a member information acquisition module 21, which acquires information about multiple agent members in the target room, including agent terminal identifier, agent identity identifier, online status, and role attributes; a session management module 22, which establishes a group chat session based on the room status and initializes the round structure; a speaking order generation module 23, which generates the speaking order for the current round based on a preset speaking mode; a speaking object specification module 24, which specifies the speaking object for the current round; a silence control module 25, which applies silence control, waiting control, or restricted response control to non-current speaking objects; an interruption handling module 26, which updates the current round status upon receiving an interruption command, a room owner management command, or a status change; a round control module 27, which restores, rearranges, or terminates subsequent rounds based on the updated status; and a session record module 28, which writes the session round results into the session record and stores them persistently.
[0076] Among them, the intelligent agent terminal identifier corresponds one-to-one with the intelligent agent terminal, the intelligent agent identity identifier corresponds to the intelligent agent member, and the role attributes include host, member, host or observer, etc.
[0077] To achieve orchestration of multi-agent group chat, such as Figure 5 As shown, the system also includes: a user input interface 110, a group chat context library 210, an external knowledge base 220, an interruption detection module 610, an environment perception module 120, a multi-turn context manager 200, a dialogue state machine 300, a dynamic scheduler 400, a speaking rights allocation module 500, a speaking request queue 510, an interruption control unit 600, and an agent execution layer 700. The agent execution layer 700 is configured with several agent groups 710, and the agent groups 710 are configured with agent A711, agent B712 and agent C713.
[0078] During multi-agent group chat orchestration, the conversation topic is input through the user input interface 110. The group chat context library 210 and the external knowledge base 220 are used to assist the multi-turn context manager 200 in context management. After detecting external input, the environment awareness module 120 inputs it to the multi-turn context manager 200 for context management, issues a state update instruction to the dialogue state machine 300, and outputs context data to the dynamic scheduler 400. The dialogue state machine 300 issues a state update instruction to the dynamic scheduler 400. The dynamic scheduler 400 issues a scheduling instruction to the speaking rights allocation module 500. The speaking rights allocation module 500 transmits speaking permission to the corresponding agent and feeds back a scheduling signal to the dialogue state machine 300. The speaking request queue 510 is used to store speaking requests. The agent that receives the speaking permission outputs the corresponding response.
[0079] In addition, the interruption detection module 610 detects interruption signals in real time and transmits the detection results to the interruption control unit 600. The interruption control unit transmits control signals to the dynamic scheduler 400 and the speaking rights allocation module 500. The dynamic scheduler 400 adjusts according to the corresponding scheduling instructions and feeds back the scheduling instructions to the interruption control unit 600. After receiving the adjusted scheduling instructions, the speaking rights allocation module 500 re-allocates the speaking rights and feeds back the results to the interruption control unit 600.
[0080] To achieve dynamic scheduling of multi-agent group chats, such as Figure 6 As shown, the system also includes: a core scheduler 10, a group chat context module 30, a pool of agents to be scheduled 20, a topic relevance calculation module 40, a personality matching evaluation module 50, and a historical activity statistics module 60. The group chat context module 30 transmits current topic information to the topic relevance calculation module 40 and transmits the relevance score to the core scheduler 10. The pool of agents to be scheduled 20 obtains candidate agent information, transmits it to the personality matching evaluation module 50, and outputs a matching score to the core scheduler 10. The group chat context module 30 transmits current agent information to the historical activity statistics module 60 and outputs an activity score to the core scheduler 10. The core scheduler 10 outputs a scheduling result based on the received relevance score, matching score, and activity score. The scheduling result includes the best speaking agent and the speaking order. Furthermore, the core scheduler 10 can update historical records to the historical acquisition statistics module 60.
[0081] In one embodiment, the above-mentioned multi-agent group chat orchestration and dynamic scheduling system is applied under different preset speaking modes as follows: I. Five-agent group chat in sequential mode: The scenario is as follows: A user creates a discussion room on an education topic (Room ID: Room_001) and adds 5 AI agents to the room: Agent A (Education Expert), Agent B (Technology Expert), Agent C (Psychologist), Agent D (Economist), and Agent E (Sociologist). The host device is the user's client terminal (Device ID: Device_User_01).
[0082] Session Initiation: The user initiates a group chat session by clicking the "Start Discussion" button on the host's device. Upon receiving the request, the system performs the following operations: (1) Query the member list of Room_001 from the room management module to obtain the identifiers of 5 agents: {AgentA,AgentB,AgentC,AgentD,AgentE}; (2) Check the online status of each agent to confirm that all are online; (3) Create a session object Session_001, assign a session identifier, and record the room identifier Room_001, start time 2024-03-15 10:00:00, and topic "The impact of AI on education"; (4) Update the room status from "pending startup" to "in progress".
[0083] Round initialization and speaking order generation: Users select "Sequential mode" as the speaking mode in the session configuration. The system creates the first round object Round_1 and generates a speaking order queue based on the registration order of the members: [AgentA, AgentB, AgentC, AgentD, AgentE]. The system retrieves the first element AgentA from the queue, designates AgentA as the current speaking object, and sends a speaking permission notification to AgentA's terminal. The notification includes: the round identifier Round_1, the speaking permission identifier Permission_Granted, and the topic context "The impact of AI on education".
[0084] Silence Control: The system sends a silence command to the terminals of Agent B, Agent C, Agent D, and Agent E. The command includes the round identifier Round_1 and the silence status identifier Silence_On. Upon receiving the silence command, the four agent terminals enter a waiting state and do not actively generate response content.
[0085] First round of speech: After receiving the speaking permission notification, Agent A's terminal calls the language model to generate the response content: "The application of AI technology in the field of education is changing the traditional teaching model. Personalized learning programs can be adjusted according to students' learning progress and characteristics. However, we should also note that the emotional care and value guidance of teachers cannot be completely replaced by AI." After receiving Agent A's response content, the system broadcasts it to all members, records the speech start time 10:00:15 and the speech end time 10:00:48, and updates the status of this round to "Completed".
[0086] Second round of speaking: The system creates Round_2, retrieves the second element AgentB from the speaking order queue, and designates AgentB as the current speaker. AgentB's speech is: "From a technical perspective, adaptive learning systems have already been applied on multiple educational platforms. Through knowledge graphs and learning path planning algorithms, the system can provide customized learning content and practice questions for each student." After speaking, the round status is updated to "Completed".
[0087] Rounds three through five: The system sequentially designates Agent C, Agent D, and Agent E as the speaking participants, and each agent speaks after gaining speaking privileges. Psychologist C focuses on the impact of AI teaching on students' psychological development, economist D analyzes the cost-benefit of investing in educational technology, and sociologist E discusses the fairness of educational resource allocation. After each round of speaking, the system writes the speech content, timestamp, and round status into the session log.
[0088] Session End and Record Persistence: After the five agents complete their first round of speaking, the user clicks the "End Discussion" button on the host's device. Upon receiving the termination command, the system updates the room status to "Ended" and terminates the speaking privileges of all agents. The system generates a session end summary, including: a total of 5 rounds, 1 speech by each agent, and a session duration of approximately 8 minutes. The session record and summary are written to the database tables session_record and session_summary.
[0089] II. Interruption and Resumption in Roll Call Mode: Scenario Setting: A user creates a startup consultation room (Room ID: Room_002) containing 8 intelligent agent members. The user selects "Roll Call Mode" as the speaking mode, where the user or the current speaker designates the next speaker via a roll call command.
[0090] Session Initiation and First Round Speech: After a user initiates a session, the system creates Session_002 and Round_1. Due to the use of a tag-a-name mode, the system waits for the host to send a tag-a-name instruction. The user enters "@Entrepreneur Agent, please share your thoughts first" in the client. The system parses the tag-a-name instruction, extracts the tagged object AgentF (Entrepreneur Agent), and designates AgentF as the current speaker. After AgentF finishes speaking, it adds "@Career Planner, what do you think?" to the end of its message. The system parses this tag and designates AgentG (Career Planner) as the next speaker.
[0091] Interruption event handling: During AgentG's speech (Round_2 in progress), the user (host device) sends a pause / interruption command. The system executes the following processing flow: (1) Verify that the interrupt command originates from the homeowner's device Device_User_01, and confirm that it has interrupt permissions; (2) Send a stop speaking notification to AgentG and broadcast a round status change notification to all members; (3) Update the status of Round_2 from "In Progress" to "Paused"; (4) Record the interruption event to the session log: interruption time 10:15:32, interruption source Device_User_01, interruption type Pause, interruption reason "host pauses session".
[0092] Session Resumption: After handling a temporary matter, the user clicks the "Resume Discussion" button on the host's device, and the system receives the resumption command. The system updates the status of Round_2 from "Paused" to "In Progress," resends the speaking permission notification to AgentG, and AgentG continues the previously unfinished speaking. After speaking is completed, the round status is updated to "Completed."
[0093] Interruption Insertion: During Agent H's (financial advisor's) speech (Round_3 in progress), the user discovers an urgent issue requiring immediate consultation with the legal advisor. The user sends an interruption command, specifying Agent I (legal advisor) to interrupt the current round. The system performs the following operations: (1) Send a pause notification to AgentH and save the current speaking progress (so that the subsequent response of the speaking object can be restored, regenerated or restarted based on the saved speaking context, output segments or round status). (2) Create the insertion round Round_3_Insert, specifying AgentI as the speaking object; (3) After Agent I finishes inserting a message, the system resumes Round 3, and Agent H continues to speak; (4) Record the execution results of the insertion interruption event and the insertion round to the session record.
[0094] Reordering Interruption: When a user notices that the current discussion has deviated from the initial topic, they decide to adjust the speaking order. The user sends a reordering interruption command, specifying a new list of referees: [AgentF, AgentJ, AgentK]. The system terminates the current round, creates a new round (Round_4), generates a speaking order queue based on the new referee list, and starts scheduling for the new round.
[0095] III. Handling member changes in random mode: Scenario setting: A user creates an open discussion room (Room ID: Room_003) containing 10 agent members. The user selects "Random Mode" as the speaking mode, and the system randomly selects an online agent as the speaker at the beginning of each round.
[0096] Random speaking order generation: When the system creates Round_1, it randomly selects a member from the online member set {AgentL, AgentM, AgentN, AgentO, AgentP, AgentQ, AgentR, AgentS, AgentT, AgentU}. The system calls the random number generator to generate index value 3, selecting AgentO as the first speaker. After AgentO finishes speaking, the system creates Round_2 and randomly selects again, this time choosing AgentM.
[0097] Member online status change: During Round_5, the system detected that AgentT's online status changed from "online" to "offline" (network connection interrupted). The system performed the following actions: (1) Broadcast a notification of member status change to all members; (2) Update the online member set and remove AgentT; (3) If the current speaker is not AgentT, continue the current round; if the current speaker is AgentT, the system will update the round status to "paused" and randomly select a new speaker from the online members. (4) Record member status change events to the session log.
[0098] Member reconnected: After 3 minutes, AgentT reconnects and its online status returns to "online". The system will add AgentT back to the online member set, and AgentT will be included in the random selection of subsequent rounds.
[0099] Management Interruption: When the system management detects inappropriate content (violating content moderation policies) in a session, it sends a termination interruption command. After verifying the management's permissions, the system immediately terminates the session, updates the room status to "Ended," and records the interruption source as management, the interruption type as Terminate, and the interruption reason as "Content Violation." The session record and termination event are written to the database for subsequent auditing.
[0100] Technical Performance Verification: The above specific applications verified the dynamic scheduling capability, member status change response capability, and emergency control capability of the management end in random mode. Through actual operation testing, the system can complete the round status update and reselect the speaking object within 100 milliseconds after a member status change, and the response latency of the management end interrupt command is less than 50 milliseconds, meeting the real-time control requirements.
[0101] As can be seen from the specific application of the above-mentioned preset speaking mode, the present invention realizes the orderly scheduling and real-time control of multi-agent group chat through room status management, speaking order arrangement, silence control, interruption response and round-robin advancement mechanism, which improves the system's controllability, robustness and traceability, and is suitable for application scenarios such as multi-agent collaboration, group chat discussion, and intelligent customer service.
[0102] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0103] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a computer storage medium (ROM / RAM, magnetic disk, optical disk) for execution by the computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Therefore, the present invention is not limited to any particular hardware and software combination.
[0104] The above description, in conjunction with specific embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for orchestration and dynamic scheduling of multi-agent group chat, characterized in that, Includes the following steps: Acquire information on multiple intelligent agent members in the target room, including intelligent agent terminal identifier, intelligent agent identity identifier, online status, and role attributes; Establish a group chat session based on the room status and initialize the round structure; The speaking order for the current round is generated based on a preset speaking pattern; Specify the speaker for the current round; Apply silence, wait, or restricted response controls to non-current speakers; Update the current round status upon receiving an interruption command, a homeowner management command, or a status change; Restore, rearrange, or terminate subsequent rounds based on the updated state; Write the session round results to the session record and persist them.
2. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, The process of establishing a group chat session based on the room status includes: When the host device or management terminal initiates a group chat session request, a session object is created and a session identifier is assigned. The session object includes a session identifier, a room identifier, a start time, topic information, and a round queue. Switch the room status to "in progress", where the room status includes "to be started", "in progress", "paused" and "finished"; Create the first round object for the session, assign a round identifier, and set the initial round status to pending execution.
3. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, Before establishing a group chat session based on the room status, the following is also included: Receive user input of discussion topics and initiator identifiers; The target template is matched from the preset role configuration template library according to the discussion topic, or the user selects the target template from the template list. The role configuration template defines a set of collaborative role instances, including a host role and at least two member roles, each role has preset personality parameters and speaking perspective. Create corresponding agent member instances based on the target template and add them to the target room.
4. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 3, characterized in that, The role configuration templates include at least one of the following: decision-making consulting team template, learning coaching team template, creative brainstorming team template, and custom role configuration template. The decision-making consulting team template includes roles for homeowners, supporters, opponents, and neutral analysts.
5. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, The generation of the speaking order for the current round based on the preset speaking pattern includes: The online status of each intelligent agent member is synchronized in real time, and the online status includes online, offline, busy and silent online indicators; Arrange the speaking order and round-robin scheduling for online agent members; When the online status of a member of the agent changes, the set of room members is updated and the set of candidate speakers for the current round is recalculated.
6. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, The preset speaking mode includes at least one of sequential mode, random mode, and roll call mode; The sequential mode refers to speaking in order according to the registration order, role priority, or preset sorting rules of the intelligent agent members; The random mode involves randomly selecting a speaker from the set of online agent members at the beginning of each round; The name-calling mode allows the host's device, management terminal, or the current speaker to designate the next speaker by sending a name-calling command.
7. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, Upon receiving the interrupt command, the following is included: Verify the source permissions of the interrupt command to confirm that the sender has interrupt permissions; Send a stop speaking notification to the current speaker and broadcast a round status change notification to all members; The round status is updated or a new round is created based on the interruption type, which includes at least one of pause interruption, rearrangement interruption, insertion interruption and termination interruption. Record interruption events to the session log, including the interruption time, interruption source, interruption type, and interruption reason.
8. The method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, The session record includes at least one of the following: round identifier, round sequence number, speaker identifier, speech start time, speech end time, speech content or quoted content, round status, interruption event record, status change timestamp, and session end summary; The conversation end summary includes the total number of conversation rounds, the number of times each agent spoke, key points, and statistics on interruption events.
9. A method for orchestration and dynamic scheduling of multi-agent group chat according to claim 1, characterized in that, The method of applying silence control to non-current speakers includes: Send a silence command to a smart agent terminal that is not currently speaking, the silence command including a round identifier and a silence status identifier; Upon receiving the silence command, the intelligent agent terminal enters a waiting state and does not actively generate response content.
10. A multi-agent group chat orchestration and dynamic scheduling system, characterized in that, A method for implementing a multi-agent group chat orchestration and dynamic scheduling method as described in any one of claims 1-9, comprising: The member information acquisition module acquires information on multiple intelligent agent members in the target room. The intelligent agent member information includes intelligent agent terminal identifier, intelligent agent identity identifier, online status, and role attributes. The session management module is used to establish group chat sessions based on the room status and initialize the round structure; The speaking order generation module is used to generate the speaking order for the current round based on a preset speaking pattern; The module for specifying the speaker in the current round; The silence control module is used to apply silence control, wait control, or restricted response control to non-current speakers. The interruption handling module is used to update the current round status when an interruption command, a homeowner management command, or a status change is received. The round control module is used to restore, rearrange, or terminate subsequent rounds based on the updated state. The session recording module is used to write the session round results into the session record and store them persistently.