Multi-agent collaboration method, system, device, medium and program product

By generating test requests and verifying the capability claims of the second agent, ensuring that it meets preset conditions before participating in collaboration, the problem of insufficient reliability in collaborative task execution in existing technologies is solved, and the success rate of tasks is improved.

CN123138129APending Publication Date: 2026-11-20SHANGHAI YINTAO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611626862.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-21
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The existing technology suffers from insufficient reliability in collaborative task execution due to the invocation of intelligent agents based solely on capability declarations.

Method used

By obtaining the capability declaration of the second agent, a test request for the target capability is generated, the test results are obtained, and the second agent is invoked to participate in the collaborative task under the preset verification conditions.

Benefits of technology

It improves the reliability of collaborative task execution and reduces the possibility of processing failures caused by calling agents solely based on capability declarations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138129A_ABST
    Figure CN123138129A_ABST
Patent Text Reader

Abstract

The present disclosure provides a multi-agent collaboration method, system, device, medium and program product, relating to the technical field of electric digital data processing, and the method comprises: in response to a collaboration task of a first agent, obtaining a capability declaration of a second agent, the second agent being an agent for collaborating with the first agent to perform the collaboration task; generating a test request for a target capability based on the capability declaration, the target capability including a required capability for performing the collaboration task; calling the second agent based on the test request to obtain a test result of the second agent for the test request; and in the case that the test result meets a preset verification condition of the target capability, calling the second agent to participate in performing the collaboration task. Thus, the execution reliability of the collaboration task can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic digital data processing technology, specifically to a multi-agent cooperation method, system, device, medium, and program product. Background Technology

[0002] In multi-agent collaboration scenarios, an agent can invoke other agents to participate in the execution of collaborative tasks. To determine the collaboration partners, the capability declarations published by other agents can be obtained, and the appropriate agent can be selected and invoked based on whether the capabilities described in the capability declarations meet the requirements of the collaborative task.

[0003] However, the capabilities described in the capability declaration may differ from the actual capabilities possessed by the agent. Determining collaborating partners solely based on capability declarations makes it difficult to ascertain whether the agent can meet the execution requirements of the current collaborative task, thus affecting the reliability of multi-agent collaborative tasks. Summary of the Invention

[0004] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing technologies that rely solely on capability declarations to invoke intelligent agents, resulting in insufficient reliability of collaborative task execution, and to provide a multi-agent collaboration method, system, device, medium, and program product.

[0005] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0006] This disclosure provides a multi-agent cooperation method, including:

[0007] In response to the collaborative task of the first agent, obtain the capability declaration of the second agent, which is an agent used to cooperate with the first agent to perform the collaborative task;

[0008] A test request for the target capability is generated based on the capability declaration, the target capability including the capability required to perform the collaborative task;

[0009] The second agent is invoked based on the test request, and the test results of the second agent in response to the test request are obtained.

[0010] If the test results meet the preset verification conditions of the target capability, the second intelligent agent is invoked to participate in the execution of the collaborative task.

[0011] Optionally, the step of generating a test request for the target capability based on the capability declaration includes:

[0012] Based on the capability declaration, determine the input specifications corresponding to the target capability;

[0013] A first test input and a second test input are generated based on the input specifications, wherein the first test input conforms to the input specifications and the second test input does not conform to the input specifications.

[0014] Test requests corresponding to the first test input and the second test input are generated respectively.

[0015] Optionally, the test results include at least one of the following: the network address accessed by the second agent, the file modifications made by the second agent, and the system calls initiated by the second agent.

[0016] Optionally, the step of invoking the second agent based on the test request and obtaining the test result of the second agent in response to the test request includes:

[0017] The second intelligent agent is invoked to process simulated business data and obtain the test results. The test request includes the simulated business data, which is used to replace the data to be processed in the collaborative task.

[0018] Optionally, the preset verification conditions include: the output fields and / or field types of the test results match the target output structure of the test request.

[0019] Optionally, if the test result includes a semantic score, the preset verification condition includes: the semantic score matches the expected score of the test request, wherein the semantic score is determined based on at least one of the semantic similarity between the test result and the expected result of the test request, keyword coverage, and format compliance;

