Cross-platform automatic assembly and deployment method and system for AI agent
By assembling and testing AI agents in a temporary isolation zone, generating skill call records, shielding abnormal calls, and modifying configurations or supplementing resources, the problem of insufficient reliability in cross-platform deployment and acceptance of AI agents was solved, achieving higher deployment accuracy and reliability.
Patent Information
- Application Number
- CN202611570316.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-12
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, AI agents have insufficient reliability issues when deployed across platforms, especially when there are skill resources with the same name on the target platform. This may lead to incorrect calls and make it impossible to confirm that the resource required for this deployment is actually being used.
By parsing the declaration document, a version to be deployed is generated and the agent is assembled in a temporary isolation area. Deterministic and end-to-end tests are performed, skill call records are generated, the verification information of the actual call source is compared with the allowed call source, abnormal calls are blocked, cache bindings are cleared, and the call is re-called and the configuration is modified or resources are supplemented until acceptance is passed.
This improves the acceptance reliability of cross-platform deployment of AI agents, ensures that the call configuration and resources meet the requirements of the target platform, avoids functional abnormalities caused by incorrect calls, and enhances the reliability and accuracy of deployment.
Smart Images

Figure CN123157228A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software deployment technology, specifically to a cross-platform automatic assembly and deployment method and system for AI intelligent agents. Background Technology
[0002] AI agents can invoke tools based on user input to complete tasks such as file processing and information retrieval. However, different operating platforms have different resource storage locations and tool invocation methods. When migrating a configured agent to another platform, it is necessary to adapt the workflow and skill resource invocation methods. As the application of agents in enterprise software increases, assembling, testing, and enabling them on the target platform has become a necessary deployment process for cross-system reuse.
[0003] For example, in the prior art, Chinese Patent Publication No. CN122018926A discloses an intelligent agent processing method. This method obtains the operating environment and tool configuration information based on the intelligent agent's deployment method, adjusts the relevant configurations in conjunction with the deployment constraints of the target business system, and packages it into an application installation package that can be deployed in the target business system. This method reduces redundant deployment work between different environments by delivering the environment and configuration required by the intelligent agent along with the installation package.
[0004] The aforementioned methods focus on encapsulating and deploying agents according to the requirements of the target environment. When the target platform already has a skill resource with the same name, the platform's retained calling relationships may still point to the original resource, causing the newly assembled agent to actually call a different version of the skill. If the skill's return result also meets the functional testing requirements, passing the test alone cannot confirm that the resource required for this deployment is actually being used, and the activated agent may still use the incorrect calling relationships. Therefore, existing technologies suffer from insufficient reliability in cross-platform deployment and acceptance testing of agents. Summary of the Invention
[0005] This application provides a cross-platform automatic assembly and deployment method and system for AI agents, which solves the technical problem of insufficient reliability in the cross-platform deployment and acceptance of AI agents.
[0006] This method parses the declaration document, assembles the intelligent agent in the temporary isolation area according to the workflow and skill resource sources in the document and the adaptation rules of the target platform, generates a version to be deployed, and determines the allowed call sources of each skill based on the declaration document and the assembly results. Perform deterministic testing on the version to be deployed. After passing the test, perform end-to-end testing driven by a large model and generate skill call records. Based on the skill call records, the verification information of the actual call source and the corresponding allowed call source are compared, and inconsistent calls are judged as abnormal sources; For each abnormal call, the actual call source is blocked in the temporary isolation area, and the corresponding call binding in the runtime cache is cleared; the session context and isolation test data before the call are restored, and the corresponding skill is called again using the input recorded in the call. If the actual calling source is consistent with the verification information of the corresponding allowed calling source, then modify the calling configuration to bind the allowed calling source; if no skill resource with verification information consistent with the verification information of the corresponding allowed calling source is found, then supplement the corresponding skill resource according to the declaration document. After modifying the call configuration or supplementing the skill resources, re-execute the deterministic test and end-to-end test; If the most recent deterministic test and end-to-end test of the same version to be deployed have been completed and passed, and the end-to-end test does not contain the aforementioned source anomaly, then the version to be deployed is enabled by transaction commit; otherwise, the temporary isolation zone is cleaned up and enabled is prohibited.
[0007] Optionally, in the end-to-end test, the large model generates skill call instructions based on the session context, writes the return results of each skill call into the session context, and records the writing position in the corresponding skill call record; Before modifying the call configuration or supplementing the skill resources, determine the first abnormal call source according to the call order of this test; the call configuration of each skill call before this call is bound to the corresponding allowed call source, and its call configuration, skill resources and runtime dependencies remain unchanged before and after the modification; When retesting, retain the skill call records before the first abnormal source call, delete the content in the session context of the test before modification starting from the position where the return result of that call was written, and cancel the skill call instructions generated based on the deleted content that have not yet been executed; Restore the session context and isolation test data before the call, and re-call the corresponding skill using the original call input; when the verification information of the actual call source and the corresponding allowed call source are consistent, write the return result into the session context, and the large model combines the updated session context and the workflow to regenerate and execute the subsequent skill call instructions; The re-call and subsequent skill call records are appended to the retained records in the order of the calls. Based on the appended records and the corresponding session context, the end-to-end test results are determined according to the acceptance conditions specified in the declaration document, and the source anomaly determination is performed on each call in the appended records.
[0008] Optionally, when the temporary isolation zone blocks the actual call source, the blocking operation and the corresponding actual call source are recorded; Before re-executing end-to-end testing on the modified version to be deployed, unblock the code in reverse order of the blocking operations, so that the actual source of the blocked call can re-participate in the skill analysis. Based on the modified call configuration of the version to be deployed, a new running instance is started in the temporary isolation zone; the running instance re-parses the skill according to the call configuration and does not use the call binding in the runtime cache used in the source exception handling process; In the running instance, the re-invocation of the first source anomaly call and subsequent skill calls are performed. The skill call records of each call in the running instance are appended to the retained skill call records. The end-to-end test results and source anomaly determination results determined based on the appended skill call records are used for the activation determination of the version to be deployed.
[0009] Optionally, the verification information includes resource location and version identifier; In the verification information of the allowed call source, the version identifier is taken from the declaration document, and the resource location is determined according to the assembly result of the skill resource specified in the declaration document; The verification information of the actual call source is obtained from the skill resources actually parsed from the target platform, and compared item by item with the verification information of the corresponding allowed call source.
[0010] Optionally, the call binding record in the runtime cache establishes a correspondence between the skill identifier and the actual call source; After blocking the actual call source, the call binding of the corresponding skill identifier in the runtime cache is deleted, and the call source is re-parsed when the corresponding skill is called again.
[0011] Optionally, when supplementing the corresponding skill resources, the resource configuration status is checked according to the resource address and version identifier recorded in the declaration document, and the corresponding skill resources that have not yet been configured are obtained and configured into the temporary isolation area. Once the missing information is obtained, the verification information of the corresponding allowed call source is updated according to the location of the corresponding skill resource and the version identifier recorded in the declaration document, and the call configuration of the corresponding skill is bound to the allowed call source.
[0012] Optionally, before each skill call in the end-to-end test, the session context and isolation test data are saved, and the saved content is associated with the corresponding skill call record; When restoring the state prior to the first abnormal call, the saved content associated with that call record is used to restore the session context and isolation test data.
[0013] Optionally, before the running instance executes the first source exception call, the recovered session context and isolation test data are loaded into the running instance.
[0014] Optionally, the declaration document records interactive test cases; After the end-to-end test based on the subsequent skill call records passes and there is no source anomaly, before the activation determination of the version to be deployed is made, the session context and isolation test data of the running instance are initialized according to the interaction test cases; Based on the test input of the interactive test cases, the workflow is fully executed in the running instance, and the end-to-end test result is determined according to the corresponding acceptance criteria. The activation determination also requires that the complete end-to-end test be passed and that there is no source anomaly in the skill call record of the end-to-end test.
[0015] This application also provides a system for implementing the above-described method, including a memory and a processor. The memory stores a computer program, and the processor executes the program to complete the processing procedures of the above-described method.
[0016] This application compares the actual call source with the allowed call sources, enabling the identification of calls where the functional output meets the requirements but the actual resources used do not. After blocking the erroneous source and clearing the original binding, the skill is re-invoked with the original input. Depending on whether the target platform can resolve resources that meet the declared requirements, the call configuration is modified or the resources are supplemented. After repair, testing is repeated, ensuring that the activation determination is based on both the functional result and the actual call source, thus improving the reliability of deployment acceptance.
[0017] The return results of abnormal skills may continue to affect subsequent instructions, and simply replacing resources cannot eliminate the impact of data already written to the session and test data. This application restores the state before the abnormal call and regenerates subsequent instructions while keeping the front-end call conditions unchanged. This ensures that subsequent acceptance tests use the front-end records that were not affected by the repair and the back-end records that were actually executed after the repair, avoiding the use of subsequent execution results formed under the influence of abnormal results.
[0018] After unblocking, using a new running instance that does not retain the original call bindings allows verification that the modified call configuration still points to the allowed call source when the original source becomes available again. Using the actual call records of this instance in the enable determination can avoid mistakenly equating the caching effect during temporary blocking or exception handling with the call configuration being corrected. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating an AI agent cross-platform automatic assembly and deployment method provided in an embodiment of this application.
[0020] Figure 2 This application provides a session recovery and skill call record continuity diagram.
[0021] Figure 3 This is a verification relationship diagram of a new running instance after the shielding is removed, provided in an embodiment of this application. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] This application can be applied to the deployment of file processing agents across different software operating platforms. The agent invokes skills according to a workflow to complete tasks. A skill is a software resource that can receive input and return execution results, such as a module containing a file reading function. In addition to the resources installed in this application, the target platform may have other resources with the same name registered. Which resource is actually used depends on the invocation configuration and the binding already established between the running instance. Therefore, after copying the resources, it is necessary to verify whether the actual invocation meets the requirements of this deployment.
[0024] For example, the agent to be deployed needs to read test files, convert records within those files, and generate reports. A record conversion skill with the same name already exists on the target platform. The deployment program establishes a temporary isolation zone on this platform for assembly and testing, while production tasks continue to use the already enabled version. Test data and production data are stored separately. During testing, the skill only writes reports and intermediate data to the isolated test directory, allowing the test state to be restored to before the corresponding call by recovering the directory contents.
[0025] like Figure 1 As shown, the deployment process completes assembly and determines allowed call sources in S1. After testing and forming call records in S2, the actual source is checked in S3. If an anomaly is found, processing is completed in S4 and S5, followed by retesting in S6. Finally, S7 determines whether to enable or clean up the application. If no anomaly is found, the enabling decision is made directly according to the test conditions in S7.
[0026] In step S1, the declaration document is parsed, and based on the workflow and skill resource sources therein, the intelligent agent is assembled in the temporary isolation area according to the adaptation rules of the target platform to generate a version to be deployed. The allowed call sources of each skill are determined based on the declaration document and the assembly results.
[0027] The declaration document describes the agent's workflow and the resource sources for the skills used. In one specific implementation, the declaration document uses YAML format. The workflow describes the input-output connections of each skill, and the skill resource entries provide the skill identifier, corresponding resource address, and version. After parsing this content, the deployment program creates directories and calls configurations according to the target platform's adaptation rules, and assembles the resources into the directory of the version to be deployed; when resources are given in the form of references, the assembly location and call entry point are determined based on the reference.
[0028] The target platform's adaptation rules are used to map skills in the declaration to invocation objects that the platform can load. For example, on a platform using Python modules, skills are mapped to module files and their functions; on a platform using Node.js's CommonJS modules, skills are mapped to module files and their exported functions. Skill identifiers in the workflow remain consistent, the generated invocation configuration uses resource locations and entry points that each platform can recognize, and the loading is completed using the file loading capabilities provided by the existing runtime.
[0029] The temporary isolation zone includes a directory for undeployed versions that are not yet in use and a separate test data directory, which respectively store call configurations and skill resources, and files generated by skill execution. Restoring isolated test data only involves the test data directory. Versions awaiting deployment do not undertake production tasks before activation; their directories use absolute paths that remain unchanged after activation. Activation is completed by switching the reference to this directory in the production entry point.
[0030] The permitted call source is determined by both the declaration requirements and the assembly results. The declaration document provides the skill version, and the assembly results provide the resource location of that version on the target platform. The assembly process first establishes the directory entry and call entry point for the corresponding resource. For skills referenced in the declaration but whose files have not yet been assembled, the already determined target location is retained to identify incomplete resource assembly. For example, if the declaration requires the use of version 2.0 of the record conversion skill, and the target platform places the resource in the skills / convert subdirectory of the directory to be deployed, then the permitted call source is determined by the module file location and version 2.0 in that subdirectory. An existing version 1.0 with the same name on the platform is not considered a permitted call source.
[0031] In step S2, deterministic testing is performed on the version to be deployed. After passing this test, large-model-driven end-to-end testing is executed, generating skill call records. The deterministic test uses pre-defined skills and inputs provided in the declaration document, executes through the target platform's skill call entry point, and compares the results with the expected results. For example, after providing a record of input for a conversion skill, the output fields and corresponding expected values are checked; the test is considered passed only if the necessary resources are loaded normally, the skill executes normally, and all checks are completed and meet expectations. Existing resources with the same name on the platform may also produce expected outputs; the actual call source is verified in step S3.
[0032] After the deterministic test passes, the end-to-end test provides the task input from the interactive test cases to the agent. A large model with tool invocation capabilities then generates skill invocation instructions based on the workflow and session context. The skill identifier and input parameter description corresponding to the skill entry point are provided to the large model along with the workflow. The target platform obtains the skill identifier and parameter values from the model output, locates the invocation entry point, passes in the parameters for execution, and then adds the returned result to the session for the model to generate subsequent instructions. Acceptance criteria are provided with the declaration document, such as the processed records matching the given expected content and a report already generated containing the corresponding records. The acceptance procedure checks the actual results based on these criteria.
[0033] The target platform generates a skill call record during parsing and execution, saving the skill identifier, input, actual source, and return result of each call, arranged in the actual call order. Input is saved in a form that allows the original parameter values to be recovered, such as serializing strings and arrays, and associating the input file with isolated test data saved before the call, so that the original input can be retrieved when the call is repeated.
[0034] In one specific implementation, the session context uses a message list stored in the order of generation, and the large model generates skill invocation instructions based on this list. After the target platform executes the skill, it writes the return value as a result message to the list and saves the position of the message in the corresponding invocation record. In the event of a source anomaly, this position is used as the starting point for deleting the session context.
[0035] The deployment program saves the session context and isolated test data before each skill invocation and associates the saved content with the corresponding invocation record. During saving, it copies the current message list and isolated test data directory, including test input files and files already written by previous invocations and still read by subsequent invocations; temporary variables used across invocations are also saved as data within the directory. The scope of saving does not include skill invocation configurations or runtime invocation bindings.
[0036] For example, if file reading has been completed before the conversion call, the saved session context contains the reading results and the conversion instructions to be executed, while the isolated test data contains the data to be converted after reading. If a report has been generated in a subsequent call, when restoring this saved content, the report file that did not exist before the conversion call will also be removed.
[0037] In step S3, based on the skill call record, the verification information of the actual call source and the corresponding allowed call source are compared, and calls that are inconsistent are judged as having abnormal sources. In one specific implementation, the verification information includes resource location and version identifier. The version identifier of the allowed source is taken from the declaration document, and the resource location is determined according to the assembly result of the resource specified in the declaration; the verification information of the actual source is obtained from the resource actually parsed by the target platform, and then the two sets of verification information are compared item by item.
[0038] The resource location uses the absolute path of the actual file containing the skill module, and the version identifier uses the version declared in the version information accompanying the resource. Before comparison, the paths are uniformly converted to absolute paths that the target platform can recognize, and compared according to the platform's path case rules. The version identifier is then checked against the declared value item by item. When using path links pointing to other files, the module file location that the link ultimately points to is used as the comparison object.
[0039] The actual source information is obtained when the skill resource is loaded and used on the platform. For example, on a platform using Python modules, the resource location can be obtained from the file location information of the actual module object; on a platform using Node.js's CommonJS modules, the resource location can be obtained from the file information of the actual loaded module, and the version can be read from the corresponding resource. For cached call objects, the call binding retains the source information obtained when the object was created, and this information is written to the call record during execution.
[0040] If the resource location and version identifier of both the actual call source and the corresponding allowed call source have been obtained, the two pieces of information are compared item by item. If they are consistent, the source is determined to be consistent; if any item is inconsistent, the source is determined to be abnormal. If the necessary verification information cannot be obtained, the end-to-end test will not pass acceptance, and the version to be deployed will be prohibited from being enabled and the temporary isolation area will be cleaned up in accordance with S7.
[0041] In step S4, for each abnormal call, the actual call source is blocked in the temporary isolation area, and the corresponding call binding in the runtime cache is cleared; the session context and isolation test data before the call are restored, and the corresponding skill is called again using the input recorded in the call.
[0042] Source anomalies may be caused by incorrect source selection or incomplete configuration of required resources. The deployment procedure first blocks the erroneous source, then determines the repair action based on the results of re-parsing and invocation. The target platform registers the candidate resource locations corresponding to each skill identifier. During blocking, the resource location and version pointed to by the anomaly record are excluded from the parsing scope of the temporary isolation area, while retaining the original resource files and resource selection of the production instance; after unblocking, the source resumes participation in parsing.
[0043] The runtime instance uses skill identifiers as indexes to store callable objects, their resource locations, and versions in the runtime cache, forming a binding between skill identifiers and the actual invocation source. After the actual source is hidden, the corresponding skill identifier entry is deleted, and the callable object reference stored in the entry is released. When the skill is invoked again, the invocation source is re-resolved.
[0044] During re-parsing, the platform searches for resources whose location and version match the allowed sources among the candidate resources for the skill that are not blocked. If found, the resource is loaded, and the original call input is executed from its actual entry point to obtain the actual source information. If the corresponding resource is found but loading fails, this test is marked as failed, and the deployment version is disabled and the temporary isolation area is cleaned up according to S7. If no resource matching the verification information is found after checking the corresponding candidate positions registered with the target platform, proceed to S5 to verify the assembly status according to the declaration document and supplement the corresponding skill resources.
[0045] Before executing the re-invocation, suspend subsequent skill invocations for this test, restore the saved message list to the current session, and replace the current isolation directory content with the saved test data. After restoration, retrieve the original parameter values from the corresponding invocation record and hand them over to the re-parsed skill for execution. This invocation is only used to determine the repair action; when starting the S6 retest, restore the corresponding test start state.
[0046] When multiple abnormal source records exist in the basic implementation, the pre-call state and original input associated with each record are used to perform the above processing and S5 repair actions for the corresponding skill. Each processing step retains the completed configuration modifications. After all repairs are completed, the modified version to be deployed is retested in S6.
[0047] When using the front-end record retention method, before modifying configurations or supplementing resources, determine the first abnormal call source according to the call order of this test. The configurations for all previous calls must be bound to the corresponding allowed sources, and the configurations, skill resources, and runtime dependencies must remain unchanged before and after the fix. The deployment program verifies the configuration items and file locations to be written in the fix action, checking whether it involves front-end skill configuration files, assembled resources, or runtime dependencies, including shared dependencies used by the front-end.
[0048] For example, if the reading skill is already bound to the reading module in this assembly, the repair only modifies the entry point of the conversion skill and does not rewrite the reading module or its dependent files, thus preserving the record of the reading call; if supplementing resources requires replacing the dependency that the reading skill is also using, then the condition for pre-processing record preservation is not met, and the end-to-end test should be re-executed from the test starting point according to the basic implementation method.
[0049] When verifying using a new running instance, while shielding the actual source, each shielding operation and its corresponding source are recorded in chronological order. Subsequent shielding operations applied in the temporary isolation zone during this anomaly handling are then lifted in reverse order, while production source controls outside the temporary isolation zone remain unchanged.
[0050] In step S5, if the actual calling source that is re-called is consistent with the verification information of the corresponding allowed calling source, then the calling configuration is modified to bind the allowed calling source; if no skill resource whose verification information is consistent with the verification information of the corresponding allowed calling source is parsed, then the corresponding skill resource is supplemented according to the declaration document.
[0051] When re-invoking a source that is allowed, the entry point of the skill invocation configuration will be explicitly pointed to the resource location of that source, while retaining the declared required version. The configuration is saved to the directory of the version to be deployed, and subsequent instances will establish invocation bindings from this configuration. For example, after disabling the original 1.0 version and clearing the conversion binding, if the platform successfully executes the original input from the 2.0 version module installed this time, the conversion skill entry point will be changed to the absolute path of that module and the corresponding exported function.
[0052] When no resource matching the verification information is found, the deployment program checks the file and its accompanying version information at the target location based on the resource address and version in the declaration document. If the file is missing or the required version has not yet been installed, the corresponding resource is obtained from the declaration address, the version is verified, and the resource is installed in the temporary isolation area, generating the call entry point required by the target platform. After the missing information is completed, the verification information of the allowed source is updated with the actual resource location and the version identifier in the declaration, and the call configuration is bound to that source. If the original location is occupied by other resources, the installation location is determined separately in the temporary isolation area, and the version baseline is maintained according to the declaration requirements.
[0053] For example, if the declaration references the address of version 2.0 of the conversion skill, but the module does not yet exist in the deployment directory, blocking the existing version 1.0 will prevent the acquisition of allowed sources. The deployment program retrieves the version 2.0 resource according to the declaration reference, installs it, and records its actual location along with the version 2.0 in the declaration as allowed sources, then modifies the call configuration. If the declared address cannot retrieve the resource or the retrieved version is inconsistent, the missing information will be filled in, and the version to be deployed will not be enabled.
[0054] In step S6, after modifying the call configuration or supplementing the skill resources, re-execute the deterministic test and end-to-end test. The retest uses the modified configuration and resources as the object, performs the check using the original deterministic test input, and only proceeds with the end-to-end test after passing the check. The above tests should be repeated whenever the configuration or resources are modified again.
[0055] The basic implementation starts with the initial session and isolated data specified in the interaction test cases, and re-completes the workflow. If the conditions for retaining previous records are met, then the records before the first abnormal source call are retained, the content in the session context before modification starting from the position where the return result of that call was written is deleted, and the skill call instructions generated based on the deleted content but not yet executed are canceled, and the test continues from the first abnormal source call.
[0056] Figure 2 The diagram shows the correspondence between the records before modification and the subsequent records. Records that meet the retention criteria continue to participate in acceptance testing; after restoring the state before the first abnormal call, the re-call record and the new subsequent record will be appended sequentially after the retained records. The first abnormal record and the original subsequent records will not participate in the post-repair acceptance testing but can be retained separately for fault verification.
[0057] During recovery, the saved content associated with the first abnormal call record is used to restore the session context and isolation test data before the call. Then, the corresponding skill is re-called using the original input from the record. After the verification information of the actual source matches the allowed source, the new return result is written to the session. The large model then combines the updated session and workflow to regenerate and execute subsequent instructions. For example, if the old transformation result has already put a report instruction into the execution queue, the instruction is canceled, and a report instruction is generated based on the new transformation result; if the report has already been generated, its writing effect is reversed by restoring the isolation data.
[0058] The acceptance procedure, based on the skill call records and corresponding sessions after the connection, combined with the test results generated by the skill, determines whether the workflow is complete according to the acceptance conditions in the declaration document, and re-determines the source anomaly for each call in the record. If a re-call fails to obtain an authorized source or the connection acceptance fails, the S7 activation conditions are not met.
[0059] like Figure 3 As shown, after the modifications are completed and the deterministic test passes, before re-executing the end-to-end test, the blocking operations recorded in S4 are unblocked one by one in reverse order. The original source files and registration locations are restored to a state where they can be discovered by the platform, and the system re-participates in skill analysis. The configuration modifications completed in S5 are retained.
[0060] After the blocking is lifted, a new running instance is launched in the temporary isolation zone according to the modified calling configuration, and the skills are re-resolved from the allowed sources and the original actual sources that have been unblocked. The new instance can use a new execution process. At startup, the binding table of skill identifiers to callable objects has not yet been established. Subsequently, it establishes its own binding according to the explicit entry point in the configuration, without copying the binding table and callable objects of the source exception handling instance.
[0061] Before executing the first source exception call, the new instance loads the recovered session context and isolation test data into the instance. Specifically, after stopping the old instance, the new instance uses the same isolation test directory to restore the saved files to their original paths and loads the saved session messages, ensuring that the file paths and other parameter values in the original call input remain unchanged.
[0062] The new instance re-executes the first source exception call with the original input, then generates and executes subsequent skill calls based on the new return result, appending the actual generated records to the retained preceding records. Record continuation is based on... Figure 2 The relationship shown is accepted, and the end-to-end test results and the source anomaly judgment results are used together to enable the judgment.
[0063] In a further implementation, the declaration document also records interaction test cases. After the continuation acceptance is passed and there are no source anomalies, but before the enable determination, the session context and isolation test data of the new instance are initialized according to the test cases. Then, the entire workflow is executed according to the test input, and the end-to-end test result is determined according to the corresponding acceptance conditions. In addition to the aforementioned conditions, the enable determination also requires that the fully executed test pass and that there are no source anomalies in its call records.
[0064] During the initialization of a complete test, the sessions and data generated by the subsequent tests are replaced with the start messages and data of the interactive test cases. Then, all calls are executed from the starting point of the workflow, and call records and acceptance results are saved separately for this execution.
[0065] In step S7, if the most recent deterministic test and end-to-end test of the same version to be deployed are completed and passed, and there is no source anomaly in the end-to-end test, the version to be deployed is enabled by transaction commit; otherwise, the temporary isolation zone is cleaned up and enabled is prohibited.
[0066] The deployment version is determined by the call configuration and skill resources to be used in this deployment. Before activation, the deployment program verifies the completion status and results of the most recent deterministic test and end-to-end test for this version, and verifies the call source determination of the corresponding end-to-end test. When using continuous verification, the continuous acceptance results are used. When using additional complete tests, it must also be confirmed that the complete test passed and there are no source anomalies.
[0067] In one specific implementation, the production entry point obtains the agent directory through the currently enabled version record in the database. The configuration and resources of the version to be deployed remain unchanged after testing, and the directory is not moved when it is enabled. When the production entry point accepts a task, it reads the already submitted current version directory and uses the configuration and resources within the directory in the task. Instances of different versions establish call bindings independently according to their respective version configurations.
[0068] The transaction commits to the currently enabled version record in the database. Once the test conditions are met, the deployment program updates the record with the accepted version directory within the transaction. After the commit takes effect, the production entry point is for new tasks to read this directory; before the commit, the original version directory is still read.
[0069] The above transactions can be implemented using a database that supports commit and rollback, such as SQLite. If the commit fails, the incomplete transaction is rolled back, preserving the original enabled version record. When cleanup is needed, first stop the current test instance, remove the shielding applied in the temporary isolation zone, and then delete any unenabled files to be deployed and isolated test data. The cleanup scope does not include the original version still in use at the production entry point. After a successful commit, the version to be deployed is re-enabled, and its resource directory is retained.
[0070] The following describes the complete process using a file processing scenario. For example, the declaration document specifies that reading, conversion, and report generation are performed sequentially, and the interaction test cases require the report record to be consistent with the given expected content. The reading and reporting skills are correctly configured, the conversion skill requires version 2.0, but a version 1.0 with the same name also exists on the platform, and the conversion binding of the running instance points to version 1.0. Assuming that both versions can generate content that meets the acceptance criteria for a given input, the functional tests cannot distinguish which version is actually being used.
[0071] In the initial test, the read call used the resources currently being assembled, but the conversion call used the original version 1.0. Subsequent reports might still pass content checks. The deployment program retrieved the location and version 1.0 of the original module from the conversion call record, compared it with the location and version 2.0 of the allowed sources, and determined that the conversion call was the first abnormal source call. The read configuration is already bound to allowed sources, and the fix does not involve the read skill or its dependencies, therefore the read record can be retained.
[0072] The deployment program masks the actual source of version 1.0 and removes the transformation binding, restores the session and test directory to their state before the transformation call, and then retrieves the original input and calls it again. If version 2.0 is already installed, the re-call can use the allowed source, and the transformation configuration is then explicitly bound to that entry point; if version 2.0 is not yet installed, re-resolution fails to obtain the required resources, and the deployment program obtains the version according to the declared address and completes the installation and binding. After fixing both scenarios, deterministic tests are re-executed.
[0073] After the deterministic test passes, delete the session content from the original conversion result onwards, cancel the pending report instructions generated based on that content, restore the test state before the conversion call, and then unblock the records in reverse order. Start a new instance with the modified configuration and load the restored session and data. At this point, version 1.0 can still be discovered by the platform, but the new instance completes the conversion according to the version 2.0 entry specified in the configuration, and regenerates and executes the report call based on the new result. The processing relationship of each call record is shown in the table below.
[0074]
[0075] After the retained records are connected to the transformation and report records in the new instance, the acceptance procedure verifies the report content and compares the actual source with the allowed source for each record. When using additional full tests, the instance is initialized according to the interactive test cases, and the reading, transformation, and report generation are fully executed. After all applicable acceptance conditions are met, the currently enabled version record is switched through transaction commit; if the conditions are not met, the version is disabled and its temporary isolation area is cleaned up.
[0076] This application also provides an AI intelligent agent cross-platform automatic assembly and deployment system for implementing the above method, including a memory and a processor. The memory stores the computer program, and when the processor reads and executes the program, it completes assembly, testing, source anomaly handling, and activation control according to S1 to S7 and corresponding implementation methods. The call records formed during execution and the saved test states can be stored in the memory, and each processing action can be executed by the same processor.
[0077] The system can be installed in a server or other electronic device with a processor and memory. The computer program can also be stored in a computer-readable storage medium, which is then read by the electronic device to execute the above method. The electronic device and storage medium follow the aforementioned processing flow, and their skill source determination, test results, and activation conditions are consistent with the corresponding method implementation methods.
[0078] The foregoing has provided a detailed description of the AI intelligent agent cross-platform automatic assembly and deployment method, system, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. An AI agent cross-platform automatic assembly deployment method, characterized in that, include: Parse the declaration document, assemble the intelligent agent in the temporary isolation area according to the workflow and skill resource sources in the document and the adaptation rules of the target platform, generate the version to be deployed, and determine the allowed call sources of each skill based on the declaration document and the assembly results; Perform deterministic testing on the version to be deployed. After passing the test, perform end-to-end testing driven by a large model and generate skill call records. Based on the skill call records, the verification information of the actual call source and the corresponding allowed call source are compared, and inconsistent calls are judged as abnormal sources; For each call with an abnormal source, the actual call source is blocked in the temporary isolation area, and the corresponding call binding is cleared from the runtime cache. Restore the session context and isolated test data prior to the call, and use the input recorded in this call to re-call the corresponding skill; If the actual call source is consistent with the verification information of the corresponding allowed call source, then modify the call configuration to bind the allowed call source; If no skill resource whose verification information matches the verification information of the corresponding allowed call source is found, then the corresponding skill resource is supplemented according to the aforementioned declaration document; After modifying the call configuration or supplementing the skill resources, re-execute the deterministic test and end-to-end test; If the most recent deterministic test and end-to-end test of the same version to be deployed have been completed and passed, and the end-to-end test does not contain the aforementioned source anomaly, then the version to be deployed is enabled by transaction commit; otherwise, the temporary isolation zone is cleaned up and enabled is prohibited.
2. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 1, characterized in that: In the end-to-end test, the large model generates skill call instructions based on the session context, writes the return results of each skill call into the session context, and records the writing position in the corresponding skill call record; Before modifying the call configuration or supplementing the skill resources, determine the first abnormal call source according to the call order of this test; the call configuration of each skill call before this call is bound to the corresponding allowed call source, and its call configuration, skill resources and runtime dependencies remain unchanged before and after the modification; When retesting, retain the skill call records before the first abnormal source call, delete the content in the session context of the test before modification starting from the position where the return result of that call was written, and cancel the skill call instructions generated based on the deleted content that have not yet been executed; Restore the session context and isolated test data from before the call, and re-call the corresponding skill using the original call input; When the verification information of the actual call source and the corresponding allowed call source are consistent, the returned result is written into the session context, and the large model combines the updated session context and the workflow to regenerate and execute the subsequent skill call instruction; The re-call and subsequent skill call records are appended to the retained records in the order of the calls. Based on the appended records and the corresponding session context, the end-to-end test results are determined according to the acceptance conditions specified in the declaration document, and the source anomaly determination is performed on each call in the appended records.
3. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 2, characterized in that: When the actual call source is blocked in the temporary isolation zone, the blocking operation and the corresponding actual call source are recorded; Before re-executing end-to-end testing on the modified version to be deployed, unblock the code in reverse order of the blocking operations, so that the actual source of the blocked call can re-participate in the skill analysis. Based on the modified call configuration of the version to be deployed, start a new running instance in the temporary isolation zone; The running instance re-parses the skill based on the call configuration, and does not use the call binding in the runtime cache used during the source exception handling process; In the running instance, the re-invocation of the first source anomaly call and subsequent skill calls are performed. The skill call records of each call in the running instance are appended to the retained skill call records. The end-to-end test results and source anomaly determination results determined based on the appended skill call records are used for the activation determination of the version to be deployed.
4. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 1, characterized in that: The verification information includes resource location and version identifier; In the verification information of the allowed call source, the version identifier is taken from the declaration document, and the resource location is determined according to the assembly result of the skill resource specified in the declaration document; The verification information of the actual call source is obtained from the skill resources actually parsed from the target platform, and compared item by item with the verification information of the corresponding allowed call source.
5. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 4, characterized in that: The runtime cache records the correspondence between skill identifiers and actual call sources in the call binding records. After blocking the actual call source, the call binding of the corresponding skill identifier in the runtime cache is deleted, and the call source is re-parsed when the corresponding skill is called again.
6. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 4, characterized in that: When replenishing the corresponding skill resources, the resource configuration status is checked according to the resource address and version identifier recorded in the declaration document, and the corresponding skill resources that have not yet been configured are obtained and configured into the temporary isolation area. Once the missing information is obtained, the verification information of the corresponding allowed call source is updated according to the location of the corresponding skill resource and the version identifier recorded in the declaration document, and the call configuration of the corresponding skill is bound to the allowed call source.
7. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 2, characterized in that: Before each skill call in the end-to-end test, the session context and isolated test data are saved, and the saved content is associated with the corresponding skill call record; When restoring the state prior to the first abnormal call, the saved content associated with that call record is used to restore the session context and isolation test data.
8. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 3, characterized in that: Before the running instance executes the first source exception call, the recovered session context and isolation test data are loaded into the running instance.
9. The AI intelligent agent cross-platform automatic assembly and deployment method according to claim 8, characterized in that: The declaration document records the interactive test cases; After the end-to-end test based on the subsequent skill call records passes and there is no source anomaly, before the activation determination of the version to be deployed is made, the session context and isolation test data of the running instance are initialized according to the interaction test cases; Based on the test input of the interactive test cases, the workflow is fully executed in the running instance, and the end-to-end test result is determined according to the corresponding acceptance criteria. The activation determination also requires that the complete end-to-end test be passed and that there is no source anomaly in the skill call record of the end-to-end test.
10. A system for implementing the AI agent cross-platform automatic assembly deployment method of any one of claims 1 to 9, characterized in that, Including memory and processor; The memory stores a computer program, and when the processor executes the computer program, it implements the method.
Citation Information
Patent Citations
Intelligent agent processing method and device, equipment, medium and product
CN122018926A
