Multi-agent construction method and apparatus, task processing method and apparatus, computing device, storage medium, computer program product, and chip

By breaking down tasks into multiple subtasks and selecting matching agents from a pool of agents, a multi-agent system is constructed, which solves the difficulties of single-agent and multi-agent systems in handling complex tasks and achieves efficient and flexible task processing.

WO2026020783A1PCT designated stage Publication Date: 2026-01-29HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2025/075447
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-26
Filing Date
2025-01-27
Publication Date
2026-01-29

AI Technical Summary

Technical Problem

Single-agent and multi-agent systems face significant challenges in handling complex tasks, and existing technologies primarily utilize tools configured for agents to handle simple tasks, leading to increased development difficulty and low task processing efficiency and accuracy.

Method used

The task is broken down into multiple subtasks. Agents matching the subtasks are selected from the agent pool, and a multi-agent system is built. The subtasks are processed by the agents matching the subtasks by calling the tools configured by the agents and other agents, which simplifies the writing of the task execution process.

Benefits of technology

It reduces the difficulty of multi-agent systems in handling complex tasks, improves flexibility and task processing efficiency, and enhances the system's adaptability and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025075447_29012026_PF_FP_ABST
    Figure CN2025075447_29012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a multi-agent construction method and apparatus, a task processing method and apparatus, a computing device, a storage medium, a computer program product, and a chip. The multi-agent construction method comprises: splitting a task into a plurality of sub-tasks; determining, from an agent pool, agents respectively matching the plurality of sub-tasks, wherein the agent pool comprises a plurality of agents, and the agents matching the sub-tasks can process the sub-tasks by calling at least one of tools and other agents which are configured by the agents; and constructing a multi-agent system on the basis of the agents respectively matching the plurality of sub-tasks, wherein the multi-agent system is used for processing the task.
Need to check novelty before this filing date? Find Prior Art

Description

Multi-agent construction methods, task processing methods, devices, computing equipment, storage media, computer program products, and chips

[0001] This application claims priority to Chinese patent application No. 202411019947.7, filed on July 26, 2024, entitled "Multi-agent construction method, task processing method, apparatus, computing device, storage medium, computer program product and chip", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of Artificial Intelligence (AI) technology. Specifically, it relates to a method for constructing multi-agent systems, a task processing method, an apparatus, a computing device, a storage medium, a computer program product, and a chip. Background Technology

[0003] Large Language Model-based Agent (LLM-Agent) refers to a computer program based on a large language model that has the ability to plan and execute tasks and can autonomously complete tasks. It has superior reasoning and generalization capabilities and has become a promising paradigm for realizing Artificial General Intelligence (AGI).

[0004] A Large Language Model-based Agent Framework (LLM-Agent Framework) can refer to a software architecture or platform used to build and deploy large language model agents. LLM-Agent Frameworks can be divided into single-agent frameworks and multi-agent frameworks. A single-agent framework supports building a single large language model agent to handle tasks. A multi-agent framework supports using multiple agents to handle tasks. These agents can be pre-configured. A system composed of multiple agents can be called a Multi-Agent System (MAS).

[0005] In the process of implementing this application, it was found that single-agent and multi-agent systems have greater difficulty in handling complex tasks. Summary of the Invention

[0006] This application provides a method for constructing multi-agent systems, a task processing method, an apparatus, a computing device, a storage medium, a computer program product, and a chip, which can reduce the difficulty of multi-agent systems in handling complex tasks.

[0007] Firstly, this application provides a method for constructing a multi-agent system, which may include: splitting a task into multiple sub-tasks; determining agents from an agent pool that match each of the multiple sub-tasks; the agent pool including multiple agents; the agent matching a sub-task being able to process the sub-task by invoking tools configured by the agent and at least one of other agents; constructing a multi-agent system based on the agents matching each of the multiple sub-tasks; and using the multi-agent system to process the task.

[0008] The multi-agent construction method provided in this application reduces the difficulty of task processing by breaking down tasks into multiple sub-tasks. Furthermore, since the multi-agent system utilizes agents matched to sub-tasks to process them, it improves the flexibility of handling complex tasks and can adapt to various complex tasks, thereby reducing the difficulty of handling complex tasks. In addition, since the agents matched to sub-tasks can be determined from an agent pool, which can include multiple pre-configured agents, it is easy to obtain agents matching the sub-tasks. An agent can be viewed as a composite tool aggregating multiple simple tools. The agent matched to a sub-task can be configured with at least one of other agents and tools, allowing it to process the sub-task by calling the configured tools and at least one of other agents, without needing to define the calling and execution of tools involved in each operation during the task execution flow writing process. This simplifies the task execution flow writing and reduces development difficulty. Moreover, by calling other agents configured to process tasks, task processing efficiency and accuracy are improved. Furthermore, this integration and invocation method effectively utilizes the capabilities of the language model configured by the agents, enabling multi-agent systems to handle more complex tasks and requirements.

[0009] In one possible implementation, determining the agent matching each of the multiple sub-tasks from the agent pool may include: obtaining task information corresponding to each of the multiple sub-tasks. The task information includes at least one of first task information and second task information. The first task information indicates the functionality required by the agent to be built. The second task information indicates the model to be configured and the components to be configured. The agent to be built is the agent required by the sub-task. The model to be configured is the language model that the agent to be built needs to configure. The components to be configured are the components that the agent to be built needs to configure. Next, obtaining configuration information corresponding to each of the multiple agents. The configuration information includes at least one of first configuration information and second configuration information. The first configuration information indicates the functionality of the agent. The second configuration information indicates the components configured by the agent. The components include at least one of tools and other agents. Based on the task information corresponding to each of the multiple sub-tasks and the configuration information corresponding to each of the multiple agents, determining the agent matching each of the multiple sub-tasks from the agent pool.

[0010] In another possible implementation, the method may further include: determining that a target subtask exists among multiple subtasks. The target subtask is a subtask that has not been matched with an agent from the intelligence pool. An agent matching the target subtask is constructed based on a language model in the language model pool and components in the component pool. The component pool includes at least one of a tool pool and an agent pool.

[0011] Since the agent matching the target subtask is built based on the language model in the language model pool and the components in the component pool, it is possible to combine different language models and components to meet the task requirements, thereby achieving customization and personalization.

[0012] In another possible implementation, an agent matching the target subtask is constructed based on language models in the language model pool and components in the component pool. This can include: determining a target language model from the language model pool and a target component from the component pool based on task information of the target subtask; and constructing an agent matching the target subtask based on the target language model and target components.

[0013] In another possible implementation, the method may also include adding agents to the agent pool that match the target subtask.

[0014] By adding agents that match the target subtask to the agent pool, the number of agents in the pool is increased, so that agents that match the target subtask can be identified from the pool later without having to rebuild them.

[0015] In another possible implementation, the method may further include at least one of the following: determining that the target language model does not exist in the language model pool, and adding the target language model to the language model pool; determining that the target component does not exist in the component pool, and adding the target component to the component pool.

[0016] By adding target language models to the language model pool and target components to the component pool, the language models in the language model pool and the components in the component pool are enriched, so that the target language models can be obtained from the language model pool and the target components can be obtained from the component pool in the future without having to rebuild them.

[0017] In another possible implementation, the agent pool has a first invocation interface. This first invocation interface is used to support the invocation of individual agents within the agent pool. And / or, the language model pool has a second invocation interface. This second invocation interface is used to support the invocation of individual language models within the language model pool. And / or, the tool pool has a third invocation interface. This third invocation interface is used to support the invocation of individual tools within the tool pool.

[0018] In another possible implementation, the agent has a fourth invocation interface to support invocation of the agent. And / or, the language model has a fifth invocation interface to support invocation of the language model. And / or, the tool has a sixth invocation interface to support invocation of the tool.

[0019] Because the agent pool has a first calling interface, the language model pool has a second calling interface, the tool pool has a third calling interface, the agents have a fourth calling interface, the language models have a fifth calling interface, and the tools have a sixth calling interface, developers can more quickly develop and deploy multi-agent systems based on a series of user-friendly calling interfaces. This simplifies the development and deployment of multi-agent systems for different tasks and reduces the time cost of development and integration.

[0020] In another possible implementation, the method may further include: determining the agent to be tuned from a pool of agents; and adjusting the configuration of the agent to be tuned. The configuration includes at least one of the following: a language model, tools, other agents, agent roles, and agent instructions.

[0021] In another possible implementation, adjusting the configuration of the agent to be adjusted may include: obtaining configuration information to be adjusted. The configuration information to be adjusted is the configuration information of the fourth interface possessed by the agent to be adjusted. The configuration of the agent to be adjusted is then adjusted by modifying this configuration information.

[0022] By adjusting the agents to be adjusted in the agent pool, the agent pool and agents can be flexibly adjusted and expanded. This improves the flexibility and scalability of the multi-agent system, enabling it to adapt to different application scenarios and business needs.

[0023] In another possible implementation, the second calling interface corresponding to the language model pool has configuration information. This configuration information is used to construct the second calling interface. The method may also include adjusting the second calling interface by modifying its configuration information, thereby adjusting the language model pool.

[0024] In another possible implementation, adjusting the second calling interface corresponding to the language model pool to adjust the language model pool can include at least one of the following: deleting a corresponding language model from the language model pool by adjusting the configuration information of the second calling interface corresponding to the language model pool; or adding a corresponding language model to the language model pool by adjusting the configuration information of the second calling interface corresponding to the language model pool.

[0025] In another possible implementation, the third invocation interface corresponding to the tool pool has configuration information. This configuration information is used to construct the third invocation interface. The method may also include adjusting the third invocation interface by modifying its configuration information, thereby adjusting the tool pool.

[0026] In another possible implementation, adjusting the third calling interface corresponding to the tool pool to adjust the tool pool can include at least one of the following: deleting a corresponding tool from the tool pool by adjusting the configuration information of the third calling interface corresponding to the tool pool; or adding a corresponding tool to the tool pool by adjusting the configuration information of the third calling interface corresponding to the tool pool.

[0027] In another possible implementation, the fifth calling interface corresponding to the language model has configuration information. This configuration information is used to construct the fifth calling interface. The method may also include adjusting the fifth calling interface by modifying its configuration information to adjust the language model.

[0028] In another possible implementation, adjusting the fifth calling interface corresponding to the language model to adjust the language model can be achieved by adjusting the configuration information of the fifth calling interface corresponding to the language model. This can include adjusting configuration information related to the output information of the language model by adjusting the configuration information of the fifth calling interface corresponding to the language model. The configuration information related to the output information of the language model includes temperature parameters.

[0029] In another possible implementation, the sixth calling interface corresponding to the tool has configuration information. This configuration information is used to construct the sixth calling interface. The method may also include adjusting the sixth calling interface by modifying its configuration information to adjust the tool's output information.

[0030] In another possible implementation, the sixth calling interface corresponding to the tool is adjusted by adjusting the configuration information of the sixth calling interface to adjust the tool's output information. This can include adjusting the tool's output information by adjusting the input parameters included in the configuration information of the sixth calling interface corresponding to the tool.

[0031] Since the intelligent agent pool can be adjusted by modifying the configuration information of the first calling interface corresponding to the intelligent agent pool, the language model pool can be adjusted by modifying the configuration information of the second calling interface corresponding to the language model pool, the tool pool can be adjusted by modifying the configuration information of the third calling interface corresponding to the tool pool, the language model can be adjusted by modifying the configuration information of the fifth calling interface corresponding to the language model, and the output information of the tool can be adjusted by modifying the configuration information of the sixth calling interface corresponding to the tool, the intelligent agent pool, language model pool, tool pool, intelligent agent, language model and tool can be flexibly adjusted and expanded. This improves the flexibility and scalability of the multi-agent system, enabling the multi-agent system to adapt to different application scenarios and business needs.

[0032] In another possible implementation, constructing a multi-agent system based on agents matched to each of the multiple sub-tasks may include: determining dependency information between the multiple sub-tasks; determining execution parameters corresponding to each of the multiple sub-tasks based on the dependency information; the execution parameters indicating the execution order of the sub-tasks; and obtaining the multi-agent system based on the execution parameters corresponding to each of the multiple sub-tasks and the agents matched to each of the multiple sub-tasks. The multi-agent system is used to invoke the agents matched to each of the multiple sub-tasks based on the execution order indicated by the execution parameters, and to utilize the agents matched to each of the multiple sub-tasks to process the multiple sub-tasks.

[0033] By constructing a multi-agent system based on execution parameters corresponding to each subtask and agents matching each subtask, the system can invoke agents matching each subtask according to the execution order indicated by the execution parameters. These agents then process the multiple subtasks. Furthermore, since an agent can be viewed as a composite tool aggregating multiple simple tools, an agent matching a subtask can be configured with at least one of other agents and tools. This allows the agent matching a subtask to process the subtask by invoking the configured tools and at least one of other agents, eliminating the need to define the invocation and execution of tools involved in each operation during task execution flow writing. This simplifies task execution flow writing and reduces development difficulty. Moreover, by invoking other agents configured by the agent to process tasks, task processing efficiency and accuracy are improved.

[0034] In another possible implementation, splitting the task into multiple subtasks can include: splitting the task into multiple subtasks according to a predetermined splitting strategy. The predetermined splitting strategy can refer to a pre-configured strategy for splitting the task.

[0035] In another possible implementation, the task is broken down into multiple subtasks based on the task requirements information. The task requirements information describes the task's requirements.

[0036] In another possible implementation, the method may further include: invoking a third interactive agent in response to detecting a task processing request; interacting with the object using the third interactive agent to obtain third interactive information; the third interactive information including task requirement information; and the third interactive agent being used to interact with a third object.

[0037] In another possible implementation, based on the task's requirement information, the task is split into multiple subtasks. This may include: in response to detecting a task splitting request for the task, invoking a task splitting agent; using the task splitting agent to process the task splitting request and obtain multiple subtasks corresponding to the task; or using a task splitting model to process the task splitting request and obtain multiple subtasks corresponding to the task. The task splitting request is used to request the task splitting agent to split the task. The task splitting agent is used to split the task. The task splitting request includes task requirement information.