[0020] If the test result includes the network address accessed by the second agent, the preset verification condition includes: the network address accessed by the second agent matches the corresponding restriction in the capability declaration;

[0021] If the test results include the file modification information of the second agent, the preset verification conditions include: the file modification information of the second agent matches the corresponding restrictions in the capability declaration;

[0022] If the test result includes a system call initiated by the second agent, the preset verification condition includes: the system call initiated by the second agent matches the corresponding restriction in the capability declaration.

[0023] Optionally, the step of invoking the second intelligent agent to participate in the execution of the collaborative task includes:

[0024] Based on the test request, the corresponding test results, and the preset verification conditions, it is determined whether the second intelligent agent possesses effective capabilities, and the target capabilities include the effective capabilities;

[0025] In response to the second agent possessing the effective capability, a session descriptor for the second agent is determined based on the effective capability;

[0026] Receive the service call request from the first intelligent agent for the second intelligent agent, and verify the service call request based on the session descriptor;

[0027] The second intelligent agent is invoked based on the verification status of the business call request.

[0028] Optionally, the step of invoking the second intelligent agent based on the verification status of the service call request includes:

[0029] If the service call request passes the verification, the service call request is forwarded to the second intelligent agent;

[0030] The steps following the invocation of the second intelligent agent based on the verification status of the business call request include:

[0031] Obtain updated information on the capability declaration of the second intelligent agent, as well as the business invocation results of the second intelligent agent;

[0032] In response to the inconsistency between the updated information and the session descriptor, or the failure of the service call result to meet the corresponding preset verification conditions, the effective capability of the second agent is tested, and the session descriptor of the second agent is updated.

[0033] This disclosure also provides a multi-agent cooperative system, including:

[0034] A declaration acquisition module is used to acquire the capability declaration of a second agent in response to a collaborative task of a first agent, wherein the second agent is an agent used to collaborate with the first agent to perform the collaborative task;

[0035] A request generation module is used to generate a test request for a target capability based on the capability declaration, wherein the target capability includes the capability required to perform the collaborative task;

[0036] A capability testing module is used to invoke the second intelligent agent based on the test request and obtain the test results of the second intelligent agent in response to the test request;

[0037] The collaboration invocation module is used to invoke the second intelligent agent to participate in the execution of the collaborative task when the test results meet the preset verification conditions of the target capability.

[0038] Optionally, the request generation module is further configured to: determine the input specification corresponding to the target capability based on the capability declaration; generate a first test input and a second test input based on the input specification, wherein the first test input conforms to the input specification and the second test input does not conform to the input specification; and generate test requests corresponding to the first test input and the second test input, respectively.

[0039] Optionally, the test results include at least one of the following: the network address accessed by the second agent, the file modification status of the second agent, and the system calls initiated by the second agent;

[0040] Optionally, the capability testing module is further configured to invoke the second intelligent agent to process simulated business data and obtain the test results, wherein the test request includes the simulated business data, which is used to replace the data to be processed in the collaborative task.

[0041] Optionally, the preset verification conditions adopted by the collaborative invocation module include: the output fields and / or field types of the test results match the target output structure of the test request;

[0042] Optionally, if the test result includes a semantic score, the preset verification condition includes: the semantic score matches the expected score of the test request, wherein the semantic score is determined based on at least one of the semantic similarity between the test result and the expected result of the test request, keyword coverage, and format compliance;

[0043] If the test result includes the network address accessed by the second agent, the preset verification condition includes: the network address accessed by the second agent matches the corresponding restriction in the capability declaration;

[0044] If the test results include the file modification information of the second agent, the preset verification conditions include: the file modification information of the second agent matches the corresponding restrictions in the capability declaration;

[0045] If the test result includes a system call initiated by the second agent, the preset verification condition includes: the system call initiated by the second agent matches the corresponding restriction in the capability declaration.