[0038] In another possible implementation, a task splitting agent is used to process task splitting requests, resulting in multiple subtasks corresponding to the task. This may include: processing task splitting requests based on a prompting strategy to obtain prompting information; and then using the task splitting agent to process the prompting information to obtain multiple subtasks corresponding to the task.

[0039] In another possible implementation, a task splitting agent is used to process task splitting requests and obtain multiple subtasks corresponding to the task. This can include: using a planning domain definition language, a task splitting agent is used to process task splitting requests and obtain multiple subtasks corresponding to the task.

[0040] In another possible implementation, based on a planning domain definition language, a task-splitting agent processes task splitting requests to obtain multiple subtasks corresponding to the task. This can include: processing the task splitting request using the task-splitting agent to obtain PDDL description information; processing the PDDL description information using a classic planner to obtain task splitting information; and processing the task splitting information using the task-splitting agent to obtain multiple subtasks corresponding to the task, expressed in natural language.

[0041] In another possible implementation, the tool pool includes a first tool. This first tool is capable of handling computer vision tasks.

[0042] The functionality of the tool pool is enhanced by configuring a first tool in the tool pool that is capable of handling computer vision tasks.

[0043] Secondly, this application provides a task processing method, which may include: acquiring a task to be processed; processing the task using a multi-agent system to obtain a task processing result. The multi-agent system is constructed based on the multi-agent construction method described in the embodiments of this application.

[0044] In one possible implementation, using a multi-agent system to process tasks and obtain task processing results can include: the multi-agent system, based on the execution order indicated by the execution parameters corresponding to each of the multiple sub-tasks, calling agents matched to each sub-task to process the multiple sub-tasks and obtaining task processing results. The multiple sub-tasks are obtained by the multi-agent system breaking down the task into its components.

[0045] In another possible implementation, the multi-agent system has an execution interface. This execution interface enables the multi-agent system to invoke agents matched to each of the multiple subtasks to process them, based on the execution order indicated by the execution parameters corresponding to each subtask, and to obtain the task processing results.

[0046] In another possible implementation, the task to be processed includes a trip planning task. Multiple subtasks to be processed include a first interaction subtask, a planning subtask, and an execution subtask. The multi-agent system corresponding to the trip planning task includes a first interaction agent, a planning agent, and an execution agent. The first interaction agent executes the first interaction subtask. The planning agent executes the planning subtask. The execution agent executes the execution subtask.

[0047] The multi-agent system, based on the execution order indicated by the execution parameters corresponding to each of the multiple sub-tasks to be processed, calls agents matched to each sub-task to process the multiple sub-tasks and obtain task processing results. This can include: a first interactive agent executing a first interactive sub-task to obtain first interactive information. The first interactive information includes dialogue information between a first object and the first interactive agent; a planning agent executing a planning sub-task based on the first interactive information to obtain trip planning information. The trip planning information includes at least one of the following: trip time, at least one trip location, and the trip order corresponding to each of the at least one trip location. Trip locations include points of interest (POIs); an execution agent executing an execution sub-task based on the trip planning information to obtain at least one of route planning information and trip point of interest information corresponding to each of the at least one trip point of interest. The first interactive agent obtaining detailed trip information as the task processing result based on the route planning information, the trip point of interest information corresponding to each of the at least one trip point of interest, and the trip planning information.

[0048] In another possible implementation, the executing agent, based on the trip planning information, performs an execution subtask to obtain at least one of route planning information and trip point of interest information corresponding to at least one trip point of interest. This may include at least one of the following: the executing agent invokes a travel service tool configured by the executing agent to obtain trip point of interest information corresponding to at least one trip point of interest. The travel service tool includes at least one of the following: an agent associated with the travel service function and a tool associated with the travel service function. The executing agent invokes a map service tool configured by the executing agent to obtain route planning information. The map service tool includes at least one of the following: an agent associated with the map service function and a tool associated with the map service function.

[0049] In another possible implementation, at least one trip point of interest includes a target trip point of interest. The target trip point of interest is obtained by the first interactive agent in response to a recommendation request received from a first object request, based on the recommendation request. The recommendation request is used to request the first interactive agent to recommend trip points of interest.

[0050] In another possible implementation, the target travel point of interest is obtained by the first interactive agent in response to a recommendation request received from a first object, based on the recommendation request. This can include: the target travel point of interest is obtained by the first interactive agent in response to the recommendation request received from the first object, by invoking a first recommendation tool configured by the first interactive agent to process recommendation request information. The recommendation request information is obtained by the first interactive agent in response to the recommendation request received from the first object, by parsing the recommendation request. The first recommendation tool includes at least one of the following: an agent related to the first recommendation function and a tool related to the first recommendation function.

[0051] Since the first interactive intelligent agent has a first recommendation function to recommend information to the first object, it can meet the information recommendation needs of the first object.

[0052] In another possible implementation, the method may further include: a first interactive agent responding to a received trip modification request from a first object, the first interactive agent interacting with the first object based on the trip modification request to obtain trip modification information; and a planning agent modifying the trip planning information based on the trip modification information.

[0053] Since the multi-agent system allows the first agent to modify the trip planning information, it can meet the trip modification needs of the first agent.

[0054] In another possible implementation, the method may further include: a planning agent storing trip planning information in a trip planning file; and an execution agent retrieving the trip planning information from the trip planning file.

[0055] By storing the itinerary planning information in an itinerary planning file, the execution agent can easily obtain the itinerary planning information, thus improving communication efficiency.

[0056] In another possible implementation, the method may also include: a first interactive agent obtaining trip planning information from a trip planning file.

[0057] By storing the itinerary planning information in an itinerary planning file, the first interactive intelligent agent can easily obtain the itinerary planning information, thus improving communication efficiency.

[0058] In another possible implementation, the method may further include: the executing agent storing trip point of interest information corresponding to at least one trip point of interest in a trip location file; and the first interacting agent retrieving the trip point of interest information corresponding to at least one trip point of interest from the trip location file.

[0059] By storing the trip's points of interest information in a trip location file, the first interactive agent can easily obtain the trip's points of interest information, thus improving communication efficiency.

[0060] In another possible implementation, the executing agent stores route planning information in a trip planning file. The first interacting agent retrieves the route planning information from the trip planning file.

[0061] By storing route planning information in a trip planning file, the first interactive agent can easily obtain the route planning information, thus improving communication efficiency.

[0062] In another possible implementation, the task to be processed includes an information recommendation task. Multiple subtasks to be processed include a second interaction subtask, a retrieval subtask, and a recommendation subtask. The multi-agent system corresponding to the information recommendation task includes a second interaction agent, a retrieval agent, and a recommendation agent. The second interaction agent is used to execute the second interaction subtask. The retrieval agent is used to execute the retrieval subtask. The recommendation agent is used to execute the recommendation subtask.

[0063] The multi-agent system, based on the execution order indicated by the execution parameters corresponding to each of the multiple sub-tasks to be processed, calls agents matched to each sub-task to process the multiple sub-tasks and obtain task processing results. This can include: a second interactive agent executing a second interactive sub-task to obtain second interactive information. The second interactive information includes dialogue information between a second object and the second interactive agent. A retrieval agent, based on the second interactive information, executes a retrieval sub-task to obtain retrieval information. A recommendation agent, based on the retrieval information, executes a recommendation sub-task to obtain recommendation information as the task processing result.

[0064] In another possible implementation, the retrieval agent performs a retrieval subtask based on the second interaction information to obtain retrieval information. This may include: the retrieval agent calling the keyword agent configured by the retrieval agent to obtain the keywords corresponding to the second interaction information, and calling the retrieval tool configured by the retrieval agent to obtain retrieval information corresponding to the keywords.

[0065] In another possible implementation, the recommendation agent performs a recommendation subtask based on the retrieved information to obtain recommendation information as the result of the task processing. This may include: the recommendation agent calling a second recommendation tool configured by the recommendation agent to obtain recommendation information corresponding to the retrieved information as the result of the task processing. The second recommendation tool includes at least one of the following: an agent related to the second recommendation function and a tool related to the second recommendation function.

[0066] Thirdly, this application provides a multi-agent construction apparatus, which may include: a splitting module for splitting a task into multiple subtasks; a determining module for determining agents from an agent pool that match each of the multiple subtasks; the agent pool including multiple agents, wherein the agent matching a subtask can process the subtask by invoking a tool configured by the agent and at least one of other agents; and a construction module for constructing a multi-agent system based on the agents matching each of the multiple subtasks. The multi-agent system is used to process the task.

[0067] Fourthly, this application provides a task processing apparatus, which may include: an acquisition module for acquiring tasks to be processed; and a processing module for processing the tasks to be processed using a multi-agent system to obtain task processing results. The multi-agent system is constructed based on a multi-agent construction apparatus according to embodiments of this application.

[0068] Fifthly, embodiments of this application provide a computing device, including a memory and a processor, wherein the memory stores instructions that, when executed by the processor, cause the method described in the first aspect to be implemented.

[0069] In a sixth aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the method described in the first aspect to be implemented.

[0070] In a seventh aspect, embodiments of this application also provide a computer program product, which may include a computer program that, when run by a processor, enables the implementation of the multi-agent construction method and task processing method according to embodiments of this application.

[0071] Eighthly, embodiments of this application also provide a chip, including at least one processor and a communication interface, wherein the processor is used to execute the multi-agent construction method and task processing method described in embodiments of this application. Attached Figure Description

[0072] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0073] Figure 1A schematically illustrates the structure of an intelligent agent according to an embodiment of this application;

[0074] Figure 1B schematically illustrates the principle of a multi-agent construction method according to an embodiment of this application;

[0075] Figure 2 schematically illustrates the principle of the intelligent agent construction method according to an embodiment of this application;

[0076] Figure 3 schematically illustrates a flowchart of a multi-agent construction method according to an embodiment of this application;

[0077] Figure 4 schematically illustrates a multi-agent system according to an embodiment of this application;

[0078] Figure 5 schematically illustrates a flowchart of a task processing method according to an embodiment of this application;

[0079] Figure 6A schematically illustrates the principle of the itinerary planning task processing method according to an embodiment of this application;

[0080] Figure 6B schematically illustrates a flowchart of a trip planning task processing method according to an embodiment of this application;

[0081] Figure 7A schematically illustrates the principle of the information recommendation task processing method according to an embodiment of this application;

[0082] Figure 7B schematically illustrates a flowchart of an information recommendation task processing method according to an embodiment of this application;

[0083] Figure 8 schematically illustrates an exemplary system architecture for applying the multi-agent construction method, task processing method, and apparatus according to embodiments of this application;

[0084] Figure 9 schematically illustrates a block diagram of a multi-agent construction apparatus according to an embodiment of this application;

[0085] Figure 10 schematically illustrates a block diagram of a task processing apparatus according to an embodiment of this application; and

[0086] Figure 11 illustrates a block diagram of a computing device according to an embodiment of this application. Detailed Implementation

[0087] The term "and / or" used in this article describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0088] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first feature representation" and "second feature representation," etc., are used to distinguish different feature representations, not to describe a specific order of feature representations.

[0089] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0090] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.

[0091] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.

[0092] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0093] To facilitate understanding, some of the concepts involved in this application will be explained first.

[0094] Large Language Model (LLM) can be a very large deep learning model that is pre-trained based on a large number of training samples.

[0095] Small Language Models (SLMs) are small deep learning models with a relatively small size and few parameters. For example, the number of parameters can range from thousands to millions. SLMs are designed to be more compact and efficient to meet the need for feasible artificial intelligence solutions under conditions of limited computing and storage resources.

[0096] An intelligent agent can refer to a computational entity that resides in a certain environment, can continuously and autonomously play a role, and has characteristics such as residency, responsiveness, sociality, and initiative.

[0097] A large language model intelligent agent refers to a computer program based on a large language model and key modules, possessing task planning and execution capabilities, and capable of autonomously completing tasks. The large language model can act as a control center or brain, responsible for managing a series of operations required to complete tasks or respond to object requests. Key modules can be used to assist the large language model in processing tasks. Key modules may include planning models, memory models, and tool modules, etc.

[0098] Small language model agents refer to computer programs that are based on small language models and key modules, possess task planning and execution capabilities, and are able to autonomously complete tasks. For convenience, large language model agents or small language model agents will be referred to as agents below.

[0099] A large language model intelligent agent framework can refer to a software architecture or platform used to build and deploy large language model intelligent agents. Large language model intelligent agent frameworks can be divided into single-agent frameworks and multi-agent frameworks. A single-agent framework supports building a single intelligent agent to handle tasks. A multi-agent framework supports building multiple intelligent agents to handle tasks. A multi-agent system can refer to a system built based on multiple intelligent agents. Multi-agent systems possess capabilities such as language understanding and generation, collaborative work and interaction, and real-time feedback and learning. Language understanding and generation means that intelligent agents can understand the language input by objects through a large language model and respond in natural language. Collaborative work and interaction means that multiple intelligent agents can interact and collaborate through language models to jointly solve problems, act collaboratively, or make autonomous decisions in complex environments. Real-time feedback and learning means that multi-agent systems can learn and improve in real time through interaction with objects, thereby continuously optimizing their response capabilities and efficiency. Multi-agent systems based on large language models leverage the powerful capabilities of large language models to enhance interaction and collaboration among multiple agents, thereby improving the intelligence and adaptability of the overall system.

[0100] For example, a multi-agent system can include a client agent and a problem-solving agent. The client agent can use language models to understand the object's question and provide an answer, while the problem-solving agent can interact with other data sources and machines to solve more complex technical problems.

[0101] Artificial general intelligence (AGI) is a theoretical research field in artificial intelligence that studies how to develop software with human-like intelligence and self-learning capabilities. Its goal is to enable software to perform tasks beyond its training or development objectives. Currently, artificial intelligence technology relies on pre-defined model parameters. For example, a trained image recognition model is difficult to use for building websites. As a theoretical research area, AGI aims to develop AI systems with autonomous self-control, reasonable self-understanding, and the ability to learn new skills, capable of solving complex problems in environments and situations where they were not taught at the time of creation.