[0046] Optionally, the collaborative invocation module is further configured to: determine whether the second intelligent agent possesses effective capabilities based on the test request, the corresponding test results, and the preset verification conditions, wherein the target capabilities include the effective capabilities; in response to the second intelligent agent possessing the effective capabilities, determine the session descriptor of the second intelligent agent based on the effective capabilities; receive a service invocation request from the first intelligent agent for the second intelligent agent, and verify the service invocation request based on the session descriptor; and invoke the second intelligent agent based on the verification status of the service invocation request.

[0047] Optionally, the collaborative invocation module is further configured to forward the business invocation request to the second intelligent agent if the business invocation request verification passes.

[0048] The declaration acquisition module is further configured to acquire updated information of the capability declaration of the second intelligent agent after invoking the second intelligent agent; the collaborative invocation module is further configured to acquire the business invocation result of the second intelligent agent;

[0049] The capability testing module is also used to test the effective capabilities of the second agent in response to inconsistencies between the updated information and the session descriptor, or if the service call result does not meet the corresponding preset verification conditions; the collaborative call module is also used to update the session descriptor of the second agent based on the test results of the capability testing module.

[0050] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement any of the above-described multi-agent cooperative methods.

[0051] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described multi-agent cooperation methods.

[0052] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described multi-agent cooperation methods.

[0053] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.

[0054] The positive and progressive effects of this disclosure are as follows: by generating a test request for the target capability through the capability declaration of the second agent, obtaining the test results of the second agent, and calling the second agent to participate in collaboration when the test results meet the preset verification conditions, the collaboration call is based on the actual test results, reducing the possibility of processing failure caused by calling the second agent solely based on the capability declaration, and improving the execution reliability of the collaboration task. Attached Figure Description

[0055] Figure 1 A flowchart illustrating a multi-agent cooperation method provided as an exemplary embodiment of this disclosure;

[0056] Figure 2 A schematic diagram of a multi-agent cooperative system provided as an exemplary embodiment of this disclosure;

[0057] Figure 3 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present disclosure. Detailed Implementation

[0058] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0059] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0060] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.

[0061] Figure 1 The flowchart illustrates a multi-agent collaboration method provided in an exemplary embodiment of this disclosure. This method can be executed by an interoperability gateway, which manages test calls and service calls between a first agent and a second agent. The interoperability gateway can be implemented by a computer program and can invoke a language model or dedicated agent to generate test requests and analyze test results; the corresponding scoring calculations, conditional judgments, and request forwarding can be executed by the program.

[0062] The first intelligent agent can be used to organize or coordinate collaborative tasks, while the second intelligent agent can be a candidate intelligent agent to participate in processing that collaborative task. For example, the first intelligent agent can be the scheduling intelligent agent for a financial research report processing task, while the second intelligent agent can be the intelligent agent providing financial table extraction functionality. The second intelligent agent can be deployed in a local execution environment that the gateway can control, or it can be invoked as a service on a remote server. The first and second intelligent agents can employ different intelligent agent frameworks or communication protocols.

[0063] Collaborative tasks can be all or part of the tasks handled by the first agent. For example, the first agent might break down a research report processing task into sub-tasks such as document reading, table extraction, and content summarization, while the second agent participates in the table extraction process. The distinction between the first and second agents indicates their roles in the current collaborative relationship and does not imply that either agent always assumes a fixed role.

[0064] like Figure 1 As shown, the multi-agent cooperation method includes the following steps.

[0065] S1. In response to the collaborative task of the first agent, obtain the capability declaration of the second agent.

[0066] S2. Generate a test request for the target capability based on the capability declaration. The target capability includes the capabilities required to perform collaborative tasks.

[0067] S3. Invoke the second agent based on the test request and obtain the test results of the second agent in response to the test request.

[0068] S4. If the test results meet the preset verification conditions of the target capability, call the second intelligent agent to participate in the execution of the collaborative task.

[0069] Capability declarations can be used to describe the capabilities provided by the second agent and the conditions for their invocation. Capability declarations may include agent identity identifiers, capability identifiers, capability descriptions, input specifications, output specifications, supported communication protocol versions, prerequisite dependencies, resource limits, and information such as network access, file modification, and system call restrictions. Each capability identifier can be associated with its corresponding input specification, output specification, and invocation restrictions. Capability declarations may also include version identifiers such as the second agent's software version, model version, and hash value.