[0102] Natural Language Processing (NLP) is an interdisciplinary field encompassing computer science, artificial intelligence, and linguistics. It aims to research and develop algorithms and technologies that enable computers to understand, analyze, generate, and process human language. NLP can be divided into Natural Language Understanding (NLU) and Natural Language Generation (NLG). NLU refers to enabling computers to comprehend natural language. NLG refers to generating text in a human-understandable natural language form based on structured data.

[0103] A complex task can refer to a task that involves a complex scenario. A complex scenario can refer to a scenario whose complexity meets predetermined conditions.

[0104] An Application Programming Interface (API), also known as an application interface, can be a protocol that connects different components of a software system. APIs can provide routines that applications and developers can access based on software or hardware without needing to access the source code or understand the details of the internal workings.

[0105] The configuration information for an Application Programming Interface (API) can include configuration items. The API can be customized by adjusting these configuration items. Configuration items can include at least one of the following: API overview, API methods, API parameters, response objects, error codes, and messages. The API configuration information can be generated based on the API's documentation.

[0106] In this application, the agent can be configured with a language model and at least one component. The agent can invoke the configured component through the configured language model. The language model can include one of a large language model and a small language model. The at least one component can include at least one of at least one tool and at least one other agent, that is, the at least one component can include at least one tool. Optionally, the at least one component can include at least one other agent. Optionally, the at least one component can include at least one tool and at least one other agent. The tool configured by the agent can refer to a simple tool at the tool level. A simple tool can refer to a tool capable of handling simple tasks. Simple tasks can include tool invocation tasks. The other agents configured by the agent can refer to composite tools. Composite tools can refer to tools capable of handling high-order tasks. High-order tasks can be understood as complex tasks or abstract tasks. For example, high-order tasks can include at least one of natural language processing tasks and computer vision tasks. In this application, the calling interface can be an application programming interface.

[0107] To facilitate understanding, the application will first be described in general terms below.

[0108] For single-agent systems, tasks are handled by a single agent. For example, a single agent breaks down a task into multiple sub-tasks, and then processes each sub-task. Since multiple sub-tasks need to be handled by the single agent, the workload is heavy and the processing difficulty is high for complex tasks. This results in a low success rate for single agents in handling complex tasks, limiting their application in such situations.

[0109] For multi-agent systems, multiple agents can be pre-configured to handle tasks. However, since the agents are pre-configured and their collaboration is relatively fixed, this relatively fixed approach to multi-agent systems has low flexibility in handling complex tasks and is difficult to adapt to various complex situations.

[0110] Furthermore, it was found that the tools for configuring intelligent agents in related technologies are tools that support simple tasks. Users need to define the calls and execution of tools involved in each operation during the task execution process. The calls involved are tool-level calls, which increases the development difficulty and affects the efficiency and accuracy of task processing, thereby increasing the difficulty of related technologies in handling complex tasks.

[0111] Therefore, the related technologies face significant challenges in handling complex tasks.

[0112] Therefore, it is necessary to reduce the difficulty in handling complex tasks. It should be noted that the large language model agent framework involved in this application is a multi-agent framework, i.e., a multi-agent system. In realizing the inventive concept of this application, it was further discovered that to improve the flexibility of the multi-agent system in handling complex tasks and to adapt to various complex tasks, the task can be broken down into multiple sub-tasks to reduce the difficulty of task processing. Agents matching the sub-tasks can be customized, and to facilitate the customization of agents matching the sub-tasks, an agent pool (i.e., Agent PooL) can be provided. The agent pool can include at least one agent corresponding to each of multiple types. The type can indicate the functions possessed by the agent. Thus, agents matching each of the multiple sub-tasks can be determined from the agent pool. It should be noted that the agents in the agent pool can be pre-configured or constructed based on the construction method for constructing agents matching the sub-tasks described in this application.

[0113] Furthermore, it was found that if an agent is viewed as a composite tool aggregating multiple simple tools, then this composite tool is more functionally diverse. The tasks it can handle are no longer limited to simple tasks like single-tool invocation; it can also handle higher-order tasks, such as information retrieval and information recommendation. Therefore, this application proposes that in addition to agent-level invocation (i.e., "agent invoking tools"), agent-level invocation (i.e., "agent invoking other agents") can also be implemented, using other agents as composite tools for invocation.

[0114] Since an agent can be viewed as a composite tool that integrates multiple simple tools, and the language model configured for the agent possesses the ability to understand and follow instructions, tasks can be handled by calling other agents configured within the agent's own configuration. This eliminates the need to define the calling and execution of each tool involved in the task execution flow during the writing process, thereby simplifying the task execution flow and reducing development difficulty. Furthermore, by calling other agents configured within the agent's configuration to handle higher-order tasks, task processing efficiency and accuracy are improved. In addition, this integration and calling method effectively utilizes the capabilities of the language model, enabling multi-agent systems to handle more complex tasks and requirements.

[0115] Therefore, to improve task processing efficiency and accuracy, a "smart agent calling other smart agents" approach can be adopted, where other smart agents are invoked as composite tools. That is, the smart agent matched with the sub-task can be configured with at least one of other smart agents and tools, so that the smart agent matched with the sub-task can process the sub-task by invoking the tool configured by the smart agent and at least one of the other smart agents. The tool configured by the smart agent can include at least one. The other smart agents configured by the smart agent can include at least one.

[0116] Based on the above, this application proposes a technical solution for constructing a multi-agent system, which involves dividing a task into multiple sub-tasks. Agents matching each sub-task are determined from an agent pool. Based on these matching agents, a multi-agent system for handling the task is constructed. The agents matching the sub-tasks can handle the sub-tasks by invoking tools configured for those agents and at least one of other agents. The technical solution for constructing the multi-agent system will be described below with reference to Figures 1A and 1B. It should be noted that Figures 1A and 1B are merely examples applicable to embodiments of this application, intended to help those skilled in the art understand the technical content of this application. The number and relationships of language models, agents, and tools shown in the figures do not constitute any limitation.

[0117] First, the structure of the intelligent agent in the embodiment of this application will be described with reference to FIG1A.

[0118] Figure 1A schematically illustrates the structure of an intelligent agent according to an embodiment of this application.

[0119] As shown in Figure 1A, an agent can be configured with a language model and at least one component. The at least one component can include at least one of the following: at least one tool (i.e., a simple tool) and at least one other agent (i.e., a composite tool). The agent can invoke the configured component through the configured language model.

[0120] In one implementation, at least one component may include at least one tool (i.e., a simple tool). Thus, referring to 1A-1 in Figure 1A, the agent can configure a language model and at least one tool (i.e., a simple tool).

[0121] As an alternative implementation, at least one component may include at least one other agent (i.e., a composite tool). Thus, referring to 1A-2 in Figure 1A, the agent may be configured with a language model and at least one other agent (i.e., a composite tool).

[0122] As another implementation, at least one component may include at least one tool (i.e., a simple tool) and at least one other agent (i.e., a composite tool). Thus, referring to 1A-3 in Figure 1A, the agent may be configured with a language model, at least one tool (i.e., a simple tool), and at least one other agent (i.e., a composite tool).

[0123] Next, Figure 1B schematically illustrates the principle of the multi-agent construction method according to an embodiment of this application.

[0124] As shown in Figure 1B, the agent pool 120 can include M agents, namely agent 120-1, ..., agent 120-m, ..., 120-M. M can be an integer greater than 1. m can be an integer greater than or equal to 1 and less than or equal to M. It should be noted that the agents in Figure 1B can be configured with a language model and tools (i.e., simple tools), as shown in the structure 1A-1 in Figure 1A. Optionally, the agents in Figure 1B can be configured with a language model, tools (i.e., simple tools), and other agents (i.e., composite tools), as shown in the structure 1A-3 in Figure 1A. It should also be noted that the structure of the agents in Figure 1B is merely illustrative. It can be flexibly adjusted according to implementation needs.

[0125] Task 110 can be divided into N subtasks, namely subtask 110-1, ..., subtask 110-N. N can be an integer greater than 1.

[0126] Agents matching each of the N subtasks can be determined from agent pool 120. For example, agent 120-m matches subtask 110-1, and agent 120-M matches subtask 110-N. Agents matching subtasks can invoke at least one of the tools configured by the agent (i.e., simple tools) and other agents (i.e., composite tools) through the language model configured by the agent to process the subtask. For example, agent 120-M matching subtask 110-N can invoke the tools configured by agent 120-M (i.e., simple tools) and other agents (i.e., composite tools) through the language model configured by the agent to process subtask 110-N.

[0127] Therefore, a multi-agent system for processing task 120 is constructed based on agents that are matched with each of the N sub-tasks.

[0128] Furthermore, to achieve customization and personalization, this application also provides a language model pool (LM PooL) and a tool pool, enabling the flexible construction of agents that meet task requirements based on the language model pool and the component pool. The component pool can include at least one of the tool pool and the agent pool. For example, if a target subtask is identified among multiple subtasks, an agent matching the target subtask can be constructed based on the language model in the language model pool and the components in the component pool. The target subtask may be a subtask for which no agent has been matched from the agent pool.

[0129] A language model pool can include multiple language models. Language models in the pool can be pre-configured or added based on user needs. Language models can be open-source or closed-source. Language models can be large language models, thus the language model pool can include a large language model pool (i.e., LLM PooL). A large language model pool can include multiple large language models. Large language models can be open-source or closed-source. Furthermore, language models can also be small language models, thus the language model pool can also include a small language model pool (i.e., SLM PooL). A small language model pool can include at least one small language model. Small language models can be open-source or closed-source.

[0130] A tool pool can include multiple tools. Tools can include at least one of the following: APIs, search engines, code interpreters, mathematical engines, databases, knowledge bases, and external models, etc.

[0131] The following section, with reference to Figure 2, will explain how to construct an agent that matches the target sub-task.

[0132] Figure 2 schematically illustrates the principle of the intelligent agent construction method according to an embodiment of this application.

[0133] As shown in Figure 2, the agent pool can include multiple agents, namely agent 210-1, agent 210-2, ..., agent 210-p, ..., agent 210-P. P can be an integer greater than 1. p can be an integer greater than or equal to 1 and less than or equal to P.

[0134] The language model pool 220 can include multiple language models, namely language model 220-1, language model 220-2, ..., language model 220-q, ..., language model 220-Q. Q can be an integer greater than 1. q can be an integer greater than or equal to 1 and less than or equal to Q.

[0135] The tool pool can include multiple tools, namely tool230-1, tool230-2, ..., tool230-r, ..., tool230-R. R can be an integer greater than 1. r can be an integer greater than or equal to 1 and less than or equal to R.

[0136] It should be noted that agents in the agent pool can be invoked as composite tools, while tools in the tool pool can be invoked as simple tools.

[0137] As one implementation, an agent matching the target subtask can be constructed based on the language model in the language model pool 220, the tools in the tool pool 230, and the agents in the agent pool 210. For example, the target subtask can be target subtask A. The language model matching target subtask A can be determined from the language model pool 220 as language model 220-1. The tool matching target subtask A can be determined from the tool pool 230 as tool 230-2 (i.e., a simple tool). The agent matching the subtask can be determined from the agent pool 210 as agent 210-P (i.e., a composite tool). Based on language model 220-1, tool 230-2 (i.e., a simple tool), and agent 210-P (i.e., a composite tool), an agent A matching target subtask A can be constructed. Thus, agent A can call the configured tool 230-2 (i.e., a simple tool) and agent 210-P (i.e., a composite tool) through the configured language model 220-1.

[0138] As another implementation, an agent matching the target subtask can be constructed based on the language models in the language model pool 220 and the tools in the tool pool 230. For example, the target subtask can be target subtask B. The language model matching target subtask B can be determined from the language model pool 220 as language model 220-2. The tools matching target subtask B determined from the tool pool 230 include tool 230-1 (i.e., simple tool), tool 230-r (i.e., simple tool), and tool 230-R (i.e., simple tool). An agent B matching target subtask B is constructed based on language model 220-2, tool 230-1 (i.e., simple tool), tool 230-r (i.e., simple tool), and tool 230-R (i.e., simple tool). Thus, agent B can call the configured tools 230-1 (i.e., simple tool), tool 230-r (i.e., simple tool), and tool 230-R (i.e., simple tool) through the configured language model 220-2.

[0139] As another implementation, an agent matching the target subtask can be constructed based on the language model in language model pool 220 and the agents in agent pool 210. For example, the target subtask can be target subtask C. The language model matching the target subtask C can be determined from language model pool 220 as language model 220-Q. The agents matching the target subtask C determined from agent pool 210 include agent 210-1 (i.e., composite tool) and agent 210-2 (i.e., composite tool). An agent C matching the target subtask C is constructed based on language model 220-Q, agent 210-1 (i.e., composite tool), and agent 210-2 (i.e., composite tool). Thus, agent C can call the configured agent 210-1 (i.e., composite tool) and agent 210-2 (i.e., composite tool) through the configured language model 220-Q.

[0140] Since the agent matching the target subtask is built based on the language model in the language model pool and the components in the component pool, it is possible to combine different language models and components to meet the task requirements, thereby achieving customization and personalization.

[0141] In addition, to simplify the development and deployment of multi-agent systems for different tasks, this application provides a series of user-friendly calling interfaces.

[0142] For example, this application may provide at least one of the following calling interfaces.

[0143] A pool of agents can have a first invocation interface. This first invocation interface can be used to support the invocation of individual agents within the pool. An agent can have a fourth invocation interface. This fourth invocation interface can be used to support the invocation of that agent.

[0144] A language model pool can have a second calling interface. This second calling interface can be used to support the invocation of individual language models within the pool. A language model can have a fifth calling interface. This fifth calling interface can be used to support the invocation of the language model itself.

[0145] A tool pool can have a third invocation interface. This third invocation interface is used to support the invocation of individual tools within the tool pool. A tool can have a sixth invocation interface. This sixth invocation interface is used to support the invocation of the tool itself.

[0146] Because the agent pool has a first calling interface, the language model pool has a second calling interface, the tool pool has a third calling interface, the agents have a fourth calling interface, the language models have a fifth calling interface, and the tools have a sixth calling interface, developers can more quickly develop and deploy multi-agent systems based on a series of user-friendly calling interfaces. This simplifies the development and deployment of multi-agent systems for different tasks and reduces the time cost of development and integration.

[0147] Furthermore, to improve the flexibility and scalability of multi-agent systems, this application provides a method that can be implemented based on calling interfaces.

[0148] For example, this application can achieve at least one of the following.

[0149] The first calling interface corresponding to the agent pool can have configuration information. This configuration information can be used to construct the first calling interface. The first calling interface can be adjusted by modifying its configuration information, thereby adjusting the agent pool. For example, the corresponding agent in the agent pool can be deleted by adjusting its configuration information. Optionally, the corresponding agent can be added to the agent pool by adjusting its configuration information.

[0150] The fourth invocation interface corresponding to the agent may have configuration information. This configuration information can be used to construct the fourth invocation interface. The fourth invocation interface can be adjusted by modifying its configuration information, thereby adjusting the agent. For example, adjusting the configuration information of the fourth interface can replace at least one of the agent's configured language model, tools, and other agents. Adjusting the configuration information of the fourth interface can also modify at least one of the agent's configured agent role and agent instructions.

[0151] The second API call corresponding to the language model pool can have configuration information. This configuration information can be used to construct the second API call. The language model pool can be adjusted by modifying the configuration information of the second API call corresponding to the language model pool. For example, a corresponding language model can be deleted from the language model pool by modifying the configuration information of the second API call corresponding to the language model pool. Optionally, a corresponding language model can be added to the language model pool by modifying the configuration information of the second API call corresponding to the language model pool.

[0152] The fifth calling interface corresponding to the language model can have configuration information. This configuration information can be used to construct the fifth calling interface. The fifth calling interface can be adjusted by modifying its configuration information, thereby adjusting the language model. For example, configuration information related to the language model's output information can be adjusted by modifying the configuration information of the fifth calling interface. For instance, configuration information related to the language model's output information may include temperature parameters. This allows for the diversification of output information.

[0153] The third-party API corresponding to the tool pool can have configuration information. This configuration information can be used to construct the third-party API. The tool pool can be adjusted by modifying the configuration information of the third-party API corresponding to the tool pool. For example, a corresponding tool in the tool pool can be deleted by modifying the configuration information of the third-party API corresponding to the tool pool. Optionally, a corresponding tool can be added to the tool pool by modifying the configuration information of the third-party API corresponding to the tool pool.

[0154] The sixth API call interface corresponding to the tool can have configuration information. This configuration information can be used to construct the sixth API call interface. The sixth API call interface can be adjusted by modifying its configuration information, thereby adjusting the tool's output information. For example, the tool's output information can be adjusted by modifying the input parameters included in the configuration information of the sixth API call interface.

[0155] Since the intelligent agent pool can be adjusted by modifying the configuration information of the first calling interface corresponding to the intelligent agent pool, the language model pool can be adjusted by modifying the configuration information of the second calling interface corresponding to the language model pool, the tool pool can be adjusted by modifying the configuration information of the third calling interface corresponding to the tool pool, the intelligent agent can be adjusted by modifying the configuration information of the fourth calling interface corresponding to the intelligent agent, the language model can be adjusted by modifying the configuration information of the fifth calling interface corresponding to the language model, and the output information of the tool can be adjusted by modifying the configuration information of the sixth calling interface corresponding to the tool, the intelligent agent pool, language model pool, tool pool, intelligent agent, language model and tool can be flexibly adjusted and expanded. This improves the flexibility and scalability of the multi-agent system, enabling the multi-agent system to adapt to different application scenarios and business needs.

[0156] Therefore, this application proposes a lightweight general intelligent agent framework that can flexibly select or build multiple intelligent agents for different business scenarios and needs, and complete complex tasks through the collaborative approach of the multi-agent system.

[0157] The technical solution of this application will be further described below with reference to the accompanying drawings.

[0158] Figure 3 schematically illustrates a flowchart of a multi-agent construction method according to an embodiment of this application.

[0159] As shown in Figure 3, the method 300 may include operations S310 to S330.

[0160] When operating S310, the task is split into multiple subtasks.

[0161] According to embodiments of this application, the task may include at least one of natural language processing tasks and computer vision tasks. For example, natural language processing tasks may include natural language understanding tasks and natural language generation tasks. Natural language processing tasks may include at least one of the following: word segmentation tasks, part-of-speech tagging tasks, syntactic analysis tasks, text classification tasks, information retrieval tasks, information extraction tasks, information recommendation tasks, sentiment analysis tasks, and speech recognition tasks, etc. Natural language generation tasks may include at least one of the following: text generation tasks, machine translation tasks, text summarization tasks, question answering system tasks, and speech synthesis tasks, etc. Computer vision tasks may include at least one of the following: visual classification tasks, visual retrieval tasks, object recognition tasks, visual segmentation tasks, visual question answering tasks, image description tasks, visual object detection tasks, object tracking tasks, cross-modal retrieval tasks, multimodal matching tasks, video summarization tasks, sentiment recognition tasks, and person re-identification tasks, etc. This application does not limit the tasks.

[0162] To break down a task into multiple subtasks, the following method can be used.

[0163] As one implementation method, the task is divided into multiple subtasks according to a predetermined splitting strategy. The predetermined splitting strategy refers to a pre-configured strategy for splitting the task. The predetermined splitting strategy can be configured according to actual business needs and is not limited here. For example, the predetermined splitting strategy can be determined based on task attribute information. Task attribute information can include at least one of the following: task type, task identifier, task priority, and task complexity. Optionally, the task can be split into multiple subtasks based on its task type. Different subtasks can have different task types. For example, task types can include at least one of the following: retrieval, recommendation, classification, extraction, analysis, identification, question answering, generation, segmentation, detection, matching, tracking, and summarization.

[0164] For example, the task could be an information recommendation task. The task type can include retrieval and recommendation. Therefore, based on the task type, the information recommendation task can be divided into a second retrieval subtask and a second recommendation subtask. The second retrieval subtask can be used to implement the information retrieval task. The second recommendation subtask can be used to recommend information based on the retrieved information.

[0165] As another implementation method, the task is broken down into multiple subtasks based on the task requirements information. The task requirements information can be analyzed to obtain multiple subtasks corresponding to the task. The task requirements information can be used to describe the task's requirements. The modality of the task requirements information can be configured according to actual business needs and is not limited here. For example, the modality can include one of the following: sensor modality, media modality, sensor modality, spectral modality, hyperspectral modality, and bioinformatics modality. Sensor modality can include at least one of the following: touch, hearing, vision, and smell. Media modality can include at least one of the following: text, vision, audio, point cloud, code, time series, graph, table, and webpage. Vision can include at least one of the following: images and video. Images can include at least one of the following: two-dimensional images and three-dimensional images. Sensor modality can include at least one of the following: vision sensors, LiDAR, radar, and wheel speedometers. Spectral modality can include at least one of the following: X-rays, ultraviolet, infrared, terahertz, and microwaves. Bioinformatics modality can include proteins. It should be noted that generative models can be used to convert task requirement information from other modalities into task requirement information for the target modality. For example, the target modality can be text.

[0166] For example, the task requirement information could be, "How did the average daily calories of adults worldwide change from 2000 to 2023? What impact did this change have on obesity rates? Can you provide a chart to show the trend of obesity rates?" This task requirement information can be broken down into several sub-tasks corresponding to the task: a third retrieval sub-task, an analysis sub-task, and a generation sub-task. The third retrieval sub-task could refer to the task of retrieving calorie data related to calories of adults worldwide from 2000 to 2023, as well as obesity data related to obesity rates. The analysis sub-task could refer to the task of analyzing the calorie and obesity data. The generation sub-task could be used to generate charts based on the analysis results.

[0167] The following methods can be used to obtain task requirements information.

[0168] In response to a detected task processing request, a third interactive agent is invoked. The third interactive agent interacts with the object to obtain third interactive information. This third interactive information may include task requirement information. The third interactive agent can be used to interact with a third object. The third object may include at least one of the following: a user and a target agent. The target agent may refer to an agent with interactive capabilities.

[0169] To analyze the task requirements information and obtain multiple subtasks corresponding to the task, the following methods can be used.

[0170] In response to the detection of a task splitting request for a task, the task splitting agent is invoked. The task splitting agent processes the task splitting request, resulting in multiple subtasks corresponding to the task. The task splitting request can be used to instruct the task splitting agent to split the task. The task splitting agent can be used to split the task. The task splitting request can include task requirement information.

[0171] For example, the task requirement information could be "a trip plan needs to be created." The task decomposition agent analyzes the task requirement information to obtain multiple sub-tasks: a first interaction sub-task, a planning sub-task, and an execution sub-task. The first interaction sub-task can refer to the task used to interact with a first object based on the task requirement information to obtain the first interaction information. The planning sub-task can refer to the task used to obtain trip planning information based on the first interaction information. The execution sub-task can refer to the task used to obtain detailed trip information based on the trip planning information.

[0172] To address how to utilize a task splitting agent to process task partitioning requests and obtain multiple subtasks corresponding to a task, the following approach can be used.

[0173] As one implementation approach, task splitting requests can be processed based on a prompt strategy to obtain prompt information. The task splitting agent then processes the prompt information to obtain multiple subtasks corresponding to the task. The content and format of the prompt information can be configured according to actual business needs and are not limited here. For example, the prompt information could include "Split the task into multiple subtasks according to the following format: Task: Place the water glass on the kitchen table." Thus, processing the prompt information using the task splitting agent yields multiple subtasks corresponding to the task, including a subtask for finding the water glass, a subtask for picking up the water glass and taking it to the kitchen, and a subtask for placing the water glass on the kitchen table. The prompt strategy can include at least one of the following: a basic prompt strategy and an advanced prompt strategy.

[0174] Basic prompting strategies may include at least one of the following: zero-shot prompting strategy, few-shot prompting strategy, and one-shot prompting strategy.

[0175] Advanced prompting strategies can include Topologies of Reasoning (ToR) strategies, Least-to-Most (LtM) strategies, and Automatic Prompt strategies.

[0176] Reasoning topology strategies may include at least one of the following: Chain-of-Thought (CoT) hint strategy, Chain-of-Thought-Self-Consistency (i.e., Chain-of-Thought-Self-Consistency) hint strategy, Program-of-Thoughts (ToT) hint strategy, Tree of Thoughts (ToT) hint strategy, Graph of Thoughts (GoT) hint strategy, Algorithm-of-Thoughts (AoT) hint strategy, Few-Shot CoT hint strategy, and Zero-Shot CoT hint strategy, etc.

[0177] As another implementation, a task-splitting agent can be used based on a Planning Domain Definition Language (PDDL) to process task splitting requests and obtain multiple subtasks corresponding to the task. For example, the task-splitting agent processes the task splitting request to obtain PDDL description information. A classic planner processes the PDDL description information to obtain task splitting information. The task-splitting agent then processes the task splitting information to obtain multiple subtasks corresponding to the task, expressed in natural language.

[0178] As an alternative implementation, a task splitting model can be used to handle task splitting requests, resulting in multiple subtasks corresponding to a given task. The task splitting model can then provide task splitting functionality.

[0179] In operation S320, agents are selected from the agent pool to match each of the multiple subtasks.

[0180] According to embodiments of this application, an agent pool may include multiple agents. The agents in the agent pool may be pre-configured or constructed based on the construction method described in this application for constructing agents that match subtasks. As one implementation, the agent pool may have a first calling interface. The first calling interface can be used to support the invocation of individual agents in the agent pool, or it can be used to support the invocation of the agent pool itself. For example, the first calling interface can be invoked to obtain the agent pool. The first calling interface may have configuration information. The configuration information can be used to construct the first calling interface. The first calling interface can be adjusted by adjusting the configuration information of the first calling interface corresponding to an agent, thereby adjusting the agent pool. For example, the corresponding agent in the agent pool can be deleted by adjusting the configuration information of the first calling interface corresponding to the agent pool. For example, the configuration information corresponding to the agent to be deleted can be deleted from the configuration information of the first calling interface corresponding to the agent pool, thereby deleting the agent to be deleted from the agent pool. Optionally, the corresponding agent can be added to the agent pool by adjusting the configuration information of the first calling interface corresponding to the agent pool. For example, configuration information corresponding to the agent to be added can be added to the configuration information of the first calling interface corresponding to the agent pool, so as to add the agent to be added to the agent pool.

[0181] A language model pool can include multiple language models. Language models in the pool can be pre-configured or added based on user needs. Language models can be open-source or closed-source. Language models can be large language models, thus the language model pool can include a large language model pool. A large language model pool can include multiple large language models. Large language models can be open-source or closed-source. Furthermore, language models can also be small language models, thus the language model pool can also include a small language model pool. A small language model pool can include at least one small language model. Small language models can be open-source or closed-source.

[0182] As one implementation, the language model pool can have a second calling interface. This second calling interface can be used to support the invocation of various language models within the pool. For example, the language model pool can be obtained by calling the second calling interface. The second calling interface can have configuration information. This configuration information can be used to construct the second calling interface. The second calling interface can be adjusted by modifying its configuration information to modify the language model pool. For example, a corresponding language model can be deleted from the language model pool by modifying its configuration information. Alternatively, the configuration information corresponding to the language model to be deleted can be removed from the configuration information of the second calling interface. Optionally, a corresponding language model can be added to the language model pool by modifying its configuration information. For example, the configuration information corresponding to the language model to be added can be added to the configuration information of the second calling interface.

[0183] As one implementation, the language model can have a fifth calling interface. This fifth calling interface can be used to support the invocation of the language model. For example, the fifth calling interface can be invoked to obtain the language model, which can then be used to construct an agent, or to use the language model configured by the agent to handle subtasks matching the agent. The fifth calling interface can have configuration information. This configuration information can be used to construct the fifth calling interface. The fifth calling interface can be adjusted by modifying its configuration information, thereby adjusting the language model. For example, configuration information related to the language model's output information can be adjusted by modifying the configuration information of the fifth calling interface corresponding to the language model. For example, configuration information related to the language model's output information can include temperature parameters (i.e., temperature parameters). This allows for the diversification of output information.

[0184] A tool pool can include multiple tools. Tools can include at least one of the following: APIs, search engines, code interpreters, mathematical engines, databases, knowledge bases, and external models, etc.