[0070] Input specifications can take a structured form, such as JSON Schema, to describe request fields, field types, required fields, string lengths, and numeric value ranges. Output specifications can describe output fields, field types, and data organization methods. Taking document summarization capabilities as an example, the input specification can require a string-type `content` field, and the output specification can require a string-type `summary` field and allow the inclusion of an array-type `key_points` field.

[0071] Behavioral restrictions in capability declarations describe the operations that the second agent is allowed to perform. For example, a declaration may prohibit writing to files, access to external networks, or allow access only to whitelisted network addresses. Resource limits may include processing time, memory usage, etc. These fields can be configured according to the capabilities to be invoked; not every capability declaration needs to include all fields simultaneously.

[0072] The gateway can obtain the capability declaration of a second agent when the second agent registers with the cooperative network, or it can obtain the capability declaration of a first agent after the first agent proposes a cooperative request and discovers a candidate second agent. In this disclosed embodiment, obtaining the capability declaration itself does not mean that the gateway has recognized the capabilities described in the declaration, and the corresponding test results need to be obtained through subsequent steps.

[0073] The target capability in step S2 refers to the capability to be tested, which may include one or more capabilities. For example, for the financial table extraction subtask, the financial table extraction capability can be identified as the target capability. In the first step, an agent with a capability declaration that matches the target capability can be selected as a second agent. Therefore, when handling collaborative tasks, if the capability of one agent is insufficient to cover the target capability, multiple second agents can be selected. The target capability may also include other capabilities related to the capabilities required for the task that need to be verified together.

[0074] The test request may include information such as test input, target capability identifier, expected result, target output structure, and test execution constraints. The expected result and target output structure are associated with the corresponding test input and are used to evaluate the subsequent actual processing by the second agent. In step S3, only the test input needs to be sent to the second agent; the other information can be used to determine whether the second agent's actual processing meets the requirements.

[0075] In one alternative implementation, step S2 may include:

[0076] Based on the capability declaration, the input specifications corresponding to the target capability are determined. A first test input and a second test input are generated based on these specifications, and test requests corresponding to the two types of test inputs are generated respectively. The first test input conforms to the input specifications, while the second test input does not.

[0077] Each type of test input may include one or more test samples. This disclosure does not limit the number of test requests generated by the two types of test inputs.

[0078] The first test input is used to verify whether the second agent can perform the required processing under conditions that conform to the input specifications. When generating the first test input, typical data can be extracted from the context of the collaborative task and the data fields can be organized according to the input specifications. For example, typical real data can be extracted from the current task context to construct a legitimate business payload, which is mainly used to verify the basic communication and semantic response of the second agent.

[0079] Inputs whose parameters are at the endpoints of the valid range are still considered inputs that conform to the input specifications and can also be used as the first test input to test the extreme performance of the second agent.

[0080] The second test input is used to verify the second agent's handling of inputs that do not conform to the input specifications. For example, when the input specifications limit the lower and upper limits of a value, a value less than the lower limit or greater than the upper limit is selected; when the input specifications require non-empty text or limit the maximum text length, empty text or text exceeding the maximum length is provided respectively; when the input specifications require a specific required field or field type, input with the missing field or a different field type is provided. The second test input can also be content from the task context and does not need to be generated independently outside the task context. It is mainly used to test the robustness of the second agent when handling anomalies.

[0081] For the first test input, the expected result is the output after processing; for the second test input, the expected result is information consistent with the capability declaration, such as rejection, returning a specified error code, or returning an exception message with a specified structure. Therefore, the fact that the second test input does not conform to the input specification does not mean that the test result of the second agent will necessarily fail to meet the preset verification conditions. When the second agent processes the abnormal input as expected, it can also pass the corresponding test.

[0082] In one alternative implementation, the gateway can invoke a language model to generate test requests based on the target capabilities and capability declarations. For example, it can test the second agent's capabilities such as field integrity, input length, handling merged cells, or handling abnormal input. The test dimensions and scope can be pre-configured, and the model generates test input samples and the answer information required to verify the capabilities accordingly. The model can be configured or trained using rules to complete the above processing.

[0083] Test requests, also known as capability probes, can be configured in the header information of the test request with X-Agent-Probe test identifier, X-Idempotency-Key idempotency identifier, X-Dry-Run trial run identifier, etc., to instruct the second agent to enter the controlled test mode.

[0084] The test results in step S3 may include the output returned by the second agent, or some execution information when the second agent processes the test request, such as the obtained network address, the modification status of local files, the content of the initiated system calls, the consumption of computing resources, or the processing time of the task, and may also include evaluation information calculated based on the above content.

[0085] In implementations that control the execution environment of the second agent, the gateway can invoke the second agent within an isolated runtime environment. This isolated runtime environment separates the business resources used for test processing from those used for collaborative tasks and monitors and restricts network access, file writing, or system calls during testing. For example, a default blocking policy can be implemented within the sandbox's network namespace, redirecting all outgoing traffic except for traffic from the second agent's basic authentication port to a listening proxy, and monitoring for DNS queries or TCP SYN requests targeting undeclared external domains.

[0086] During testing, when the second agent modifies a file, the changes can be saved in a temporary storage area, while the original file remains unchanged. For database operations, read-only connections are used, or the operations are placed in an uncommitted transaction, and non-read-type SQL commands are monitored. System calls initiated by the second agent are recorded through an eBPF program. By incorporating the monitored file changes, database operations, and system call information into the test results, it can be used to determine whether the second agent has performed operations beyond the scope defined in its capability declaration.

[0087] In implementations where the execution environment of the second agent cannot be controlled—for example, if the second agent provides services on another server—test requests may include simulated business data. This simulated business data serves as a substitute for the data to be processed in the collaborative task. Simulated business data is data constructed for testing and may have the same or corresponding fields, formats, and task semantics as the data to be processed, but it does not directly use the data or operational context required to complete the actual business processing in the collaborative task. For example, test account information and simulated order content are used in order placement function testing, and constructed document or table content is used in document processing testing.

[0088] The gateway invokes the second agent to process simulated business data and obtains the test results returned by the second agent. This method can be used for second agents deployed remotely or for second agents in a local execution environment.

[0089] For a second agent that is remotely deployed and whose execution environment is not controlled by the gateway, the gateway evaluates it based on the returned content and interaction information that it can obtain, but it is difficult to monitor or block all network, file and system call operations on the remote server.

[0090] The preset verification conditions in step S4 correspond to the target capabilities and test requests, and may include output structure conditions, semantic scoring conditions, and execution behavior conditions.

[0091] For output structure conditions, preset verification conditions include: the output fields and / or field types of the test results match the target output structure of the test request. The output fields and field types in the test results can be compared with the target output structure of the test request. For example, verifying whether the required fields in the JSON output are complete and whether the field types are consistent with the types defined by the target output structure. Output fields represent data items in the returned data, and field types represent the value type of that data item. For test requests that do not conform to the input specifications, the target output structure can be the expected error response structure of the test request.

[0092] For semantic scoring conditions, preset verification conditions include: the semantic score matches the expected score of the test request. The semantic score can be determined based on at least one of the following: semantic similarity between the output content and the expected result, keyword coverage, and format compliance. This semantic score is then included in the test result. The score can be calculated by the gateway; the second agent is not required to provide the score itself. The expected score represents the scoring requirement for the corresponding test and can be set as a minimum threshold, an allowed range, or a target score and its allowed deviation. "Matching" can include reaching the minimum threshold, falling within the allowed range, or having a deviation from the target score within the allowed range.

[0093] Semantic similarity can be determined by the cosine similarity of the semantic vectors of the actual output and the expected result; keyword coverage can be determined by the coverage of the expected keywords or core entities by the output content; format compliance can be determined by the degree of conformity with language, text organization, or specified output format. Therefore, the gateway can call the model to identify situations such as irrelevant answers, garbled characters, language inconsistencies, or missing content, and then determine the corresponding score according to the preset scoring rules.