[0185] As one implementation, a tool pool can have a third-party API. This third-party API can be used to support the invocation of various tools within the tool pool. For example, the tool pool can be obtained by invoking the third-party API. The third-party API can have configuration information. This configuration information can be used to construct the third-party API. The third-party API can be adjusted by modifying its configuration information, thereby adjusting the tool pool. For example, a corresponding tool in the tool pool can be deleted by modifying its configuration information. For instance, the configuration information corresponding to the tool to be deleted can be removed from the configuration information of the third-party API, thus deleting the tool from the tool pool. Optionally, tools can be added to the tool pool by modifying its configuration information. For instance, the configuration information corresponding to the tool to be added can be added to the configuration information of the third-party API, thus adding the tool to the tool pool.

[0186] As one implementation, a tool can have a sixth interface. This sixth interface can be used to support the invocation of the tool. For example, the sixth interface can be invoked to obtain the tool, which can then be used to construct an agent, or to utilize the tool configured by the agent to handle subtasks matching the agent. The sixth interface can have configuration information. This configuration information can be used to construct the sixth interface. The sixth interface can be adjusted by modifying its configuration information to modify the tool's output information. For example, the tool's output information can be adjusted by modifying the input parameters included in the configuration information of the sixth interface.

[0187] The configuration of an agent can include a language model and components. Components can include at least one tool and at least one other agent; that is, the agent's configuration can include a language model and at least one tool. Optionally, the agent's configuration can include a language model and at least one other agent. Optionally, the agent's configuration can include a language model, at least one tool, and at least one other agent. The tool configured by the agent can be a tool from a tool pool or an external tool. The other agents configured by the agent can be agents from an agent pool or external agents. The language model configured by the agent can be a language model from a language model pool or an external language model. The components configured by the agent can be used to assist the language model configured by the agent in handling sub-tasks corresponding to the agent; that is, the tools configured by the agent can be used to assist the language model configured by the agent in handling sub-tasks corresponding to the agent. The other agents configured by the agent can be used to assist the language model configured by the agent in handling sub-tasks corresponding to the agent. It should be noted that the agent matching the sub-task can handle the sub-task through at least one of the tools configured by the agent and other agents. Furthermore, the agent's configuration can also include at least one of agent roles and agent instructions. Agent roles can be used to characterize the functions of an agent.

[0188] The tools configured by the intelligent agent can refer to simple tools at the tool level. Simple tools can refer to tools capable of handling simple tasks. Simple tasks can include tool invocation tasks. Other intelligent agents configured by the intelligent agent can refer to composite tools. Composite tools can refer to tools capable of handling higher-order tasks. Higher-order tasks can be understood as complex or abstract tasks. For example, higher-order tasks can include at least one of natural language processing tasks and computer vision tasks. Explanations of natural language processing and computer vision tasks can be found in the corresponding sections above and will not be repeated here. It should be noted that the tool can be a first tool. The first tool can have the function of handling computer vision tasks, that is, it can be used to handle computer vision tasks. For example, the first tool can include at least one of visual models and multimodal models. Furthermore, the first tool can have the function of handling scientific computing tasks. For example, the first tool can include scientific computing models.

[0189] As one implementation, an agent can have a fourth invocation interface. This fourth invocation interface supports the agent being invoked. For example, the fourth invocation interface can be invoked to obtain an agent, which can then be used to handle subtasks matching the agent, or other agents configured as the agent to assist in handling subtasks matching the agent. The fourth invocation interface can have configuration information. This configuration information can be used to construct the fourth invocation interface. The fourth invocation interface can be adjusted by modifying its configuration information to modify the agent, thus enabling the modification of the agent.

[0190] Furthermore, agents in the agent pool can be adjusted. For example, agents to be adjusted can be identified from the agent pool, and their configurations can be modified. The configuration may include at least one of the following: language model, tools, other agents, agent roles, and agent instructions. For example, at least one of the language model, tools, and other agents in the agent's configuration can be replaced. Optionally, at least one of the agent roles and agent instructions in the agent's configuration can be modified.

[0191] The following methods can be used to adjust the configuration of the agent.

[0192] The configuration of an agent can be adjusted by modifying the configuration information of the fourth interface. For example, adjusting the configuration information of the fourth interface can replace at least one of the language model, tools, and other agents in the agent configuration to be adjusted. Adjusting the configuration information of the fourth interface can also modify at least one of the agent role and agent instructions in the agent configuration to be adjusted.

[0193] The following method can be used to select subtasks from the pool of agents that match each of the multiple subtasks.

[0194] As one implementation, task information corresponding to each of the multiple subtasks can be obtained. Configuration information corresponding to each of the multiple intelligent agents can also be obtained. The task information may include at least one of first task information and second task information. The first task information may indicate the functions that the intelligent agent to be built should possess. The second task information may indicate the model to be configured and the components to be configured. The intelligent agent to be built may be an intelligent agent required by a subtask. The model to be configured may be a language model that the intelligent agent to be built needs to configure. The components to be configured may be components that the intelligent agent to be built needs to configure. The configuration information may include at least one of first configuration information and second configuration information. The first configuration information may indicate the functions possessed by the intelligent agent. The second configuration information may indicate the components configured by the intelligent agent. Components may include at least one of tools and other intelligent agents.

[0195] Based on this, the agent that matches each of the multiple sub-tasks can be determined from the agent pool based on the task information corresponding to each of the multiple sub-tasks and the configuration information corresponding to each of the multiple agents.

[0196] As one implementation approach, for a subtask among multiple subtasks, where the task information may include first task information and the configuration information may include first configuration information, a target first configuration information matching the first task information corresponding to that subtask can be determined from the first configuration information corresponding to each of the multiple intelligent agents. The intelligent agent corresponding to the target first configuration information is then identified as the intelligent agent matching that subtask.

[0197] For example, for an agent among multiple agents, a first similarity can be determined between the first task information corresponding to the subtask and the first configuration information corresponding to the agent. Thus, a first similarity can be obtained for each of the multiple agents. Then, based on the first similarities for each of the multiple agents, target first configuration information matching the first task information corresponding to the subtask can be determined from the first configuration information corresponding to each of the multiple agents. For example, the maximum first similarity among the multiple first similarities can be determined. The first configuration information corresponding to the maximum first similarity is determined as the target first configuration information matching the first task information corresponding to the subtask.

[0198] As another implementation, for task information in multiple subtasks, where the task information may include second task information and the configuration information may include second configuration information, a target second configuration information that matches the second task information corresponding to the subtask can be determined from the second configuration information corresponding to each of the multiple intelligent agents.

[0199] For example, for an agent among multiple agents, a second similarity can be determined between the second task information corresponding to the subtask and the second configuration information corresponding to the agent. This yields the second similarity for each of the multiple agents. Then, based on the second similarity for each of the multiple agents, target second configuration information matching the second task information corresponding to the subtask is determined from the second configuration information corresponding to each of the multiple agents. For example, the maximum second similarity among the multiple second similarities can be determined. The second configuration information corresponding to this maximum second similarity is then determined as the target second configuration information matching the second task information corresponding to the subtask.

[0200] As another implementation, for task information in multiple subtasks, where the task information may include first task information and second task information, and the configuration information may include first configuration information and second configuration information, the target configuration information that matches the task information corresponding to the subtask can be determined from the configuration information corresponding to each of the multiple intelligent agents.

[0201] For example, for an agent among multiple agents, a first similarity can be determined between first task information corresponding to the subtask and first configuration information corresponding to the agent. A second similarity can be determined between second task information corresponding to the subtask and second configuration information corresponding to the agent. Thus, first and second similarities can be obtained for each of the multiple agents. Then, based on the first and second similarities for each of the multiple agents, target configuration information matching the task information corresponding to the subtask can be determined from the configuration information corresponding to each of the multiple agents. For example, a comprehensive similarity can be obtained for each of the multiple agents based on the first and second similarities. Based on the comprehensive similarity for each of the multiple agents, target configuration information matching the task information corresponding to the subtask can be determined from the configuration information corresponding to each of the multiple agents. For example, the maximum comprehensive similarity among multiple comprehensive similarities can be determined. The configuration information corresponding to this comprehensive similarity is determined as the target configuration information matching the task information corresponding to the subtask.

[0202] It should be noted that the configuration information of the intelligent agent can be generated in the following way.

[0203] As one implementation method, the configuration information of an intelligent agent can be generated based on the object definition.

[0204] As another implementation method, the configuration information of the agent can be generated using a configuration information generation model.

[0205] As another implementation method, the configuration information of the intelligent agent can be generated based on existing configuration information.

[0206] Furthermore, a target subtask may exist among multiple subtasks. A target subtask can be a subtask for which no agent has been matched from the intelligence pool. For example, if it is determined that no target configuration information matching the task information corresponding to a subtask exists in the configuration information corresponding to multiple agents, the subtask is identified as a target subtask. Therefore, for a target subtask, an agent matching the target subtask can be obtained in the following way.

[0207] Based on the language models in the language model pool and the components in the component pool, construct an agent that matches the target subtask. The component pool may include at least one of the tool pool and the agent pool.

[0208] As one implementation approach, the component pool may include a tool pool. Therefore, based on the language model in the language model pool and the tools in the tool pool, an agent matching the target sub-task is constructed. For example, based on the task information of the target sub-task, a target language model is determined from the language model pool, and a target tool is determined from the tool pool. Based on the target language model and the target tool, an agent matching the target sub-task is constructed. Optionally, the target language model may be obtained by calling a fifth invocation interface possessed by the target language model. The target tool may be obtained by calling a fifth invocation interface possessed by the target tool.

[0209] As another implementation, the component pool may include an agent pool. Therefore, based on the language model in the language model pool and the agents in the agent pool, an agent matching the target subtask is constructed. For example, based on the task information of the target subtask, a target language model is determined from the language model pool, and a target agent is determined from the agent pool. Based on the target language model and the target agent, an agent matching the target subtask is constructed. Optionally, the target language model may be obtained by calling a fifth calling interface of the target language model. The target agent may be obtained by calling a fourth calling interface of the target agent.

[0210] As another implementation, the component pool can include a tool pool and an agent pool. Therefore, based on the language model in the language model pool, the tools in the tool pool, and the agents in the agent pool, an agent matching the target sub-task is constructed. For example, based on the task information of the target sub-task, a target language model is determined from the language model pool, a target tool is determined from the tool pool, and a target agent is determined from the agent pool. Based on the target language model, target tool, and target agent, an agent matching the target sub-task is constructed. Optionally, the target language model can be obtained by calling a fifth calling interface of the target language model. The target tool can be obtained by calling a sixth calling interface of the target tool. The target agent can be obtained by calling a fourth calling interface of the target agent.

[0211] One implementation approach is to add agents matching the target subtask to an agent pool once an agent matching the target subtask is found. This allows for the subsequent determination of agents matching the target subtask from the pool of available agents. For example, a first API call corresponding to the agent pool can be invoked. This first API call is then used to add agents matching the target subtask to the agent pool.

[0212] In addition, one of the following situations may also occur: the target language model does not exist in the language model pool; or the target component does not exist in the component pool.

[0213] If the target language model is not present in the language model pool, it can be handled in the following way.

[0214] One implementation approach is to add target language models to the language model pool so that they can be subsequently determined from the pool. For example, a second API call corresponding to the language model pool can be used to add the target language model to the pool.

[0215] The target language model can be obtained in the following ways.

[0216] One approach is to build the target language model based on a language model pool. Another approach is to obtain the target language model from an external language model pool.

[0217] If the target component does not exist in the component pool, it can be handled in the following way.

[0218] As one implementation approach, where the component pool may include a tool pool or a component pool and an agent pool, and the target component may include a target tool, the target tool can be added to the tool pool so that it can be subsequently determined from the tool pool. For example, a third-party API corresponding to the tool pool can be invoked to add the target tool to the tool pool.

[0219] The following methods can be used to obtain the target tools.

[0220] One approach is to build the target tool based on a tool pool. Another approach is to obtain the target tool from an external tool pool.

[0221] As another implementation, if the component pool can include an agent pool or a combination of an agent pool and a tool pool, and the target component can include a target agent, then a target agent can be added to the agent pool so that it can be subsequently determined from the agent pool. For example, a first API call corresponding to the agent pool can be invoked. The first API call is then used to add the target agent to the agent pool.

[0222] The following methods can be used to obtain the target intelligent agent.

[0223] One approach is to construct the target intelligent agent based on an intelligent agent pool. Another approach is to obtain the target intelligent agent from an external intelligent agent pool.

[0224] As an alternative implementation, where the component pool can include a tool pool and an agent pool, and the target component can include a target tool and a target agent, a target tool can be added to the tool pool, and a target agent can be added to the agent pool. For example, a first API call corresponding to the agent pool can be invoked. The target agent is then added to the agent pool using the first API call. A third API call corresponding to the tool pool can then be invoked. The target tool is then added to the tool pool using the third API call.

[0225] As for how to obtain the target tools and target intelligent agents, it can be achieved in the manner described above, and will not be repeated here.

[0226] When operating the S330, a multi-agent system is constructed based on agents that are matched with each of the multiple sub-tasks.

[0227] As one implementation method, dependency information between multiple subtasks can be determined. Dependency information can include at least one of dependency relationships and non-dependency relationships. For a subtask among multiple subtasks, if the subtask depends on the execution result of other subtasks or needs to be executed only after the other subtasks have completed, then the subtask has a dependency relationship with those other subtasks. This subtask can be called a dependent subtask. The other subtask can be called a subtask that is depended upon. If the subtask does not depend on the execution result of other subtasks or does not need to be executed only after the other subtasks have completed, then the subtask has a non-dependency relationship with those other subtasks. Therefore, based on the determination of the dependency information of multiple subtasks, the execution parameters corresponding to each of the multiple subtasks can be determined. Execution parameters can indicate the execution order of the subtasks. Since dependent subtasks need to be executed only after the subtasks they are depended upon have completed, the execution order of dependent subtasks is after the execution order of subtasks they are depended upon. Two subtasks with non-dependency relationships can be executed in parallel.