[0094] In an optional implementation, semantic similarity, keyword coverage, and format compliance can all be normalized to a range of 0 to 1, and a weighted sum can be calculated using weights of 0.6, 0.2, and 0.2 respectively, to serve as the semantic score. The weights mentioned above are for illustrative purposes only and are not fixed requirements; the test dimensions, scoring rules, and weights can be configured according to the evaluation requirements corresponding to the target capability. Expected results, keywords, and specific samples can be generated by the model, while the scoring weights and scoring rules can be pre-configured.

[0095] For the execution behavior conditions, the preset verification conditions include: the network address accessed by the second agent matches the corresponding restriction in the capability declaration; the file modification of the second agent matches the corresponding restriction in the capability declaration; and the system call initiated by the second agent matches the corresponding restriction in the capability declaration.

[0096] For network access verification, the network addresses recorded in the test results can be used to determine whether the second agent accessed addresses outside the scope permitted by the capability declaration. For file modification verification, it can be determined whether the file modification details match the declared read-only requirement or allowed write range. For system call verification, it can be determined whether the recorded system calls comply with the corresponding restrictions in the declaration. For example, if the capability declaration restricts writing to files but file modification is detected during the test, the corresponding verification condition is not met. Furthermore, the declared resource limits can be used to determine whether processing time or memory usage has exceeded limits.

[0097] In one optional implementation, the fulfillment of the output structure condition can be recorded as a successful structure verification, and the fulfillment of the execution behavior condition can be recorded as a successful behavior verification. If both of the above are successful and the semantic score is not lower than 0.85, the corresponding capability is determined to be a complete match; if both of the above are successful and the semantic score is not lower than 0.65 but lower than 0.85, the corresponding capability is determined to be a downgraded match; if either the structure or behavior verification fails, or the semantic score is lower than 0.65, the corresponding capability verification is determined to be a failure. The aforementioned thresholds are merely exemplary parameter configurations.

[0098] For the ability to perform downgraded matching, unreliable output fields can be pruned and the range of calling parameters can be limited. When the test result of the second agent under one communication protocol version does not meet the preset verification conditions, but meets the preset verification conditions under another communication protocol version, the latter can be used for collaborative calling. Similarly, if other conditions are met, the version with the higher score should be used first.

[0099] In one alternative implementation, step S4 includes steps S41 to S43, and steps S5 and S6 are executed after the second agent is invoked.

[0100] S41, based on the test request, the corresponding test results and the preset verification conditions, determine whether the second agent has effective capabilities, and generate a session descriptor if it has effective capabilities.

[0101] Effective capabilities are those among the target capabilities that have been tested and meet the preset verification conditions. For capabilities that are downgraded for matching, the range of their input parameters or the fields allowed for output can be limited. If the second agent does not have effective capabilities, a session descriptor will not be generated.

[0102] Session descriptors can be used to record valid capabilities and their invocation restrictions. This can include valid capability identifiers, allowed input or output fields, invocation quotas, and communication protocol versions. Specifically, it can include the identities of both agents, the tested set of valid capabilities, communication adaptation rules (protocol version, field mapping, type conversion, error code mapping), session expiration conditions, and the most recent verification timestamp. The gateway can determine the appropriate protocol version based on the test results and generate communication adaptation rules locally, such as field mapping, data type conversion, and error code mapping, to enable data interaction between the first and second agents. Communication adaptation rules can be generated and executed locally on the first agent's side (interoperability gateway), without requiring the second agent to have negotiation and interaction capabilities. The second agent only passively receives probe calls and business calls, making it compatible with heterogeneous agents from different frameworks and vendors.

[0103] S42, receive the service call request from the first intelligent agent to the second intelligent agent, and verify the service call request based on the session descriptor.

[0104] The first agent initiates a service call request carrying a session descriptor identifier. The gateway verifies, based on the corresponding session descriptor, whether the requested capability is valid, and whether the input parameters, request fields, and call frequency comply with the relevant restrictions.