[0228] Based on this, a multi-agent system can be obtained by using the execution parameters corresponding to each of the multiple sub-tasks and the intelligent agents that match each of the multiple sub-tasks. This allows the multi-agent system to call the intelligent agents that match each of the multiple sub-tasks according to the execution order indicated by the execution parameters, and to use the intelligent agents that match each of the multiple sub-tasks to process the sub-tasks. In other words, when a multi-agent system needs to execute a sub-task corresponding to the execution parameters, it can call the intelligent agent that matches the sub-task and use the intelligent agent that matches the sub-task to process the sub-task.

[0229] It should be noted that the communication methods between multiple agents in a multi-agent system can also be configured. These communication methods can include at least one of the following: hierarchical communication, decentralized communication, centralized communication, and a shared message pool. In hierarchical communication, agents at each level have different roles and can interact within their own level or with adjacent levels. Decentralized communication operates on a peer-to-peer network, where agents communicate directly with each other. Centralized communication involves a central agent or a group of central agents coordinating the communication of the system, with other agents interacting through the central agent. A shared message pool maintains a shared message pool where agents can publish messages. Agents can obtain messages from the shared message pool based on a publish-subscribe model or retrieve messages from the shared message pool at predetermined intervals. The shared message pool communication method can improve communication efficiency. This application does not limit the communication methods between multiple agents in a multi-agent system.

[0230] Furthermore, multi-agent systems can have an execution interface. The execution interface can be used to support the multi-agent system in invoking agents matching each of the multiple sub-tasks based on the execution order indicated by the execution parameters corresponding to each sub-task, and utilizing these agents to process the sub-tasks. In other words, when the multi-agent system needs to execute a sub-task corresponding to the execution parameters, it invokes the agent matching the sub-task and utilizes it to process the sub-task. In short, the execution interface corresponding to the multi-agent system can be invoked. This execution interface enables the invocation of agents matching each of the multiple sub-tasks based on the execution order indicated by the execution parameters, and the utilization of these agents to process the sub-tasks.

[0231] As one implementation method, the execution interface can be an SOP (Standard Operating Procedure) interface. An SOP can refer to the execution logic of a task defined manually.

[0232] Figure 4 schematically illustrates a multi-agent system according to an embodiment of this application.

[0233] As shown in Figure 4, a task can include subtasks A, B, C, and D. Subtasks B and C can be executed in parallel. Subtask B depends on the execution result of subtask A. Subtask D depends on the execution result of subtask B. Therefore, the execution parameter corresponding to subtask A can be 1. The execution parameters corresponding to subtasks B and C can be 2. The execution parameter corresponding to subtask D can be 3.

[0234] The agent matched with subtask A is agent A. Agent A is used to process subtask A. The agent matched with subtask B is agent B. Agent B is used to process subtask B. The agent matched with subtask C is agent C. Agent C is used to process subtask C. The agent matched with subtask D is agent D. Agent D is used to process subtask D.

[0235] Therefore, a multi-agent system can be obtained based on the execution parameter 1 corresponding to subtask A, the execution parameter 2 corresponding to subtask B, the execution parameter 2 corresponding to subtask C, and the execution parameter 3 corresponding to subtask D, as well as the agent A matching subtask A, the agent B matching subtask B, the agent C matching subtask C, and the agent D matching subtask D.

[0236] The technical solution of this application is described in general below.

[0237] By breaking down tasks into multiple subtasks, the complexity of task processing is reduced. Furthermore, since the multi-agent system utilizes agents matched to specific subtasks to handle them, its flexibility in handling complex tasks is enhanced, enabling it to adapt to various complex tasks and thus reducing the difficulty of processing complex tasks. Additionally, since agents matched to subtasks can be determined from an agent pool, which can include multiple pre-configured agents, it is easy to obtain agents suitable for subtasks. An agent can be viewed as a composite tool aggregating multiple simple tools. An agent matched to a subtask can be configured with at least one of other agents and tools. This allows the agent matched to a subtask to process the subtask by calling the configured tools and at least one of other agents, eliminating the need to define the calling and execution of tools involved in each operation during task execution flow writing. This simplifies task execution flow writing and reduces development difficulty. Moreover, by calling other agents configured to process tasks, task processing efficiency and accuracy are improved. Furthermore, this integration and invocation method effectively utilizes the capabilities of the language model configured by the agents, enabling multi-agent systems to handle more complex tasks and requirements.

[0238] Furthermore, since the agents that match the target subtasks are constructed based on language models in the language model pool and components in the component pool, it is possible to combine different language models and components to meet task requirements, thereby achieving customization and personalization.

[0239] Because the agent pool has a first calling interface, the language model pool has a second calling interface, the tool pool has a third calling interface, the agents have a fourth calling interface, the language models have a fifth calling interface, and the tools have a sixth calling interface, developers can more quickly develop and deploy multi-agent systems based on a series of user-friendly calling interfaces. This simplifies the development and deployment of multi-agent systems for different tasks and reduces the time cost of development and integration.

[0240] Since the intelligent agent pool can be adjusted by modifying the configuration information of the first calling interface corresponding to the intelligent agent pool, the language model pool can be adjusted by modifying the configuration information of the second calling interface corresponding to the language model pool, the tool pool can be adjusted by modifying the configuration information of the third calling interface corresponding to the tool pool, the intelligent agent can be adjusted by modifying the configuration information of the fourth calling interface corresponding to the intelligent agent, the language model can be adjusted by modifying the configuration information of the fifth calling interface corresponding to the language model, and the output information of the tool can be adjusted by modifying the configuration information of the sixth calling interface corresponding to the tool, the intelligent agent pool, language model pool, tool pool, intelligent agent, language model and tool can be flexibly adjusted and expanded. This improves the flexibility and scalability of the multi-agent system, enabling the multi-agent system to adapt to different application scenarios and business needs.

[0241] The foregoing describes the multi-agent construction method of this application's embodiments. The following, with reference to the accompanying drawings, will explain how to use the multi-agent system obtained based on the multi-agent construction method described in this application's embodiments to process a task.

[0242] Figure 5 schematically illustrates a flowchart of a task processing method according to an embodiment of this application.

[0243] As shown in Figure 5, the method 500 includes operations S510 to S520.

[0244] When operating the S510, retrieve the tasks to be processed.

[0245] When operating the S520, a multi-agent system is used to process the tasks to be processed and obtain the task processing results.

[0246] As one implementation approach, a multi-agent system can, based on the execution order indicated by the execution parameters corresponding to multiple sub-tasks, invoke agents matched to each sub-task to process them and obtain the task processing result. Specifically, it invokes agents matched to each sub-task according to the execution order indicated by the execution parameters, and utilizes these agents to process the sub-tasks, thus obtaining the task processing result. For example, when a multi-agent system needs to execute a sub-task corresponding to its execution parameters, it invokes the agent matched to that sub-task and utilizes it to process it, obtaining the corresponding task processing result. The final task processing result is then obtained based on the task processing results corresponding to each of the multiple sub-tasks.

[0247] As one implementation approach, a multi-agent system can have an execution interface. This execution interface allows the multi-agent system to invoke agents corresponding to each of the multiple sub-tasks, based on the execution order indicated by the execution parameters corresponding to each sub-task, to process the sub-tasks and obtain the task processing results. Thus, a multi-agent system can invoke its corresponding execution interface to invoke agents corresponding to each sub-task, based on the execution order indicated by the execution parameters, and then use these agents to process the sub-tasks and obtain the task processing results.

[0248] As one implementation method, multiple subtasks to be processed can be obtained by splitting the tasks to be processed into subtasks by a multi-agent system.

[0249] The task to be processed may include at least one of natural language processing tasks and computer vision tasks.

[0250] The following example, using either a trip planning task or an information recommendation task as examples, further illustrates how to utilize a multi-agent system to handle pending tasks.

[0251] First, taking the task to be processed as a trip planning task as an example, we will further explain how to use a multi-agent system to process the task to be processed.

[0252] Figure 6A schematically illustrates the principle of the trip planning task processing method according to an embodiment of this application.

[0253] As shown in Figure 6A, the multiple subtasks to be processed may include a first interaction subtask, a planning subtask, and an execution subtask. The planning subtask depends on the execution result of the first interaction subtask. The execution subtask depends on the execution result of the planning subtask. The first interaction subtask also depends on the execution result of the execution subtask.

[0254] A multi-agent system corresponding to a trip planning task may include a first interactive agent, a planning agent, and an execution agent. The first interactive agent can be used to execute a first interactive sub-task. The planning agent can be used to execute a planning sub-task. The execution agent can be used to execute an execution sub-task.

[0255] The following methods can be used to utilize multi-agent systems to process travel planning tasks and obtain task processing results.

[0256] Figure 6B schematically illustrates a flowchart of a trip planning task processing method according to an embodiment of this application.

[0257] As shown in Figure 6B, the method 600B includes operations S601 to S612.

[0258] When operating S601, the first interactive agent executes the first interactive subtask and obtains the first interactive information.

[0259] According to embodiments of this application, a first interactive intelligent agent can interact with a first object based on the task requirement information of the first object to obtain first interaction information. The first object may include at least one of a user and other intelligent agents. The task requirement information can be used to describe the task requirements of a task.

[0260] For example, task requirement information could include "I want to go to Park A and Museum B." During the interaction, the first interactive agent can determine the travel location and travel time by asking follow-up questions based on the intent of the first object. This yields the first interaction information. The first interaction information can include dialogue information between the first object and the first interactive agent. This dialogue information can be obtained based on multiple rounds of dialogue between the first interactive agent and the first object. The first interaction information can include prompts instructing the planning agent on how to process the first interaction information. The travel location can include points of interest (POIs). For example, POIs can include tourist attractions. Optionally, the travel location can also include a travel region. For example, a travel region can include a city.

[0261] For example, the dialogue information could include: "First Object: I want to visit Park A and Museum B. First Agent: Which area do you plan to visit? First Object: Park A in City C, Museum B in City D. First Agent: Okay, how long do you plan to spend in City C and City D? First Object: One day each. First Agent: I understand. Do you have any special requirements for the itinerary? First Object: I'll go to City C on the first day and City D on the second day."

[0262] Furthermore, if the task requirements information meets the predetermined conditions, there is no need to use follow-up questions to complete the information. The first interactive information can be obtained based on the task requirements information.

[0263] For example, task requirement information could include "Please plan a two-day trip. Day 1 in city C, attractions include park A in city C; Day 2 in city D, attractions include museum B in city D." First interaction information could include "First object: Please plan a two-day trip. Day 1 in city C, attractions include park A in city C; Day 2 in city D, attractions include museum B in city D; First interacting agent: Okay."

[0264] Because the initial interaction information may be incomplete, such as having unclear referents, its accuracy is low, which in turn affects the accuracy of the task processing results for the itinerary planning task. Therefore, the multi-agent system also supports the modification of the initial interaction information.

[0265] As one implementation, the first interactive agent can invoke a modification tool configured within the first interactive agent to modify the first interactive information, obtaining the modified first interactive information. This allows the planning agent to execute planning sub-tasks based on the modified first interactive information to obtain itinerary planning information. The modification tool can include at least one of the following: an agent related to the modification operation and a tool related to the modification operation. The agent related to the modification operation can refer to an agent with modification capabilities. The tool related to the modification operation can refer to a tool with modification capabilities. The modification tool can include a referential resolution tool. The referential resolution tool can include at least one of the following: an agent related to referential resolution and a tool related to referential resolution. Referential resolution can refer to the process of dividing different references representing the same entity into an equivalence set. An equivalence set can refer to a referential chain.

[0266] By modifying the first interaction information, the accuracy of the first interaction information is improved, thereby improving the accuracy of the task processing results of the itinerary planning task.

[0267] It should be noted that, in addition to interactive functions, the first interactive agent can also possess a first recommendation function. As one implementation, the first interactive agent can be configured with a first recommendation tool. The first recommendation tool can include at least one of an agent related to the first recommendation function and a tool related to the first recommendation function. Thus, the first interactive agent recommends information by invoking the first recommendation tool configured by the first interactive agent. An agent related to the first recommendation function can refer to an agent possessing the first recommendation function. A tool related to the first recommendation function can refer to a tool possessing the first recommendation tool. Optionally, the language model configured by the first interactive agent can possess the first recommendation function, thereby enabling the first interactive agent to perform information recommendation.

[0268] Therefore, the first interactive intelligent agent can also be used to recommend information based on its own recommendation function if it is determined that the first object needs information recommendation during the interaction process.

[0269] As one implementation, during the execution of the first interactive subtask, the first interactive agent can respond to a received recommendation request from the first object, and recommend points of interest (POIs) based on the recommendation request to obtain target POIs. The recommendation request can be used to request the first interactive agent to recommend POIs. For example, the first interactive agent can respond to a received recommendation request from the first object, parse the recommendation request, and obtain recommendation request information. Based on the recommendation request information, the first interactive agent can interact with the first object to obtain fourth interaction information, and determine the target POI based on the fourth interaction information. The fourth interaction information may include candidate POIs.

[0270] As one implementation, the first interactive agent can respond to a recommendation request received from a first object, parse the recommendation request to obtain recommendation request information, and call a first recommendation tool configured in the first interactive agent to process the recommendation request information and obtain the target travel interest points. For example, the first interactive agent can call an agent configured in the first interactive agent that is related to the first recommendation function to process the recommendation request information and obtain the target travel interest points. Optionally, the first interactive agent can call a tool configured in the first interactive agent that is related to the first recommendation function to process the recommendation request information and obtain the target travel interest points.

[0271] For example, the recommendation request information could include "Can you recommend some attractions in city D for me?" The fourth interaction information could include "First agent: Sure. In city D, I recommend you visit attractions E and F. What do you think of these suggestions? First object: Okay." The target itinerary points of interest could include attractions E and F in city D.

[0272] Since the first interactive intelligent agent has a first recommendation function to recommend information to the first object, it can meet the information recommendation needs of the first object.

[0273] In operation S602, the first interactive agent sends the first interactive information to the executing agent.

[0274] After obtaining the first interaction information, the first interactive agent can send the first interaction information to the executing agent. Optionally, the first interactive agent can also store the first interaction information in an interaction file so that the planning agent can retrieve the first interaction information from the interaction file.

[0275] When operating S603, the planning agent responds to receiving the first interaction information, executes the planning sub-task based on the first interaction information, and obtains the trip planning information.

[0276] According to embodiments of this application, the itinerary planning information may include at least one of the following: itinerary time, at least one itinerary location, and the itinerary sequence corresponding to each of the at least one itinerary location. The itinerary location may include points of interest (POIs). Optionally, the itinerary location may include POIs and itinerary areas. The itinerary sequence may indicate the order in which the itinerary locations are visited in the itinerary planning information.

[0277] As one implementation method, the planning agent can obtain travel demand information based on the initial interaction information. For example, the planning agent can analyze the initial interaction information to obtain travel demand information. The planning agent can then obtain travel planning information based on the travel demand information. For example, the planning agent can extract key information from the travel demand information to obtain travel planning information.

[0278] For example, the planning agent can obtain travel demand information based on the first interaction information described above. The travel demand information may include "planning a two-day trip: Day 1 in city C, including attraction A in city C; Day 2 in city D, including attraction B in city D." The travel planning information may include travel time, at least one travel location, and the corresponding travel sequence for each of the at least one travel location. Travel locations may include points of interest and travel areas. Therefore, the travel time may include "a two-day trip from city C to city D." The two travel areas may include "city: city C" and "city: city D." The two points of interest may include "point of interest: park A in city C" and "point of interest: museum B in city D." The travel sequence corresponding to "city: city C" can be "1". The travel sequence corresponding to "city: city D" can be "2". The travel sequence corresponding to "point of interest: park A in city C" can be "1". The travel sequence corresponding to "point of interest: museum B in city D" can be "2".

[0279] In addition, there may be situations where the first agent needs to adjust the itinerary planning information. Therefore, the multi-agent system also supports adjusting the itinerary planning information.

[0280] As one implementation, the first interactive agent can respond to a trip modification request received from a first object. Based on the trip modification request, the first interactive agent interacts with the first object to obtain trip modification information. The planning agent can then modify the trip planning information based on the trip modification information.

[0281] For example, itinerary modification information could include "Change to visit city D on day one. Based on your modification request, update the itinerary planning request to 'Please formulate: Formulate a two-day travel plan, day one in city D, including city D museum B; day two in city C, including city C park A.'" The planning agent can modify the itinerary planning information based on the itinerary modification information to obtain the modified itinerary planning information. The planning agent can also modify the content related to the itinerary sequence in the itinerary planning information based on the itinerary modification information to obtain the modified itinerary planning information. The modified itinerary planning information could include "Formulate a two-day travel plan, day one in city D, including city D museum B; day two in city C, including city C park A." The itinerary sequence corresponding to "City: City D" can be "1". The itinerary sequence corresponding to "Itinerary point of interest: city C park A" can be "2". The itinerary sequence corresponding to "Itinerary point of interest: city D museum B" can be "1". The itinerary sequence corresponding to "Itinerary point of interest: city C park A" can be "2". Other information in the modified itinerary planning information is the same as the corresponding parts of the itinerary planning information described above, and will not be repeated here.

[0282] Since the multi-agent system allows the first agent to modify the trip planning information, it can meet the trip modification needs of the first agent.

[0283] When operating S604, the planning agent stores the trip planning information in the trip planning file.

[0284] Optionally, the planning agent can send trip planning information to the executing agent. Alternatively, the planning agent can send trip planning information to the first interacting agent.

[0285] When operating S605, the agent retrieves trip planning information from the trip planning file.

[0286] In operation S606, the executing agent performs an execution subtask based on the trip planning information to obtain at least one of the route planning information and trip interest information corresponding to at least one trip interest point.

[0287] According to embodiments of this application, the itinerary point of interest information can describe key information about the itinerary point of interest. For example, the itinerary point of interest information may include at least one of the following: latitude and longitude information, point of interest description information, address, ticket price, and suggested visit duration, etc.

[0288] As one implementation, the executing agent can obtain route planning information based on at least one travel location included in the travel planning information, and can also obtain travel point of interest information corresponding to each of the at least one travel point of interest based on at least one travel point of interest included in the travel planning information. Optionally, the executing agent can obtain route planning information based on at least one travel location included in the travel planning information. Optionally, the executing agent can obtain travel point of interest information corresponding to each of the at least one travel point of interest based on at least one travel point of interest included in the travel planning information.

[0289] As another implementation, the executing agent can obtain route planning information based on at least one point of interest (POI) included in the trip planning information, corresponding to each of the at least one POI. The executing agent can also obtain route planning information based on the latitude and longitude information included in each of the at least one POI.

[0290] As another implementation, the executing agent can invoke a travel service tool configured to iterate through at least one point of interest (POI) to obtain POI information corresponding to each of the at least one POI. The executing agent can also invoke a map service tool configured to iterate through at least one POI to obtain route planning information. Optionally, the executing agent can invoke a travel service tool configured to iterate through at least one POI to obtain POI information corresponding to each of the at least one POI. Optionally, the executing agent can invoke a map service tool configured to iterate through at least one POI to obtain route planning information.

[0291] Travel service tools may include at least one of the following: intelligent agents related to travel service functions and tools related to travel services. Intelligent agents related to travel service functions may refer to intelligent agents possessing travel service functions. Tools related to travel functions may refer to tools possessing travel service functions.

[0292] Map service tools may include at least one of the following: intelligent agents related to map service functions and tools related to map service functions. Intelligent agents related to map services may refer to intelligent agents possessing map service functions. Tools related to map services may refer to tools possessing map service functions.

[0293] During operation S607, the executing agent stores the trip point of interest information corresponding to at least one trip point of interest in the trip location file.

[0294] Optionally, the executing agent may send trip interest information corresponding to at least one trip interest point to the first interactive agent.

[0295] When operating S608, the executing agent stores route planning information in a trip planning file.

[0296] Optionally, the executing agent can send route planning information to the first interacting agent.

[0297] Optionally, the executing agent stores route planning information in a trip planning file to obtain complete trip information based on the trip planning information and route planning information.

[0298] In operation S609, the first interactive agent obtains travel point of interest information corresponding to at least one travel point of interest from the travel location file.

[0299] When operating S610, the first interactive agent obtains route planning information and trip planning information from the trip planning file.

[0300] In operation S611, the first interactive agent obtains detailed trip information as the result of task processing based on route planning information and at least one of the trip interest information corresponding to at least one trip interest point, as well as the trip planning information.

[0301] When operating S612, the first interactive agent feeds back detailed travel information to the first object.

[0302] It should be noted that the data format of the first interaction information, itinerary planning information, route planning information, and detailed itinerary information can be configured according to actual business needs, and is not limited here. For example, the data format may include JSON (JavaScript Object Notation).

[0303] By employing a multi-agent collaborative approach to construct travel planning solutions, various needs of the users can be met. For example, the recommendation and travel modification needs mentioned above.

[0304] Next, taking information recommendation as an example, we will further explain how to use a multi-agent system to process tasks.

[0305] Figure 7A schematically illustrates the principle of the information recommendation task processing method according to an embodiment of this application.

[0306] As shown in Figure 7A, the multiple subtasks to be processed may include a second interaction subtask, a retrieval subtask, and a recommendation subtask. The retrieval subtask depends on the execution result of the second interaction subtask. The recommendation subtask depends on the execution result of the retrieval subtask. The second interaction subtask also depends on the execution result of the recommendation subtask.

[0307] A multi-agent system matching the information recommendation task may include a second interactive agent, a retrieval agent, and a recommendation agent. The second interactive agent can be used to perform a second interactive sub-task. The retrieval agent can be used to perform a retrieval sub-task. The recommendation agent can be used to perform a recommendation sub-task.

[0308] The following methods can be used to utilize multi-agent systems to process tasks and obtain results.

[0309] Figure 7B schematically illustrates a flowchart of an information recommendation task processing method according to an embodiment of this application.

[0310] As shown in Figure 7B, the method 700B includes operations S710 to S730.

[0311] When operating the S710, the second interactive agent can execute a second interactive subtask and obtain second interactive information.

[0312] According to embodiments of this application, a second interactive intelligent agent can interact with a second object based on the task requirement information of the second object to obtain second interactive information. The second object may include at least one of a user and other intelligent agents. The second interactive information may include dialogue information between the second object and the second interactive intelligent agent.

[0313] For example, the task requirement information could include "I am interested in jazz and would like to request recommendations for jazz." The dialogue information could include "Second object: I am interested in jazz and would like to request recommendations for jazz. Second agent: Okay, do you have any favorite musicians? Second object: Yes, I like musicians F and G. Second agent: Okay."

[0314] As one implementation, the second interactive agent can send second interactive information to the retrieval agent. Optionally, the second interactive agent can store the second interactive information in an interactive file so that the retrieval agent can retrieve the second interactive information from the interactive file.

[0315] When operating the S720, the retrieval agent can perform retrieval subtasks based on the second interaction information to obtain retrieval information.

[0316] As one implementation method, the retrieval agent can call the keyword agent configured by the retrieval agent to obtain the keywords corresponding to the second interaction information, and call the retrieval tool configured by the retrieval agent to obtain the retrieval information corresponding to the keywords.

[0317] For example, the search information could include "musician F, musician G, jazz, musician F performing live, musician G performing live".

[0318] As one implementation, the retrieval agent can send retrieval information to the recommendation agent. Optionally, the retrieval agent can store the retrieval information in a retrieval file so that the recommendation agent can retrieve the retrieval information from the retrieval file.

[0319] When operating the S730, the recommendation agent can perform recommendation sub-tasks based on the retrieved information to obtain recommendation information.

[0320] As one implementation, the recommendation agent can invoke a second recommendation tool configured within the agent to obtain recommendation information corresponding to the retrieved information, which is the result of the task processing. The second recommendation tool can include at least one of the following: an agent related to the second recommendation function and a tool related to the second recommendation function. An agent related to the second recommendation function can refer to an agent possessing the second recommendation function. A tool related to the second recommendation function can refer to a tool possessing the second recommendation function.

[0321] For example, the recommended information could include "live videos, images, and audio of jazz performances related to musician F, and live videos, images, and audio of jazz performances related to musician G".

[0322] As one implementation, the recommending agent can send recommendation information to the second interacting agent. Optionally, the recommending agent can store the recommendation information in a recommendation file so that the second interacting agent can retrieve the recommendation information from the recommendation file.

[0323] As one implementation method, the second interactive agent can send recommendation information to the second object.

[0324] Figure 8 schematically illustrates an exemplary system architecture for applying multi-agent construction methods, task processing methods, and apparatus according to embodiments of this application.

[0325] It should be noted that Figure 8 is only an example of a system architecture that can be applied to the embodiments of this application, in order to help those skilled in the art understand the technical content of this application, but it does not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.

[0326] As shown in Figure 8, the system architecture 800 according to this embodiment may include terminal devices 801, 802, and 803, a network 804, and a server 805. The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, and 803 and the server 805. The network 804 may include various connection types, such as wired and / or wireless communication links.

[0327] Users can use terminal devices 801, 802, and 803 to interact with server 805 via network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software (for example only).

[0328] Terminal devices 801, 802, and 803 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0329] Server 805 can be any type of server providing various services. For example, Server 805 can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Server 805 can also be a server for distributed systems or a server combined with blockchain.

[0330] It should be noted that the multi-agent construction method provided in this application embodiment can be executed by terminal devices 801, 802, or 803. Correspondingly, the multi-agent construction apparatus provided in this application embodiment can also be disposed in terminal devices 801, 802, or 803.

[0331] Optionally, the multi-agent construction method provided in this application embodiment can also be executed by server 805. Correspondingly, the multi-agent construction apparatus provided in this application embodiment can be located in server 805. The multi-agent construction method provided in this application embodiment can also be executed by a server or server cluster that is different from server 805 and capable of communicating with terminal devices 801, 802, 803 and / or server 805. Correspondingly, the multi-agent construction apparatus provided in this application embodiment can also be located in a server or server cluster that is different from server 805 and capable of communicating with terminal devices 801, 802, 803 and / or server 805.

[0332] It should be noted that the task processing method provided in the embodiments of this application can be executed by terminal devices 801, 802, or 803. Accordingly, the multi-agent construction device provided in the embodiments of this application can also be disposed in terminal devices 801, 802, or 803.

[0333] Optionally, the task processing method provided in this application embodiment can also be executed by server 805. Correspondingly, the task processing device provided in this application embodiment can be located in server 805. The task processing method provided in this application embodiment can also be executed by a server or server cluster that is different from server 805 and capable of communicating with terminal devices 801, 802, 803 and / or server 805. Correspondingly, the task processing device provided in this application embodiment can also be located in a server or server cluster that is different from server 805 and capable of communicating with terminal devices 801, 802, 803 and / or server 805.

[0334] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0335] It should be noted that trained multi-agent systems can be deployed on terminal devices, servers, edge computing devices, dedicated AI hardware, or cloud computing platforms.

[0336] Based on the same concept as the aforementioned embodiment of a multi-agent construction method, this application also provides a multi-agent construction apparatus 900. This apparatus 900 can be deployed on any computing-capable device, equipment, platform, or device cluster to execute and implement the multi-agent construction method provided in this application. The multi-agent construction apparatus 900 includes modules, sub-modules, or units for implementing various operations in the multi-agent construction method.

[0337] Figure 9 schematically illustrates a block diagram of a multi-agent construction apparatus according to an embodiment of this application.

[0338] As shown in Figure 9, the multi-agent construction device 900 may include a splitting module 910, a determining module 920, and a construction module 930.

[0339] Split module 910 is used to split a task into multiple subtasks.

[0340] The determination module 920 is used to determine, from a pool of agents, agents that are matched with each of the multiple subtasks. The agent pool includes multiple agents. The agent matched with a subtask is able to handle the subtask by invoking tools configured by the agent and at least one of the other agents.

[0341] Module 930 is used to build multi-agent systems based on agents matched with multiple subtasks. Multi-agent systems are used to process tasks.

[0342] The multi-agent construction apparatus 900 according to the embodiments of this application can correspond to the execution of the multi-agent construction method described in the embodiments of this application, and the above and other operations and / or functions of each module in the multi-agent construction apparatus 900 are respectively the corresponding processes of the multi-agent construction method of the embodiments of this application. For the sake of brevity, they will not be described again here.