[0105] S43, invoke the second intelligent agent based on the verification status of the business call request.

[0106] If the verification passes, the gateway forwards the service call request to the second intelligent agent; otherwise, the request is blocked. When protocol adaptation is required, the request and returned data are processed according to the determined communication protocol version and field mapping rules.

[0107] S5, after invoking the second agent, obtains the updated information of the second agent's capability declaration and the business call result.

[0108] The gateway can compare the current capability declaration with the previously acquired capability declaration to determine the updated information; the updated information may include changes in information such as version identifier, input and output specifications, and call restrictions; the service call result may include the content returned by the second intelligent agent and the monitored execution status.

[0109] Step S6: In response to the inconsistency between the update information and the session descriptor, or the failure of the business call result to meet the corresponding preset verification conditions, test the effectiveness of the second intelligent agent and update the session descriptor.

[0110] Inconsistent update information with session descriptor means that the relevant information in the updated capability declaration is inconsistent with the corresponding information in the session descriptor; the verification of business call results is based on the actual business input and is carried out in accordance with the corresponding output structure requirements, semantic scoring requirements or behavioral restrictions.

[0111] During retesting, test requests can be generated for the affected capabilities, and the effective capabilities and invocation restrictions in the session descriptor can be updated based on the test results. For capabilities that fail verification, their invocation permissions are revoked; for capabilities that are downgraded in matching, their invocation scope is narrowed.

[0112] In one optional implementation, in the intelligent financial report decomposition task, the first intelligent agent is a wealth management scheduling intelligent agent, and the second intelligent agent is a third-party financial report extraction intelligent agent. The second intelligent agent declares support for financial table extraction and communication protocol versions v1.0 and v2.0. Testing revealed that it could not parse merged cells under v2.0, while under v1.0, the output structure was complete, the semantic score was 0.91, and no network external connections or file writes were found. Therefore, the v1.0 protocol was adopted, a session descriptor was generated, and the call quota was limited. When a subsequent request to call the unverified email sending capability was made, the gateway blocked the request; after the second intelligent agent updated its capability declaration, it retested the table extraction capability and updated the session descriptor.

[0113] Corresponding to the aforementioned multi-agent cooperation method embodiments, Figure 2 A multi-agent cooperative system is provided as an exemplary embodiment of this disclosure, which can be deployed on the aforementioned interoperability gateway.

[0114] like Figure 2 As shown, the multi-agent collaborative system includes a declaration acquisition module 1, a request generation module 2, a capability testing module 3, and a collaborative invocation module 4.

[0115] The declaration acquisition module is used to acquire the capability declaration of the second agent in response to the collaborative task of the first agent. The second agent is an agent used to cooperate with the first agent to perform collaborative tasks.

[0116] The request generation module is used to generate test requests for target capabilities based on capability declarations. Target capabilities include the capabilities required to perform collaborative tasks.

[0117] The capability testing module is used to invoke the second agent based on the test request and obtain the test results of the second agent in response to the test request.

[0118] The collaboration invocation module is used to invoke a second intelligent agent to participate in the execution of collaborative tasks when the test results meet the preset verification conditions of the target capability.

[0119] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0120] Figure 3 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the multi-agent cooperation method described in any of the above embodiments. Figure 3 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0121] like Figure 3 As shown, the electronic device 30 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including memory 32 and processor 31).

[0122] Bus 33 includes a data bus, an address bus, and a control bus.

[0123] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.

[0124] The memory 32 may also include a program tool 325 (or utility) having a set (at least one) program module 324, such program module 324 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0125] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the multi-agent cooperative method provided in any of the above embodiments.

[0126] Electronic device 30 can also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, electronic device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 36. As shown, network adapter 36 communicates with other modules of electronic device 30 via bus 33. It should be understood that, although... Figure 3 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0127] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0128] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-agent cooperation method provided in any of the above embodiments.

[0129] The specific forms of readable storage media include, but are not limited to: portable disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0130] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the multi-agent cooperation method described in any of the preceding embodiments.