[0343] Based on the same concept as the aforementioned task processing method embodiment, this application also provides a task processing device 1000. This task processing device 1000 can be deployed on any computing-capable device, equipment, platform, or device cluster to execute and implement the task processing method provided in this application embodiment. The task processing device 1000 includes modules, sub-modules, or units for implementing various operations in the task processing method.

[0344] Figure 10 schematically shows a block diagram of a task processing apparatus according to an embodiment of the present application.

[0345] As shown in Figure 10, the task processing device 1000 may include an acquisition module 1010 and a processing module 1020.

[0346] Module 1010 is used to acquire tasks to be processed.

[0347] The processing module 1020 is used to process the task to be processed using a multi-agent system and obtain the task processing result.

[0348] According to embodiments of this application, a multi-agent construction system can be constructed based on a multi-agent construction apparatus according to embodiments of this application.

[0349] The task processing apparatus 1000 according to the embodiments of this application can be used to execute the task processing method described in the embodiments of this application. The above and other operations and / or functions of each module in the task processing apparatus 1000 are respectively the corresponding flow of the task processing method of the embodiments of this application. For the sake of brevity, they will not be described again here.

[0350] This application also provides a computing device, including at least one processor, a memory, and a communication interface, wherein the processor is used to execute the multi-agent construction method and task processing method of this application.

[0351] Figure 11 illustrates a block diagram of a computing device according to an embodiment of this application.

[0352] As shown in Figure 11, the computing device 1100 includes at least one processor 1101, a memory 1102, and a communication interface 1103. The processor 1101, memory 1102, and communication interface 1103 are communicatively connected, which can be achieved via a wired (e.g., bus) or wireless connection. The communication interface 1103 is used to send and / or receive data from other devices. The memory 1102 stores computer instructions, which the processor 1101 executes to perform the multi-agent construction method and task processing method described in the aforementioned method embodiments.

[0353] It should be understood that, in the embodiments of this application, the processor 1101 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0354] The memory 1102 may include read-only memory and random access memory, and provides instructions and data to the processor 1101. The memory 1102 may also include non-volatile random access memory.

[0355] The memory 1102 can be volatile memory or non-volatile memory, or it can include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0356] It should be understood that the computing device 1100 according to the embodiments of this application can execute the multi-agent construction method and task processing method of the embodiments of this application. For a detailed description of the implementation of the above methods, please refer to the above text. For the sake of brevity, it will not be repeated here.

[0357] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer instructions are executed by a processor, the aforementioned method is implemented.

[0358] An embodiment of this application provides a chip including at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.

[0359] Embodiments of this application provide a computer program or computer program product that includes instructions that, when executed, cause a computer to perform the methods mentioned above.

[0360] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0361] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, processor-executed software modules, or a combination of both. The software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0362] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

A multi-agent construction method, characterized in that, The method comprises: splitting a task into a plurality of sub-tasks; determining, from an agent pool, an agent that matches each of the plurality of sub-tasks, wherein the agent pool comprises a plurality of agents, and an agent that matches a sub-task is capable of processing the sub-task by invoking at least one of a tool configured by the agent and another agent; and constructing a multi-agent system based on the agents that match the plurality of sub-tasks, wherein the multi-agent system is used to process the task. The method of claim 1, wherein The determining, from the agent pool, of the agent that matches each of the plurality of sub-tasks comprises: obtaining task information corresponding to each of the plurality of sub-tasks, wherein the task information comprises at least one of first task information and second task information, the first task information indicating a function to be possessed by an agent to be constructed, and the second task information indicating a model to be configured and a component to be configured, the agent to be constructed being an agent required by the sub-task, the model to be configured being a language model to be configured by the agent to be constructed, and the component to be configured being a component to be configured by the agent to be constructed; obtaining configuration information corresponding to each of the plurality of agents, wherein the configuration information comprises at least one of first configuration information and second configuration information, the first configuration information indicating a function possessed by the agent, and the second configuration information indicating a component configured by the agent, the component comprising at least one of the tool and the other agent; and determining, from the agent pool, the agent that matches each of the plurality of sub-tasks based on the task information corresponding to each of the plurality of sub-tasks and the configuration information corresponding to each of the plurality of agents. The method according to claim 1 or 2, characterized in that The method further comprises: determining that there is a target sub-task in the plurality of sub-tasks, wherein the target sub-task is a sub-task for which no agent is matched from the agent pool; and constructing an agent that matches the target sub-task based on a language model in a language model pool and a component in a component pool, wherein the component pool comprises at least one of the tool pool and the agent pool. The method according to claim 3, characterized in that The constructing of the agent that matches the target sub-task based on the language model in the language model pool and the component in the component pool comprises: determining a target language model from the language model pool and a target component from the component pool based on task information of the target sub-task; and constructing the agent that matches the target sub-task based on the target language model and the target component. The method according to claim 4, characterized in that The method further comprises: adding the agent that matches the target sub-task to the agent pool. The method according to claim 4 or 5, characterized in that The method further comprises at least one of: determining that the target language model does not exist in the language model pool, and adding the target language model to the language model pool; determining that the target component does not exist in the component pool, and adding the target component to the component pool. The method according to any one of claims 3 to 6, characterized in that The agent pool has a first invocation interface for supporting each agent in the agent pool being invoked. And / or, the language model pool has a second calling interface for supporting each language model in the language model pool being called; And / or, the tool pool has a third calling interface for supporting each tool in the tool pool being called. The method according to any one of claims 3 to 7, characterized in that The agent has a fourth calling interface for supporting the agent being called; And / or, the language model has a fifth calling interface for supporting the language model being called; And / or, the tool has a sixth calling interface for supporting the tool being called. The method according to any one of claims 1 to 8, characterized in that Further comprising: Determining a to-be-adjusted agent from the agent pool; And Adjusting the configuration of the to-be-adjusted agent, wherein the configuration includes at least one of the language model, the tool, the other agent, the agent role, and the agent instruction. The method of claim 9, wherein The adjusting the configuration of the to-be-adjusted agent includes: Obtaining to-be-adjusted configuration information, wherein the to-be-adjusted configuration information is configuration information of a fourth interface possessed by the to-be-adjusted agent; and Adjusting the configuration of the to-be-adjusted agent by adjusting the to-be-adjusted configuration information. The method according to any one of claims 1 to 10, characterized in that The constructing a multi-agent system based on the agents matched with the plurality of sub-tasks includes: Determining dependency information between the plurality of sub-tasks; Determining execution parameters corresponding to the plurality of sub-tasks based on the dependency information between the plurality of sub-tasks, wherein the execution parameters indicate an execution order of the sub-tasks; and Obtaining the multi-agent system based on the execution parameters corresponding to the plurality of sub-tasks and the agents matched with the plurality of sub-tasks, wherein the multi-agent system is configured to call the agents matched with the plurality of sub-tasks based on the execution order indicated by the execution parameters corresponding to the plurality of sub-tasks, and process the plurality of sub-tasks by using the agents matched with the plurality of sub-tasks. The method according to any one of claims 1 to 11, characterized in that The tool pool includes a first tool having a function of processing a computer vision task. A task processing method, characterized by, Comprising: Obtaining a to-be-processed task; and Processing the to-be-processed task by using a multi-agent system to obtain a task processing result, wherein the multi-agent system is constructed based on the method of any one of claims 1-12. The processing the to-be-processed task by using a multi-agent system to obtain a task processing result includes: The method of claim 13, wherein The multi-agent system calls agents matched with a plurality of to-be-processed sub-tasks based on an execution order indicated by execution parameters corresponding to the plurality of to-be-processed sub-tasks to process the plurality of to-be-processed sub-tasks, and obtains the task processing result; Wherein, the plurality of to-be-processed sub-tasks are obtained by splitting the to-be-processed task by the multi-agent system. ​ The method of claim 14, wherein The multi-agent system has an execution interface for supporting the multi-agent system to invoke agents matched with the plurality of to-be-processed sub-tasks to process the plurality of to-be-processed sub-tasks based on an execution sequence indicated by execution parameters corresponding to the plurality of to-be-processed sub-tasks, to obtain the task processing result. The method according to claim 14 or 15, characterized in that The to-be-processed task includes a trip planning task, and the plurality of to-be-processed sub-tasks include a first interaction sub-task, a planning sub-task, and an execution sub-task. The multi-agent system corresponding to the trip planning task includes a first interaction agent, a planning agent, and an execution agent. The first interaction agent is configured to execute the first interaction sub-task. The planning agent is configured to execute the planning sub-task. The execution agent is configured to execute the execution sub-task. The multi-agent system invokes agents matched with the plurality of to-be-processed sub-tasks to process the plurality of to-be-processed sub-tasks based on an execution sequence indicated by execution parameters corresponding to the plurality of to-be-processed sub-tasks, to obtain the task processing result, including: The first interaction agent executes the first interaction sub-task to obtain first interaction information. The first interaction information includes dialogue information between a first object and the first interaction agent. The planning agent executes the planning sub-task based on the first interaction information to obtain trip planning information. The trip planning information includes at least one of the following: trip time, at least one trip location, and a trip sequence corresponding to each of the at least one trip location. The trip location includes a trip interest point. The execution agent executes the execution sub-task based on the trip planning information to obtain at least one of the following: route planning information and trip interest point information corresponding to each of the at least one trip interest point. The first interaction agent obtains trip detailed information as the task processing result based on at least one of the following: the route planning information and the trip interest point information corresponding to each of the at least one trip interest point, and the trip planning information. The method of claim 16, wherein The execution agent executes the execution sub-task based on the trip planning information to obtain at least one of the following: route planning information and trip interest point information corresponding to each of the at least one trip interest point, including at least one of the following: The execution agent invokes a travel service tool configured by the execution agent to obtain trip interest point information corresponding to each of the at least one trip interest point. The travel service tool includes at least one of the following: an agent related to a travel service function and a tool related to the travel service function. The execution agent invokes a map service tool configured by the execution agent to obtain the route planning information. The map service tool includes at least one of the following: an agent related to a map service function and a tool related to the map service function. The method according to any one of claims 16-17, characterized in that The at least one trip interest point includes a target trip interest point, the target trip interest point being obtained by the first interaction agent based on a recommendation request for trip interest point recommendation in response to receiving the first object request. The method of claim 18, wherein The target trip interest point is obtained by the first interaction agent based on a recommendation request for trip interest point recommendation in response to receiving the first object request, including: The target trip interest point is obtained by the first interaction agent based on a recommendation request for trip interest point recommendation in response to receiving the first object request, including: The method according to any one of claims 16 to 19, characterized in that The target trip interest point is obtained by the first interaction agent based on a recommendation request for trip interest point recommendation in response to receiving the first object request, including: The first interaction agent interacts with the first object based on the trip modification request in response to receiving the trip modification request of the first object; And The planning agent modifies the trip planning information based on the trip modification information. The method according to claim 14 or 15, characterized in that The to-be-processed task includes an information recommendation task, the plurality of to-be-processed sub-tasks include a second interaction sub-task, a retrieval sub-task and a recommendation sub-task, the multi-agent system corresponding to the information recommendation task includes a second interaction agent, a retrieval agent and a recommendation agent, the second interaction agent is used to execute the second interaction sub-task, the retrieval agent is used to execute the retrieval sub-task, and the recommendation agent is used to execute the recommendation sub-task; The multi-agent system calls the agent corresponding to each of the plurality of to-be-processed sub-tasks to process the plurality of to-be-processed sub-tasks based on the execution order indicated by the execution parameter corresponding to each of the plurality of to-be-processed sub-tasks, and obtains the task processing result, including: The second interaction agent executes the second interaction sub-task to obtain second interaction information, wherein the second interaction information includes dialogue information between a second object and the second interaction agent; The retrieval agent executes the retrieval sub-task based on the second interaction information to obtain retrieval information; and The recommendation agent executes the recommendation sub-task based on the retrieval information to obtain recommendation information as the task processing result. The method of claim 21, wherein The recommendation agent executes the recommendation sub-task based on the retrieval information to obtain recommendation information as the task processing result, including: The recommendation agent calls a second recommendation tool configured by the recommendation agent to obtain recommendation information corresponding to the retrieval information as the task processing result, wherein the second recommendation tool includes at least one of an agent related to a second recommendation function and a tool related to the second recommendation function. A multi-agent construction device, characterized by, Including: A splitting module, configured to split a task into a plurality of subtasks; A determining module, configured to determine, from an agent pool, an agent respectively matched with each of the plurality of subtasks, wherein the agent pool comprises a plurality of agents, and the agent matched with the subtask is capable of processing the subtask by invoking at least one of a tool configured by the agent and other agents; and A constructing module, configured to construct a multi-agent system based on the agents respectively matched with the plurality of subtasks, wherein the multi-agent system is configured to process the task. A task processing apparatus characterized by comprising: Comprise: An obtaining module, configured to obtain a to-be-processed task; and A processing module, configured to process the to-be-processed task by using a multi-agent system to obtain a task processing result, wherein the multi-agent system is constructed based on the apparatus of claim 23. A computing device comprising a memory and a processor; The memory stores instructions which, when executed by the processor, cause the method of any one of claims 1-22 to be implemented. A computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, cause the method of any one of claims 1-22 to be implemented. A computer program product comprising a computer program which, when executed by a processor, causes the method of any one of claims 1-22 to be implemented. A chip comprising at least one processor and a communication interface, the processor being configured to execute the method of any one of claims 1-22. ​

Citation Information

Patent Citations

  • Multi-agent cooperation system and strategy method suitable for industrial digitization

    CN117649129A

  • Task processing method and device, electronic equipment and storage medium

    CN117851016A

  • Multi-agent task processing method and device, computer equipment and storage medium

    CN117992231A

  • Intelligent agent scheduling method, system and equipment based on large language model and medium

    CN118132227A

  • Planning system for autonomous operation

    US20180204141A1

Cited By

  • Business processing method and device, computer equipment and storage medium

    CN121858255A

  • Business processing methods, devices, computer equipment and storage media

    CN121858255B

  • Intelligent agent-based bioinformatics task automatic analysis method and system

    CN121999886A

  • Text labeling method, system, device and medium based on multi-model cooperation

    CN122309751A