[0131] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0132] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A multi-agent cooperative method, characterized in that, include: In response to the collaborative task of the first agent, obtain the capability declaration of the second agent, which is an agent used to cooperate with the first agent to perform the collaborative task; A test request for the target capability is generated based on the capability declaration, the target capability including the capability required to perform the collaborative task; The second agent is invoked based on the test request, and the test results of the second agent in response to the test request are obtained. If the test results meet the preset verification conditions of the target capability, the second intelligent agent is invoked to participate in the execution of the collaborative task.

2. The multi-agent cooperation method as described in claim 1, characterized in that, The step of generating a test request for the target capability based on the capability declaration includes: Based on the capability declaration, determine the input specifications corresponding to the target capability; A first test input and a second test input are generated based on the input specifications, wherein the first test input conforms to the input specifications and the second test input does not conform to the input specifications. Test requests corresponding to the first test input and the second test input are generated respectively.

3. The multi-agent cooperation method as described in claim 1, characterized in that, The test results include at least one of the following: the network address accessed by the second agent, the file modification status of the second agent, and the system call initiated by the second agent. And / or, The step of invoking the second agent based on the test request and obtaining the test result of the second agent in response to the test request includes: The second intelligent agent is invoked to process simulated business data and obtain the test results. The test request includes the simulated business data, which is used to replace the data to be processed in the collaborative task.

4. The multi-agent cooperation method as described in claim 3, characterized in that, The preset verification conditions include: the output fields and / or field types of the test results match the target output structure of the test request; And / or, If the test result includes a semantic score, the preset verification conditions include: the semantic score matches the expected score of the test request, wherein the semantic score is determined based on at least one of the semantic similarity between the test result and the expected result of the test request, keyword coverage, and format compliance; If the test result includes the network address accessed by the second agent, the preset verification condition includes: the network address accessed by the second agent matches the corresponding restriction in the capability declaration; If the test results include the file modification information of the second agent, the preset verification conditions include: the file modification information of the second agent matches the corresponding restrictions in the capability declaration; If the test result includes a system call initiated by the second agent, the preset verification condition includes: the system call initiated by the second agent matches the corresponding restriction in the capability declaration.

5. The multi-agent cooperation method as described in any one of claims 1-4, characterized in that, The step of invoking the second intelligent agent to participate in the execution of the collaborative task includes: Based on the test request, the corresponding test results, and the preset verification conditions, it is determined whether the second intelligent agent possesses effective capabilities, and the target capabilities include the effective capabilities; In response to the second agent possessing the effective capability, a session descriptor for the second agent is determined based on the effective capability; Receive the service call request from the first intelligent agent for the second intelligent agent, and verify the service call request based on the session descriptor; The second intelligent agent is invoked based on the verification status of the business call request.

6. The multi-agent cooperation method as described in claim 5, characterized in that, The step of invoking the second intelligent agent based on the verification status of the business call request includes: If the service call request passes the verification, the service call request is forwarded to the second intelligent agent; The steps following the invocation of the second intelligent agent based on the verification status of the business call request include: Obtain updated information on the capability declaration of the second intelligent agent, as well as the business invocation results of the second intelligent agent; In response to the inconsistency between the updated information and the session descriptor, or the failure of the service call result to meet the corresponding preset verification conditions, the effective capability of the second agent is tested, and the session descriptor of the second agent is updated.

7. A multi-agent cooperative system, characterized in that, include: A declaration acquisition module is used to acquire the capability declaration of a second agent in response to a collaborative task of a first agent, wherein the second agent is an agent used to collaborate with the first agent to perform the collaborative task; A request generation module is used to generate a test request for a target capability based on the capability declaration, wherein the target capability includes the capability required to perform the collaborative task; A capability testing module is used to invoke the second intelligent agent based on the test request and obtain the test results of the second intelligent agent in response to the test request; The collaboration invocation module is used to invoke the second intelligent agent to participate in the execution of the collaborative task when the test results meet the preset verification conditions of the target capability.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the multi-agent cooperation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-agent cooperation method as described in any one of claims 1-6.

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