An eight-stage closed-loop-based agent life cycle management method and system

By employing an eight-stage closed-loop management method and adaptive optimization, the problem of fragmented development and operation processes for intelligent agents is solved, achieving efficient and low-cost management and optimization of intelligent agents.

CN121436020BActive Publication Date: 2026-06-05北京开放传神科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京开放传神科技有限公司
Filing Date
2025-10-31
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, the development, deployment, and operation processes of intelligent agents are fragmented, and there is a lack of a unified framework for end-to-end automated management, resulting in low efficiency and high costs.

Method used

We adopt an intelligent agent lifecycle management method based on an eight-stage closed loop, including the stages of Prompt, Code, Build, Test, Release, Deploy, Operate, and Retrain. Through an adaptive closed-loop mechanism and a declarative workflow orchestration mechanism, we achieve a complete closed loop from requirement input to runtime feedback. This is further optimized by combining intelligent programming tools and a game theory framework.

Benefits of technology

It achieves a high degree of automation in the development and optimization of intelligent agents, significantly improving efficiency, reducing R&D and maintenance costs, and ensuring continuous improvement in system performance through adaptive optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121436020B_ABST
    Figure CN121436020B_ABST
Patent Text Reader

Abstract

An eight-stage closed-loop-based agent life cycle management method and system. The method comprises: determining eight sequentially connected life cycles of an agent; implementing a Prompt stage to receive and analyze target functional requirements; implementing a Code stage to perform automated programming and create implementation code that meets the target functional requirements; implementing a Build stage to integrate the code generated in the Code stage into a target agent that can run; implementing a Test stage to perform automated simulation and evaluation of the target agent's non-deterministic behavior; implementing a Release stage to release the target agent and perform pre-deployment checks; implementing a Deploy stage to deploy the target agent to a target running environment; implementing an Operate stage to continuously detect the running state of the target agent; and implementing a Retrain stage to optimize the large language model relied on by the target agent based on the running data collected in the Operate stage, and apply the improved large language model to the Prompt stage to drive a new round of development and optimization cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence operation and maintenance technology, and in particular to an intelligent agent lifecycle management method and system based on an eight-stage closed loop. Background Technology

[0002] With the rapid development of artificial intelligence technology, agents based on large language models (LLMs) have become core tools for automating complex tasks. These agents can understand, reason, and act based on natural language instructions, and can complete complex tasks through tool calls and environmental interactions.

[0003] Currently, the development, deployment, and operation processes of intelligent agents are fragmented. The stages of intelligent agent conception, code generation, testing, deployment, and operation optimization are disconnected from each other, and there is a lack of a unified framework for end-to-end automated management.

[0004] Therefore, how to provide a technical solution that can cover the entire life cycle of an intelligent agent and achieve high automation and adaptive optimization is a key research topic for those skilled in the art. Summary of the Invention

[0005] Firstly, this application provides an intelligent agent lifecycle management method based on an eight-stage closed loop. The method includes: determining the entire lifecycle of the intelligent agent, which includes eight sequentially connected stages: a Prompt stage, a Code stage, a Build stage, a Test stage, a Release stage, a Deploy stage, an Operate stage, and an Iteration and Optimization Retrain stage; implementing the Prompt stage by receiving and parsing unstructured input target functional requirements; implementing the Code stage by performing automated programming based on intelligent programming tools or Code agents to create implementation code for the target intelligent agent that meets the target functional requirements; implementing the Build stage by integrating the code generated in the Code stage into a runnable target intelligent agent; implementing the Test stage by performing automated simulation and evaluation of nondeterministic behavior on the target intelligent agent; implementing the Release stage by releasing the target intelligent agent and performing pre-deployment checks; and implementing the Deploy stage by deploying the target intelligent agent to a target operating environment, including a private cloud, a public cloud, or a hybrid cloud. During the Operate phase, the running status of the target agent is continuously monitored. During the Retrain phase, based on the running data collected during the Operate phase, the core large language model on which the target agent depends is updated and optimized. The improved large language model is then applied to the Prompt phase to drive a new round of development and optimization cycle for the target agent.

[0006] The intelligent agent lifecycle management method based on the eight-stage closed loop provided in this application has for the first time realized a complete closed loop process from demand input to operation feedback and then to continuous optimization. It avoids the problems of fragmentation, disconnect between demand and operation and maintenance, and separation between development and training in traditional systems, which greatly improves the efficiency of intelligent agent development and optimization and reduces the R&D and operation and maintenance costs of intelligent agents.

[0007] Based on the adaptive closed-loop mechanism, telemetry data and user feedback collected during the operation phase can be automatically fed back to the retraining phase. Through adaptive optimization of the Prompt template, the model and agent can be continuously evolved, ensuring that the system performance is continuously improved in the real environment.

[0008] In some possible implementations, prior to implementing the Prompt phase, the method further includes: determining the standardized specifications that the target agent must follow throughout its entire lifecycle; the standardized specifications include: agent specifications, used to describe the capabilities, dependencies, and operational constraints of the target agent in structured data; phase specifications, used to define the execution rules, input / output formats, and quality control protocols for each of the eight phases; and agent execution trajectory AET data recording specifications, used to define the recording standards for the AET data recording model, which is used to record the complete behavioral path, thought chain, and multidimensional confidence score of the agent when performing tasks during the Operate phase.

[0009] By adopting this approach, through defined intelligent agent specifications, stage specifications, and trajectory AET data recording specifications, the electronic device provides a unified access standard for different AI models, tools, and actuators, enabling loosely coupled access for models, toolchains, and actuators from different vendors. This reduces the complexity of system integration, promotes the prosperity and expansion of the technology ecosystem, and protects users' technology investments.

[0010] In some possible implementations, electronic devices employ a declarative workflow orchestration mechanism based on declarative configuration files to link the entire lifecycle of agents and define the workflow of agents at each stage. The definition of the workflow of agents at each stage includes: describing the composition of the agent team at each stage, the role and goal of each agent, the use of tools, and the dependencies between tasks.

[0011] The automated orchestration mechanism reduces the workload of manual script writing and repetitive verification, while the adaptive closed loop shortens the model iteration cycle and reduces related investments, thus significantly reducing the overall R&D and maintenance costs of AI agents.

[0012] In some possible implementations, the automated programming based on intelligent programming tools or coding agents includes: scheduling a team of coding agents to perform collaborative programming; wherein the team of coding agents includes a planning agent, a programmer agent, and a testing agent, wherein the planning agent is used to decompose the target functional requirements into executable coding tasks, the programmer agent is used to generate code based on the coding tasks, and the testing agent is used to generate test cases.

[0013] In this embodiment of the application, the Code phase has its own explicit inputs (requirements from the Prompt phase) and outputs (the generated codebase). The outputs follow the quality gates defined in the phase specification for the Code phase. For example, the generated code must pass basic syntax checks and the test coverage must meet a certain standard before it can enter the next Build phase.

[0014] If a systemic flaw (e.g., insufficient security) is discovered in the AI-generated code during subsequent Test or Operate phases, this feedback data will be fed into the Retrain phase. During Retraining, the feedback data is used to optimize the coding agent itself, for example, by adjusting its code generation strategy through reinforcement learning or by using game theory to make the agent more rigorous in testing the code. This results in higher quality code generated in the next Code phase.

[0015] In some possible implementations, during the Code phase, the thought chains and action chains of the coding agent team during collaborative programming are also recorded into the AET data recording model that follows the AET data recording specification.

[0016] In some possible implementations, updating and optimizing the core large language model upon which the target agent relies based on the runtime data collected in the Operate phase includes: determining a dataset to be optimized based on task samples in the AET data collected in the Operate phase that meet preset conditions, the preset conditions including multidimensional confidence scores lower than preset scores and / or task success rates lower than preset success rates; and inferring one or more agents with deficient back-engineering capabilities based on the defect patterns reflected in the dataset to be optimized, the one or more agents to be optimized including one or more agents from the target agent and auxiliary agents, the auxiliary agent being any agent other than the target agent that is invoked at any stage of the target agent's lifecycle. Another intelligent agent; executes an adversarial game loop, schedules the main intelligent agent to generate candidate outputs of reference test cases, and schedules a critique agent to review the candidate outputs, driving the main intelligent agent to perform multiple rounds of iterative correction until a quality threshold is met or the maximum number of iterations is reached. The main intelligent agent belongs to the intelligent agent to be optimized. The reference test cases are coded test cases specifically generated based on the defect patterns reflected in the dataset to be optimized. Collect game data from the adversarial game loop, and solve for a first equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques. The first equilibrium solution is used to indicate the optimal strategy for the main intelligent agent to handle the task. Transform the first equilibrium solution into reward signals and / or gradient constraints to update the parameters of the large language model and / or optimize the prompt word template.

[0017] This approach utilizes a game theory framework to achieve adversarial optimization and equilibrium convergence among multiple agents, thereby enhancing their robustness, generalization, and multi-objective equilibrium performance in complex environments.

[0018] In some possible implementations, after inferring the deficient capabilities of one or more agents to be optimized based on the defect patterns reflected in the dataset to be optimized, the method further includes: executing a cooperative game loop, scheduling agents with different functions to collaborate in completing a reference test task, calculating the marginal contribution value for each agent based on a coalition game model after the task is completed, and allocating reward or penalty signals based on the marginal contribution value of each agent, wherein the agents with different functions belong to the agents to be optimized; collecting game data from the cooperative game loop, solving for a second equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques, wherein the second equilibrium solution is used to indicate the contribution reward share of the agents with different functions; and converting the second equilibrium solution into a reward signal for reinforcement learning to improve the capabilities of each agent in the large language model, and / or optimize the prompt word template.

[0019] By adopting this approach and through the aforementioned game theory mechanism, the agent optimization process combines adversarial challenges, enhanced cooperation, and equilibrium convergence, enabling the agent to continuously achieve performance improvements and enhanced robustness in real-world environments.

[0020] In some possible implementations, the method further includes: during the Retrain phase, collecting user feedback data, training a reward model, and updating the target agent's strategy using reinforcement learning techniques based on the reward model to make the target agent's behavior more in line with user preferences; and / or, during the Retrain phase, the target agent uses its own execution trajectory AET data to perform retrospective analysis, identify logical loopholes and inefficient steps in the thought chain and / or action chain, and actively correct these defects in subsequent task execution to form a self-iterative optimization loop.

[0021] This approach, based on rapid optimization through feedback and self-correction of a single agent, further enhances the robustness, generalization, and multi-objective balance of the agent in complex environments.

[0022] In some possible implementations, the automated simulation and evaluation of the nondeterministic behavior of the target agent includes: using an LLM as the evaluator to automatically score the output of the target agent based on predefined evaluation criteria to obtain a first LLM score, wherein the evaluation dimensions of the evaluation criteria include two or more of accuracy, factuality, tone, and security; and / or, generating a multidimensional confidence score for each output of the target agent, wherein the evaluation dimensions of the multidimensional confidence score include two or more of factual accuracy, tool applicability, and compliance; before implementing the Release phase, the method further includes: determining whether to trigger the Release phase based on the LLM score and / or multidimensional confidence score of the target agent in the Test phase.

[0023] In some possible implementations, the continuous detection of the target agent's operating status includes: automatically triggering a manual intervention mechanism when it is determined that there is an operating status that meets preset risk control conditions. The preset risk control conditions include: the operating quality of the target agent is lower than the quality control threshold set in the stage specification corresponding to the Operate stage, and / or the multidimensional confidence score of the target agent's output content is lower than a preset score.

[0024] This approach ensures that while pursuing the autonomy of intelligent agents, quality risk control is strengthened, and ultimate human control and accountability are preserved.

[0025] Secondly, this application also provides an intelligent agent lifecycle management system based on an eight-stage closed loop. The system includes: an intelligent agent lifecycle management module, configured to standardize the intelligent agent's lifecycle into eight sequentially connected stages: Prompt stage, Code stage, Build stage, Test stage, Release stage, Deploy stage, Operate stage, and Iteration and Optimization Retraining stage; a prompt parsing module, used to implement the Prompt stage, receiving and parsing the target functional requirements of unstructured input; and an encoding module, used to implement the Code stage, based on intelligent... The system includes: a programming tool or coding agent for automated programming to create implementation code for a target intelligent agent that meets the target functional requirements; a build module for implementing the Build phase, integrating the code generated in the Code phase into a runnable target intelligent agent; a test module for implementing the Test phase, automating simulation and evaluation of the nondeterministic behavior of the target intelligent agent; a release module for implementing the Release phase, releasing the target intelligent agent and performing pre-deployment checks; a deployment module for implementing the Deploy phase, deploying the target intelligent agent to a target runtime environment, including a private cloud, public cloud, or hybrid cloud; an operation module for implementing the Operate phase, continuously monitoring the running status of the target intelligent agent; and an iteration and optimization module for implementing the Retrain phase, updating and optimizing the core large language model on which the target intelligent agent depends based on the running data collected in the Operate phase, and applying the improved large language model to the Prompt phase to drive a new round of development and optimization cycle for the target intelligent agent.

[0026] Thirdly, this application also provides an agent lifecycle management device based on an eight-stage closed loop, including a unit for executing any of the agent lifecycle management methods based on an eight-stage closed loop in the first aspect.

[0027] Fourthly, this application also provides a computer storage medium that can store multiple instructions, which are adapted to be loaded and executed by a processor using any one of the intelligent agent lifecycle management methods based on an eight-stage closed loop in the first aspect.

[0028] Fifthly, embodiments of this application also provide a computer program product containing instructions, which, when run on an electronic device, causes the electronic device to execute any one of the intelligent agent lifecycle management methods based on an eight-stage closed loop as described in the first aspect.

[0029] In a sixth aspect, embodiments of this application also provide a chip module, including a transceiver component and a chip, wherein the chip is used to execute any of the intelligent agent lifecycle management methods based on an eight-stage closed loop as described in the first aspect.

[0030] It is understood that the above-described intelligent agent lifecycle management system, device, computer storage medium, computer program, computer program product, and chip system based on the eight-stage closed loop are all used to execute the method shown in any implementation of the first aspect of the embodiments of this application. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the method flow of an intelligent agent lifecycle management method based on an eight-stage closed loop provided in an embodiment of this application;

[0032] Figure 2 This is a schematic diagram of an eight-stage closed-loop intelligent agent lifecycle management system provided in an embodiment of this application;

[0033] Figure 3 This is a schematic flowchart of a method for an internal intelligent agent loop provided in an embodiment of this application;

[0034] Figure 4 This is a schematic diagram of a method flow for an external operating cycle provided in an embodiment of this application;

[0035] Figure 5 This is a schematic diagram of an intelligent agent lifecycle management system based on an eight-stage closed loop, provided in an embodiment of this application.

[0036] Figure 6 This is a schematic diagram of another intelligent agent lifecycle management system based on an eight-stage closed loop provided in the embodiments of this application;

[0037] Figure 7 This is a schematic diagram of another intelligent agent lifecycle management device based on an eight-stage closed loop provided in this application embodiment. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described below in conjunction with the accompanying drawings.

[0039] Please see Figure 1 , Figure 1 A flowchart illustrating an eight-stage closed-loop intelligent agent lifecycle management method provided in this application embodiment. Figure 1 As shown, the agent lifecycle management method based on an eight-stage closed loop includes the following steps:

[0040] S101, Electronic devices determine the entire lifecycle of the intelligent agent.

[0041] In this embodiment, the entire lifecycle of an intelligent agent includes eight sequentially connected stages: Prompt, Code, Build, Test, Release, Deploy, Operate, and Retrain. As an example, a declarative workflow orchestration mechanism can be used to define and connect the entire lifecycle of the intelligent agent.

[0042] In this embodiment of the application, each cycle in the eight-stage closed-loop lifecycle of the intelligent agent and its corresponding meaning are as follows: Figure 2 As shown.

[0043] The Prompt phase is used to receive and parse the target functional requirements of unstructured input.

[0044] The coding phase is used for automated programming based on intelligent programming tools or Code agents to create implementation code for the target agent that meets the target functional requirements.

[0045] The Build phase is used to integrate the code generated in the Code phase into a target intelligent agent that can run.

[0046] The Test phase is used to automatically simulate and evaluate the nondeterministic behavior of the target agent obtained in the Build phase, ensuring its reliability and performance in different scenarios.

[0047] The Release phase is used to package and release the target agent and perform pre-Deploy checks;

[0048] The Deploy phase is used to deploy the target agent prepared in the Release phase to the target runtime environment, which may include private cloud, public cloud, or hybrid cloud deployment.

[0049] During the Operation phase, the target intelligent agent's operational status is continuously monitored, and one or more of the following are collected: user interaction data, system logs, and performance metrics.

[0050] The iteration and optimization (Retrain) phase is used to update and optimize the core large language model (LLM) on which the target agent depends using the data collected in the Operate phase. The improved LLM is then applied to the Prompt phase to drive a new round of development and optimization cycle for the target agent.

[0051] In the embodiments of this application, the target intelligent agent can be an independent intelligent agent or an intelligent agent team containing at least two intelligent agents. The at least two intelligent agents can be understood as intelligent agents with different sub-business functions. The intelligent agent team can complete the target functional requirements through collaboration.

[0052] In some possible implementations, after step S101, the electronic device further determines the standardized specifications that the target intelligent agent must follow throughout its entire lifecycle; the standardized specifications include:

[0053] 1) AgentSpec, used to describe the capabilities, dependencies, and operational constraints of the target agent in structured data. As an example, the fields, field types, and meanings contained in the structured data of AgentSpec are shown in Table 1 below.

[0054] Table 1

[0055]

[0056] 2) StageSpec, which defines the execution rules, input / output formats, and quality control protocols for each of the eight stages mentioned above.

[0057] As an example, the execution rules, input / output formats, and related fields, field types, and field meanings of any stage defined in StageSpec are shown in Table 2 below.

[0058] Table 2

[0059]

[0060] For example, the actions performed in the StageSpec during the Test phase may include: generating unit tests, running test cases, and generating test reports.

[0061] 3) Agent Execution Trace (AET) Data Recording Specification: This specification defines the recording standards for the AET data recording model. The AET data recording model records the complete behavioral path, thought process chain, and multi-dimensional confidence score of each agent (including the target agent and the assistant agent) when performing a task. The assistant agent is any agent other than the target agent invoked by the electronic device at any stage of the target agent's eight-stage lifecycle described above. For ease of description, the target agent and the assistant agent are collectively referred to as "agent" below.

[0062] In this application embodiment, the technical specification of the AET data model aims to provide an intelligent agent with a universal, flexible, and widely adoptable recording standard. As an example, the fields, field types, and field meanings of the data content recorded by the AET recording specification are shown in Table 3 below.

[0063] Table 3

[0064]

[0065] S102, the electronic device executes an internal agent loop, including the Prompt, Code, Build, and Test phases.

[0066] In this embodiment, the agent lifecycle is further divided into an internal agent cycle and an external agent cycle based on environmental factors. The internal agent cycle takes place in an isolated, controlled development and testing environment to ensure the target agent has reliability and security before entering the production environment, including the Prompt, Code, Build, and Test phases. The external agent cycle takes place in a real, unpredictable production environment. The internal agent cycle is used to rapidly iterate and verify agent behavior in a controlled environment, including the Release, Deploy, Operate, and Retrain phases.

[0067] In some possible implementations, such as Figure 3 As shown, the internal agent loop includes:

[0068] S1021, Implement the Prompt phase, receive and parse the target functional requirements of unstructured input.

[0069] During this Prompt phase, users express their business needs or intentions through text input, and electronic devices use LLM to recognize and parse the unstructured input business function requirements.

[0070] In some possible implementations, during the Prompt phase, the electronic device also assetizes the prompts. Specifically, the prompts, roles, and goals used to define agent behavior (functional requirements) are treated as core software assets. These assets are stored in structured files (e.g., prompt.yaml or agent_config.json) and managed using a Git version control system.

[0071] S1022, Code Implementation Phase: In this phase, intelligent programming tools or code agents are scheduled to perform automated programming, creating implementation code for the target agent that meets the target functional requirements.

[0072] For example, an electronic device coordinates a team of coding agents to collaboratively program and create implementation code for a target agent that meets the desired functional requirements. This coding agent team includes a planning agent, a programmer agent, and a testing agent. The planning agent breaks down the functional requirements into executable coding tasks, the programmer agent generates code based on these tasks, and the testing agent generates test cases.

[0073] Optionally, the planning agent, programmer agent, and test agent in this coding agent team can be coding agents in the LLM model, or they can be custom coding agents.

[0074] In some possible implementations, collaboration between coding agent teams can also be managed through a graph-based orchestration engine (such as LangGraph).

[0075] In some possible implementations, during the code phase, the thought processes and action chains of the coding agent team during collaborative programming are also recorded in the AET data recording model. This data makes the entire code generation process interpretable and auditable, facilitating manual review and subsequent optimization.

[0076] In some possible implementations, this solution uses a declarative workflow orchestration mechanism to define the workflow of intelligent agents based on declarative configuration files. Electronic devices can then invoke the corresponding intelligent agent teams to execute tasks at each lifecycle stage based on the workflow defined in the declarative configuration file. This approach decouples the workflow definition from the underlying implementation, allowing non-technical personnel to influence process behavior by modifying configuration files without altering the core code.

[0077] Specifically, this declarative configuration file describes the composition of the agent team at each stage, the role and goals of each agent, the tools used, and the dependencies between tasks. For example, this declarative configuration file describes the composition of the coding agent team (planning agent, programmer agent, and testing agent) in the Code stage, its goals (based on the functional requirements of the Prompt stage, collaboratively completing the tasks of generating code, building, and testing a target agent), and the development team's workflow (the planning agent decomposes tasks, then the programmer agents write modules in parallel, and finally the testing agent generates test cases and evaluates them). Understandably, electronic devices implementing corresponding actions based on this declarative configuration file must also comply with the aforementioned StageSpec.

[0078] In some possible implementations, all external tools and APIs that the agent (including the target agent and the assistant agent) can call are defined through standardized interfaces (such as the OpenAPI specification), and the definition information is also associated with version information and stored in a Git repository. This approach ensures that the agent can dynamically discover and invoke tools, while providing a traceable record of tool access.

[0079] Understandably, the cue words may be updated (changed or added) in subsequent iterations and optimizations. Storing cue words in a Git repository allows electronic devices to build a target agent that better meets the expected requirements in the next round of iterations based on accurate cue words.

[0080] S1023, Implement the Build phase, integrating the code generated in the Code phase above into a working target intelligent agent.

[0081] As an example, an electronic device uses containerization technologies such as Docker to package all components of the target agent, including code, models, dependencies, and environment variables. Generally, the electronic device can create a Dockerfile (to define a standard build process), execute the `docker build` command, and encapsulate the code, dependencies, environment variables, and model files into a lightweight, portable container image. For example, the electronic device automates the following steps based on a continuous integration (CI) pipeline (e.g., triggered by Jenkins or GitLab CI / CD): pulling the latest code and configuration of the target agent from a Git repository, downloading the required models and dependencies, and then building a lightweight, portable container image.

[0082] For scenarios requiring collaboration among multiple models, this invention supports a multi-model containerization strategy. For example, the inference model, reward model, and filtering model dedicated to security auditing can be packaged together with the target agent's code and configuration in the same image to ensure consistency in the production environment (versioned, tested, and released as a whole). The inference model, reward model, and filtering model are the models upon which the target agent's code and configuration depend.

[0083] This solution allows for version control of all assets throughout the agent's lifecycle—including prompts, tool definitions, models, code, and datasets. Version control enables end-to-end traceability, ensuring that any agent version deployed in a production environment can be traced back to its training data, code, and configuration.

[0084] S1024, Implement the Test phase, perform automated simulation and evaluation of the nondeterministic behavior of the target intelligent agent.

[0085] Due to the uncertainty of large models, traditional testing frameworks relying on fixed assertions are not applicable. In the embodiments of this application, electronic devices can employ one or more of the following methods, including but not limited to, to address the test evaluation problem:

[0086] 1) LLM as a Judge Evaluation Method: This method uses an independent and powerful LLM as the "judge" to score the output of the target agent based on predefined evaluation criteria (e.g., accuracy, factuality, tone, security, etc.). This solves the problem that traditional testing methods struggle to evaluate open-ended and non-deterministic outputs.

[0087] 2) Multi-dimensional confidence assessment method: During the testing process, a multi-dimensional "confidence score" is generated for each output of the target agent. This score can be further subdivided into multiple dimensions such as factual accuracy, tool applicability, and compliance. These scores serve as key performance indicators to evaluate the reliability of the agent and trigger governance actions in the subsequent Operate phase.

[0088] Before executing the external operation cycle, the electronic device determines whether to trigger the Release phase based on the target agent's LLM score and / or multidimensional confidence score during the Test phase.

[0089] For example, if the average LLM score is significantly below the acceptable level (e.g., accuracy < 0.7, security < 0.8), the release pipeline is immediately blocked, and the development team is notified for manual intervention and review. If the average LLM score is significantly below the acceptable level (e.g., 0.8 ≤ accuracy < 0.7, 0.85 ≤ security < 0.8), defective code modules (such as error handling, logical reasoning, and tool calls) are identified, and the coding team is reassigned to redevelop the problematic modules. If the average LLM score is slightly below the acceptable level (e.g., 0.85 ≤ accuracy < 0.8, 0.9 ≤ security < 0.85), the suggestion words are quickly optimized, and the code re-enters the coding phase for lightweight optimization.

[0090] In other possible implementations, the Test phase can meet testing requirements and pass the LLM score and / or multidimensional confidence score of the quality standard, which can also serve as the performance standard of the target agent. In the Operate phase, these can be transformed into thresholds and rules for real-time detection, determine whether there is a performance decline trend of the target agent in the Operate phase, and record it in the AET data model. Finally, it enters the Retrain phase, driving a new round of development and optimization cycle of the target agent.

[0091] S103, the electronic device performs an external operating cycle.

[0092] In this embodiment, the external operation loop focuses on the safe and efficient operation of agents in a real production environment, and uses their behavioral data to drive continuous improvement. The external operation loop includes Release, Deploy, Operate, and Retrain phases, where the validated target agent is deployed to the production environment, and continuous optimization is performed based on the target agent's operational data. The optimization results generated in the Retrain phase are fed back to the Prompt phase to drive a new round of internal agent loops for the target agent, thus forming a double-helix closed-loop management architecture connecting the internal agent loop and the external operation loop.

[0093] In some possible implementations, such as Figure 4 As shown, this external operating cycle includes:

[0094] S1031, Implement the Release phase, release the target agent, and perform pre-deployment checks;

[0095] In this embodiment of the application, the Release phase is mainly responsible for packaging all components (code, model, configuration, etc.) of the target agent into an immutable, versioned release package and storing this release package in the asset registry.

[0096] For example, in the Release phase, the electronic device performs processes including but not limited to the following: 1) Quality checks. The reports and metrics generated by the target agent in the Test phase are checked to confirm whether the target agent has passed the quality thresholds defined for the Release phase in the StageSpec (such as Test coverage, average LLM-as-a-Judge score, and whether security scans meet quality conditions). 2) Asset registration and versioning management. In this embodiment, the container image produced in the Build phase and all related assets (prompts, configuration files, Test reports, AET data model definitions) are registered in a unified "Asset Registry." This Asset Registry generates a unique version number for each asset. It supports versioning management of all components of the target agent and provides model version lifecycle management functions, such as approval processes from the Test environment to the production environment, and the ability to quickly roll back to previous versions in case of problems. 3) Generating a release list. Create a certificate and specification document for the agent of this version number, clearly recording the image version included in this release, the content of the changes, the versions of the dependent services or models, and how to deploy (configuration parameters). 4) Environment preparation before deployment, and automatic update of environment configuration.

[0097] S1032, Deploy phase, deploy the target intelligent agent to the target operating environment, which may include private cloud, public cloud, or hybrid cloud deployment.

[0098] In this application embodiment, the Deploy phase is mainly responsible for installing a specific version of the target agent release package that has been released into the target runtime environment (such as private cloud, public cloud, or hybrid cloud) and starting it to run.

[0099] Specifically, based on GitOps principles, the electronic device continuously monitors the configuration files in the agent version control system through the Deploy agent and automatically synchronizes the state of the production environment with the expected state defined in the configuration file. This ensures that once a new agent version is approved in the Release phase, the Deploy agent automatically deploys the new agent version to the target environment.

[0100] For example, the Deploy process is controlled by a fully automated continuous delivery (CD) pipeline. Once a new agent version is approved in the Release phase, the pipeline automatically deploys that version to the target runtime environment (such as a Kubernetes cluster). This invention follows GitOps principles: the desired state of the production environment is defined in a Git repository using declarative configuration (e.g., Kubernetes YAML), and a Deploy agent (such as Argo CD) continuously monitors the Git repository and automatically synchronizes the production environment state.

[0101] In the embodiments of this application, the access permissions of the intelligent agent strictly follow the "principle of least privilege". For example, a data query intelligent agent will only be granted READ permission, and will not have DELETE or UPDATE permission.

[0102] S1033, the Operate phase is implemented, continuously monitoring the operational status of the target agent.

[0103] During the Operate phase, each time the target agent performs a task, a structured execution trajectory data (hereinafter referred to as reference AET data) is generated. This data includes the complete context of the task, the agent's "thought chain (CoT)" and "action chain (CoA)," and the multidimensional confidence score of the output results.

[0104] During the Operate phase, if it is determined that there is a working state that meets the preset risk control conditions, the electronic device can automatically trigger the manual intervention mechanism. The preset risk control conditions include: the operating quality of the target intelligent agent is lower than the quality control threshold set in the phase specification corresponding to the Operate phase, and / or, the multidimensional confidence score of the target intelligent agent is lower than the preset score.

[0105] As an example, electronic devices can utilize multi-dimensional confidence scores to implement a dynamic governance mechanism: when the confidence score of a target agent falls below a preset score while performing a task, the electronic device automatically triggers a human intervention mechanism. This human intervention mechanism can be blocking (pausing and awaiting human approval) or parallel (continuing execution but simultaneously notifying a human for asynchronous review). It supports various types of human-machine collaboration, such as requiring human approval at key decision points, requesting human data input when information is missing, and manually selecting paths among multiple agent execution paths. This mechanism ensures that while pursuing agent autonomy, it retains ultimate human control and accountability.

[0106] As an example, the logic for an electronic device to determine whether to trigger a human intervention mechanism based on a multidimensional confidence score could include: if the confidence level is determined to be high (e.g., multidimensional confidence score > first threshold), the result is directly output to the user for fully automated processing. If the confidence level is determined to be medium (e.g., multidimensional confidence score > second threshold and < or equal to first threshold), the result is output to the user, and a parallel asynchronous human review is triggered, recording the result for subsequent optimization. If the confidence level is low (e.g., multidimensional confidence score < second threshold), a blocking human approval process is triggered, requiring human approval to proceed. For example, the first threshold is 0.9, and the second threshold is 0.7.

[0107] In some possible implementations, the collected reference AET data can also be sent to the detection platform in real time to generate visual dashboards and real-time alarms.

[0108] S1034, the Retrain phase is implemented. The data collected in the Operate phase is used to update and optimize the large language model. The improved large language model is then applied to the Prompt phase to drive a new round of development and optimization cycle for the target agent.

[0109] In the embodiments of this application, the goal of the Retrain phase is to transform the reference AET data collected in the Operate phase into feedback signals, thereby driving the continuous improvement of the agent.

[0110] For example, the electronic device is equipped with a "feedback processing unit" that automatically analyzes the reference AET data collected during the Operate phase, extracts key indicators such as user interaction logs, multidimensional confidence scores, and task success rates, and generates structured feedback signals. These feedback signals are then used as inputs to the Retrain phase to guide the agent's optimization.

[0111] In the embodiments of this application, the electronic device can also optimize the intelligent agent based on one or more of the following optimization mechanisms:

[0112] 1) Reinforcement Learning Based on User Feedback (RLUF)

[0113] Collect user feedback, train a reward model, and use reinforcement learning techniques to update the target agent's strategy based on the reward model, so that the agent's behavior is more in line with user preferences.

[0114] For example, user feedback can include implicit feedback (such as dwell time, click-through rate) and explicit feedback (such as likes, dislikes, ratings). Electronic devices transform user feedback into reward signals and, through techniques such as reinforcement learning based on user feedback, backpropagate gradients to directly adjust the parameters of a large language model, making it more inclined to produce outputs that the agent likes.

[0115] 2) Self-reflection and self-revision

[0116] The primary target of this Self-Refine is the behavioral strategy, cue word template, and thought process of the target agent. The target agent can use its own reference AET data for retrospective analysis to identify logical loopholes and inefficient steps in the thought or action chain, and proactively correct these defects in subsequent task execution, thereby forming a self-iterative optimization loop.

[0117] For example, by analyzing AET data, the agent discovers that it often makes incorrect decisions after "step A". Therefore, when encountering a similar scenario again, it proactively tries a new reasoning path (such as adding a verification step B).

[0118] 3) Game theory-driven multi-agent optimization:

[0119] Specifically, higher-order optimization is achieved through adversarial and cooperative mechanisms among multiple agents and by calculating equilibrium solutions. The process includes:

[0120] 3.1) Data preparation: From the reference AET data collected in the Operate phase, electronic devices select task samples with multidimensional confidence scores below the threshold (e.g., <0.85) to construct the "dataset to be optimized".

[0121] In some possible implementations, the electronic device identifies systematic defect patterns in the target agent (which can also be understood as a business agent) based on a "dataset to be optimized" (e.g., multiple financial analysis agents have low confidence in cash flow analysis), traces the source back to the coding project (the coding agent team) that produced the target agent, maps the defect patterns to the agent's capabilities, and identifies one or more agents to be optimized. These agents include one or more agents from the target agent and auxiliary agents, where the auxiliary agents are any other agents, besides the target agent, that are invoked at any stage of the target agent's lifecycle.

[0122] For example, systemic defect patterns can be mapped to the capabilities of any agent involved in development (including the requirements analysis agent, the coding agent team, etc.). For instance, the defect patterns can be mapped to the coding capabilities of the coding agent team, thus revealing their coding shortcomings (e.g., the planning agent lacks financial expertise, the programmer agent has insufficient error handling capabilities, and the testing agent has incomplete test case coverage). Based on the problems identified during the operational phase, targeted coding test cases (coding test cases refer to tasks specifically generated for testing coding capabilities) are created. This is equivalent to creating a simulation environment for the agent to be optimized during the retraining phase, followed by adversarial and cooperative game-theoretic optimization cycles.

[0123] In addition, electronic devices need to deploy a critic agent and an optional mediator agent in the retraining environment. The main agent is responsible for generating candidate answers, the critic agent challenges and questions the answers through a rule base, external API, or LLM-as-a-Judge, and the mediator agent selects the optimal answer based on scoring rules after multiple rounds of game play. If the agent to be optimized is the target agent, it can be understood as self-optimization based on game theory.

[0124] For example, the master agent can be any development agent, which is any agent invoked by the target agent during the Prompt, Code, and Test phases. For instance, the master agent could be the coding agent team during the Code phase, or any one or more agents within that team.

[0125] 3.2.1) Adversarial Game-Based Iterative Optimization: The Retrain engine triggers the game process. The main agent generates output, the critic agent proposes counterexamples or improvement suggestions, the main agent revises and resubmits accordingly, and an optional mediator agent selects the optimal answer based on scoring rules after multiple rounds of gameplay. This iterative process continues until a quality threshold (e.g., accuracy ≥ 0.95, compliance ≥ 0.9) is met or the maximum number of iterations is reached. All iterations are recorded in the AET data recording model.

[0126] For example, in an adversarial game mode, a "Proposer" and a "Challenger" are defined. The Proposer generates candidate outputs based on test requests, and the Challenger automatically reviews these outputs, identifying potential errors, inconsistencies, or better improvements. For instance, the Challenger can validate the Proposer's answers based on a fact-checking API or rule base. If the challenge is successful, the Proposer generates a revised answer and resubmits it to the game cycle. This adversarial process takes place within a predefined maximum number of iterations (e.g., 3-5 rounds) until the output meets a quality threshold (e.g., correctness ≥ 0.95, compliance ≥ 0.9). This mechanism ensures that the output undergoes repeated challenges and corrections.

[0127] 3.2.2) Cooperative Game Theory Optimization: In complex task scenarios, electronic devices schedule multiple agents with different functions to complete sub-tasks in parallel (such as data retrieval, logical reasoning, and text generation), with a review agent verifying the overall result. After the task is completed, the marginal contribution of each agent is calculated based on a cooperative game model (such as Shapley Value), and reward or penalty signals are allocated to promote reasonable division of labor and cooperation. These multiple agents with different functions belong to the aforementioned development agents; for example, these multiple agents with different functions could be a coding agent team in the Code phase.

[0128] For example, the cooperative game model introduces multiple agents with different functions (such as a "planning agent," a "programmer agent," and a "testing agent"), and assigns them explicit reward functions. For instance, the reward function for the planning agent is "the rationality of task decomposition"; for the programmer agent, it's "the completion rate of subtasks"; and for the testing agent, it's "the error detection rate." During the cooperative game, multiple agents collaborate to complete the same task to be optimized (the user request). The electronic device calculates its marginal contribution value (such as the Shapley Value) based on a cooperative game model and assigns corresponding reward or penalty signals to each agent. This approach ensures the motivation of each role during the collaboration process and improves the overall task success rate.

[0129] 3.2.3) Equilibrium Solution Calculation and Parameter Update: To avoid oscillations or mode collapse during multi-objective optimization, after collecting data from multiple rounds of games, the optimal policy distribution for each agent is determined by solving for Nash equilibrium or Stackelberg equilibrium. The equilibrium solution is then transformed into reward signals or gradient constraints to update the master model parameters or optimize the cue word template, ensuring a stable balance between accuracy, safety, and efficiency in the overall solution.

[0130] As an example, electronic devices collect game data from adversarial game cycles, solve for a first equilibrium solution based on Nash or Stackelberg equilibrium techniques, and transform this first equilibrium solution into reward signals and / or gradient constraints to update the parameters of a large language model and / or optimize prompt word templates. This first equilibrium solution is used to indicate the optimal general strategy for the agent to handle tasks. For example, in technical support problems, by analyzing similar adversarial game processes, stable policy equilibrium points are found, Nash equilibria are obtained, and the optimal strategy for the agent is: first provide 2 to 3 simple troubleshooting steps, then prepare 2 to 3 deep solutions. The optimal strategy for the critic agent is: require specific steps for simple problems and systematic solutions for complex problems. For example, this first equilibrium solution (optimal Nash equilibrium strategy) could be: {"Answer Structure": "Hierarchical Progression", "Number of Simple Steps": 3, "Number of Deep Solutions": 3, ...}.

[0131] For example, based on this first equilibrium solution, the electronic device encodes the equilibrium policy into a large language model through reinforcement learning to update the underlying model parameters. The electronic device can also update the cue words used to define the agent's behavior (these cue words operate during the Prompt phase) based on this first equilibrium solution. For example, the following cue words could be added for the programmer agent: "Please pay special attention to: perform input validation before implementing core logic; add detailed comments for key algorithms; consider boundary cases and error handling." This ensures that the overall solution maintains a balance between different objectives (such as accuracy, security, and efficiency).

[0132] As another example, electronic devices collect game data from cooperative game cycles and solve for a second equilibrium solution based on Nash or Stackelberg equilibrium techniques. This second equilibrium solution indicates the contribution reward share for two or more agents. The second equilibrium solution is then transformed into a reward signal for reinforcement learning to enhance the capabilities of each agent in a large language model.

[0133] The electronic device evaluates the agent's contribution to completing the task and determines the reward share that each agent should receive based on Nash equilibrium or Stackelberg equilibrium techniques, thus obtaining a second equilibrium solution. The distribution ratio of this reward share satisfies the equilibrium point: no agent can obtain a higher share by unilaterally changing its effort level.

[0134] For example, based on this second equilibrium solution, electronic devices can transform the equilibrium allocation scheme into a reward signal for reinforcement learning, guiding individual behavior optimization (e.g., if an agent's actual contribution is consistently lower than the equilibrium expectation, then the agent will undergo targeted training to improve its capabilities). Electronic devices can also optimize team composition and division of labor based on this second equilibrium solution, prompting agents to handle tasks within their functional scope under a new, fairer incentive mechanism, thereby improving collaboration efficiency and output quality. For instance, the collaboration process of the coding agent team before optimization was: planning the agent design architecture, programmer agents implementing the code, and testing agents writing tests; the optimized collaboration process is: planning the agent design architecture and reviewing test cases, programmer agents implementing the core logic, testing agents simultaneously writing unit tests, and programmer agents integrating and improving error handling.

[0135] In this embodiment, the new agent and prompt words optimized through game theory are submitted to the asset registry center, a new version number (such as v1.1) is generated, and the Release→Deploy process is entered to realize the iterative evolution of the agent.

[0136] Through the aforementioned game theory mechanism, the agent optimization process combines adversarial challenges, enhanced cooperation, and equilibrium convergence, enabling the agent to continuously achieve performance improvements and enhanced robustness in real-world environments.

[0137] It should be noted that the target intelligent agent described in this application refers to the target intelligent agent encoded in the Code stage of the eight-stage closed-loop lifecycle management method provided by this solution. In some possible implementations, if the auxiliary intelligent agent is also generated based on the eight-stage closed-loop lifecycle management method provided by this solution, then the auxiliary intelligent agent also belongs to the target intelligent agent. Any implementation of the eight-stage lifecycle management method of this solution is also applicable to the auxiliary intelligent agent.

[0138] Understandably, with the rise of LLM, intelligent agents have gradually become an important means of intelligent applications. Intelligent agents are capable of understanding, reasoning, and acting based on natural language instructions, and can complete complex tasks through tool calls and environmental interaction. Currently, the industry has proposed DevOps and MLOps methodologies for software development and the lifecycle management of artificial intelligence models.

[0139] DevOps technology primarily targets traditional software development and operations, emphasizing continuous integration (CI), continuous delivery (CD), and automated testing and deployment. However, DevOps manages general-purpose software systems, and its lifecycle mainly covers code development, building, testing, deployment, and operations, lacking support for agent-specific characteristics (such as prompts, inference chains, and tool invocation behaviors).

[0140] MLOps technology primarily focuses on the training, deployment, and monitoring of machine learning models, emphasizing data collection, model training, model deployment, and online inference monitoring. However, MLOps focuses on the 'model' rather than the 'agent,' failing to cover the complete process of the agent from business requirement formulation to code generation, deployment, operation, and continuous improvement. It also lacks dedicated management of the agent's behavioral patterns and user interaction data generated during operation.

[0141] Overall, the research, development, and operation of intelligent agents face the following shortcomings and deficiencies in practice:

[0142] (1) Insufficient lifecycle coverage:

[0143] Existing DevOps and MLOps technologies cannot fully describe the entire lifecycle of an agent. For example, the natural language input phase based on user needs (Prompt), the agent construction and composition phase (Build), and the adaptive retraining phase based on runtime logs (Retrain) all lack systematic support.

[0144] (2) Lack of cross-stage arrangement ability:

[0145] Existing workflow engines or CI / CD tools can only handle task chains, but cannot handle the linkage between multiple heterogeneous stages in the agent development lifecycle. For example, there is currently no mature mechanism for automatically triggering code generation from the Prompt stage or automatically reverting from the testing stage to the coding stage.

[0146] (3) Lack of adaptive closed-loop mechanism:

[0147] In DevOps and MLOps, monitoring data during the operations phase is often only used for alerts or manual analysis, making it difficult to automatically trigger iterative optimization of models or systems. Meanwhile, the vast amounts of behavioral data, user feedback, and environmental interaction results accumulated during agent operation are not fully utilized to drive new iterations.

[0148] (4) Lack of standardized interfaces and protocols:

[0149] The current intelligent agent development ecosystem includes various tools such as LangChain, AutoGen, LLM API, workflow engines, and CI / CD platforms. However, the lack of unified interface specifications and protocols among them hinders collaboration between different tools and ecosystem expansion.

[0150] However, by adopting the method provided in this application, on the one hand, by defining the eight-stage process of the entire life cycle, a complete closed loop of process from requirement input to operation feedback to continuous optimization is realized, avoiding the problems of requirement and operation and maintenance being disconnected and development and training being separated in traditional systems.

[0151] The eight-phase process provides a unified framework and language for managing agents. Each phase has clearly defined inputs, outputs, and objectives, enabling cross-functional teams (such as business analysts, data scientists, and operations engineers) to collaborate within a common blueprint. Phases are seamlessly integrated, facilitating cross-functional collaboration. For example, in the Prompt and Code phases, agents can collaboratively generate code and test cases. Upon successful completion of the Test phase, the system automatically triggers the Release and Deploy pipelines. Data collected in the Operate phase is directly used to drive the Retrain phase, initiating a new development cycle. This standardized process helps improve transparency, reduce communication barriers, and ensure the controllability of agents during development and deployment.

[0152] On the other hand, to address the fragmentation of the AI ​​tool ecosystem, this invention advocates for the use of standardized interfaces and protocols. This includes: the Agent2Agent (A2A) Protocol, which adopts open standards like A2A to enable agents built on different frameworks (such as AutoGen and CrewAI) to communicate and collaborate through standardized APIs. Model and tool API specifications: all AI models and external tools are defined and version-controlled through specifications such as OpenAPI, enabling agents to dynamically discover and invoke tools and ensuring consistency in the input and output formats of tool calls.

[0153] On the other hand, during the operation phase, this solution collects real-time behavioral data and performance metrics of the agents in the production environment. This data is then automatically used to drive the "iteration and optimization" phase to update and optimize the agent's performance. The optimization mechanisms include: 1) Automated prompt optimization: automatically adjusting prompts based on agent behavioral data (such as user satisfaction ratings and task completion rates) to improve performance. 2) Reinforcement learning and fine-tuning: utilizing a reinforcement learning (RLUF) framework based on user feedback, implicit or explicit user feedback (such as likes and comments) is used as reward signals to fine-tune the agent model, making it better aligned with user preferences. 3) Multi-agent self-improvement: drawing on multi-agent fine-tuning techniques, multiple agents debate and critique each other, generating high-quality training datasets to continuously improve their performance and achieve self-improvement.

[0154] It should be noted that this application embodiment uses an electronic device as an example to illustrate the execution subject of the intelligent agent lifecycle management method based on the eight-stage closed loop provided in this application. This electronic device can also be understood as the intelligent agent lifecycle management system or device based on the eight-stage closed loop shown in this application embodiment. In this application embodiment, the electronic device can be any electronic device capable of running or calling a large language model to execute the method provided in this application embodiment. For example, the electronic device can be a desktop computer, a laptop, a mobile terminal, a 32-bit microprocessor, or a 64-bit microprocessor, etc., and this application embodiment does not limit this.

[0155] The implementation of this invention will be specifically illustrated using an AI-driven customer support process as an example.

[0156] Prompt Phase: Define an agent named SupportAgent, whose role is to "handle customer service tickets and dynamically select tools to resolve issues based on customer needs." Its tools include an API for querying order status, a tool for accessing a knowledge base, and a tool for escalating tickets to human support. All definitions are stored in a Git repository.

[0157] Code Phase: The coding team generates the logic code for the SupportAgent based on the requirements, such as how to make decisions based on user intent in graph orchestration and how to invoke tools.

[0158] Build phase: The CI pipeline automatically packages the SupportAgent agent code, LLM model, tool definitions and dependencies, generates a Docker image, and pushes it to a private container repository.

[0159] Test Phase: The testing framework generates 1000 simulated user dialogues, including regular queries, ambiguous questions, and malicious input. LLM-as-a-Judge scores the output of each dialogue, particularly evaluating the accuracy of the decision to "escalate the problem to a human" and generating a confidence score.

[0160] Release phase: Agent image versions that pass testing are marked as "SupportAgentv1.0" and registered with the asset registry.

[0161] Deploy phase: The CD pipeline automatically deploys the "SupportAgent v1.0" version to the production environment and enables real-time detection.

[0162] Operate Phase: In the production environment, each interaction between the SupportAgent and the customer generates an AET (Autonomous Interaction Time) record, which includes the correlation ID, thought sequence, action sequence, and confidence score. When the customer expresses dissatisfaction, or when the agent's confidence score falls below 85%, the system automatically triggers the HITL (Highly Influential Person-to-Work) mechanism to assign the work order to the human support team.

[0163] Retraining Phase: Analyze all AET data from the past month. If it is found that SupportAgent generally has low confidence scores when handling a specific type of return issue, this part of the AET data is automatically extracted, marked as negative samples, and used for automated optimization of prompt words or fine-tuning of the large language model, thereby starting a new development cycle to generate a more optimized SupportAgent v1.1.

[0164] like Figure 5 As shown, this application also provides an intelligent agent lifecycle management system based on an eight-stage closed loop, the system comprising:

[0165] The agent lifecycle management module 501 is used to configure the agent lifecycle into eight sequentially connected phases: Prompt phase, Code phase, Build phase, Test phase, Release phase, Deploy phase, Operate phase, and Retrain phase.

[0166] The prompt word parsing module 502 is used to implement the Prompt phase, receiving and parsing the target functional requirements of unstructured input;

[0167] The coding module 503 is used to implement the Code stage, and to perform automated programming based on intelligent programming tools or coding intelligence agents to create implementation code of the target intelligence agent that meets the target functional requirements;

[0168] Module 504 is used to implement the Build phase and integrate the code generated in the Code phase into a runnable target intelligent agent;

[0169] The test module 505 is used to implement the Test phase, and to perform automated simulation and evaluation of the nondeterministic behavior of the target intelligent agent;

[0170] The release module 506 is used to implement the Release phase, release the target agent, and perform pre-deployment checks;

[0171] The deployment module 507 is used to implement the Deploy phase and deploy the target intelligent agent to the target operating environment, which may include a private cloud, a public cloud, or a hybrid cloud.

[0172] Operation module 508 is used to implement the Operate phase and continuously monitor the running status of the target intelligent agent;

[0173] The iteration and optimization module 509 is used to implement the Retrain phase, update and optimize the core large language model on which the target agent depends based on the running data collected in the Operate phase, and apply the improved large language model to the Prompt phase to drive a new round of development and optimization cycle for the target agent.

[0174] In some possible implementations, such as Figure 6 As shown, the system also includes: a standard management module 510;

[0175] This specification management module is used to configure and maintain the following standardized specifications: Agent Specification, which describes the capabilities, dependencies, and operational constraints of the target agent using structured data; Stage Specification, which defines the execution rules, input / output formats, and quality control protocols for each of the eight stages; Agent Execution Trajectory AET Data Recording Specification, which defines the recording standards for the AET data recording model, which is used to record the complete behavioral path, thought chain, and multidimensional confidence score of the agent when performing tasks during the Operate stage.

[0176] In some possible implementations, such as Figure 6 As shown, the encoding module 503 is specifically a multi-agent collaborative programming module;

[0177] This multi-agent collaborative programming module is used to schedule a team of coding agents to perform collaborative programming. The team of coding agents includes a planning agent, a programmer agent, and a testing agent. The planning agent is used to decompose the target functional requirements into executable coding tasks, the programmer agent is used to generate code based on the coding tasks, and the testing agent is used to generate test cases.

[0178] In some possible implementations, the iteration and optimization module 509 specifically includes: a game theory optimization module 5091;

[0179] This game theory optimization module is used to determine the dataset to be optimized based on task samples from the AET data collected in the Operate phase that meet preset conditions. These preset conditions include a multidimensional confidence score lower than a preset score and / or a task success rate lower than a preset success rate. Based on the defect patterns reflected in the dataset to be optimized, it infers one or more agents with deficient backtesting capabilities. These agents include one or more agents from the target agent and auxiliary agents. The auxiliary agent is any other agent, besides the target agent, that is invoked during any lifecycle of the target agent. It then executes an adversarial game loop, scheduling the main agent to generate a reference... The system generates candidate outputs for test cases and schedules a critical agent to review these outputs, driving the main agent to perform multiple rounds of iterative corrections until a quality threshold is met or the maximum number of iterations is reached. The main agent is considered part of the agent to be optimized. The reference test cases are coded test cases specifically generated based on the defect patterns reflected in the dataset to be optimized. The system collects game data from the adversarial game cycle and solves for a first equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques. This first equilibrium solution is used to indicate the optimal strategy for the main agent to handle the task. The first equilibrium solution is then transformed into reward signals and / or gradient constraints to update the parameters of the large language model and / or optimize the prompt word templates.

[0180] In some possible implementations, the game theory optimization module 5091 is further configured to execute a cooperative game loop, schedule agents with different functions to collaborate in completing a reference test task, calculate the marginal contribution value for each agent based on the coalition game model after the task is completed, and allocate reward or penalty signals based on the marginal contribution value of each agent, wherein the agents with different functions belong to the agents to be optimized; collect the game data of the cooperative game loop, solve for a second equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques, the second equilibrium solution is used to indicate the contribution reward share of the agents with different functions; and convert the second equilibrium solution into a reward signal for reinforcement learning to improve the capabilities of each agent in the large language model, and / or optimize the prompt word template.

[0181] In some possible implementations, the iteration and optimization module specifically includes: a reinforcement learning module 5092 based on user feedback;

[0182] The user feedback-based reinforcement learning module is used in the Retrain phase to collect user feedback data, train a reward model, and update the target agent's policy using reinforcement learning techniques based on the reward model, so that the target agent's behavior is more in line with user preferences.

[0183] In some possible implementations, the iteration and optimization module specifically includes: a self-reflection and self-correction module 5093;

[0184] The self-reflection and self-correction module is used in the Retrain phase, where the target agent uses its own execution trajectory AET data to perform retrospective analysis, identify logical loopholes and inefficient steps in the thought chain and / or action chain, and actively correct these defects in subsequent task execution to form a self-iterative optimization closed loop.

[0185] In some possible implementations, the test module 505 is specifically used to automatically score the output of the target agent using LLM as the evaluator based on predefined evaluation criteria to obtain an LLM score. The evaluation dimensions of the evaluation criteria include two or more of accuracy, factuality, tone, and security. And / or, it generates a multidimensional confidence score for each output of the target agent. The evaluation dimensions of the multidimensional confidence score include two or more of factual accuracy, tool applicability, and compliance. Before implementing the Release phase, the test module is also used to determine whether to trigger the Release phase based on the LLM score and / or multidimensional confidence score of the target agent in the Test phase.

[0186] In some possible implementations, the operation module 508 specifically includes: a dynamic governance module 5081;

[0187] This dynamic governance module is used to automatically trigger a manual intervention mechanism when it is determined that there is a working state that meets the preset risk control conditions. The preset risk control conditions include: the operating quality of the target intelligent agent is lower than the quality control threshold set in the stage specification corresponding to the Operate stage, and / or the multidimensional confidence score of the output content of the target intelligent agent is lower than the preset score.

[0188] In some possible implementations, the system further includes a multi-model containerization management module 511, configured to adopt a multi-model containerization strategy for scenarios requiring collaboration of multiple models, packaging the inference model, reward model, and security filtering model in the same container image to ensure their consistency in the production environment.

[0189] In some possible implementations, the system further includes: a GitOps deployment module 512 configured to follow GitOps principles, continuously monitor configuration files in the version control system through a deployment agent, and automatically synchronize the state of the production environment with the desired state defined in the configuration file.

[0190] This application also provides an intelligent agent lifecycle management device based on an eight-stage closed loop, including a device for executing... Figure 1 and Figure 2 Any unit based on an eight-stage closed-loop intelligent agent lifecycle management method.

[0191] In the embodiments of this application, any implementation method mentioned in the method embodiments is also applicable to the intelligent agent lifecycle management system and device based on the eight-stage closed loop provided in this application. For specific execution steps, please refer to the description of the foregoing method embodiments, which will not be detailed here.

[0192] This application also provides an intelligent agent lifecycle management device based on an eight-stage closed loop, including a processor, which is used to execute any of the intelligent agent lifecycle management methods based on an eight-stage closed loop as described in the method embodiments.

[0193] Please refer to Figure 7 This is a schematic diagram of another intelligent agent lifecycle management device based on an eight-stage closed loop provided in an embodiment of this application, as shown below. Figure 7 As shown, the intelligent agent lifecycle management device 700 based on an eight-stage closed loop may include: at least one processor 701, such as a CPU, at least one communication interface 703, a memory 704, and at least one communication bus 702. The communication bus 702 is used to implement communication between these components. The communication interface 703 may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface or a Bluetooth interface), etc. The memory 704 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 704 may also be at least one storage device located remotely from the aforementioned processor 701. Figure 7 As shown, the memory 704, which serves as a computer storage medium, may include an operating system, a network communication module, and program instructions.

[0194] exist Figure 7 As shown... In device 700, processor 701 can be used to load program instructions stored in memory 704 and specifically perform the following operations:

[0195] The entire lifecycle of the intelligent agent is defined, which includes eight sequentially connected phases: Prompt phase, Code phase, Build phase, Test phase, Release phase, Deploy phase, Operate phase, and Retrain phase.

[0196] The Prompt phase is implemented by receiving and parsing the target functional requirements of unstructured input;

[0197] In the Code phase, automated programming is performed using intelligent programming tools or coding agents to create implementation code for the target agent that meets the target functional requirements.

[0198] The Build phase is implemented to integrate the code generated in the Code phase into a target intelligent agent that can run.

[0199] The Test phase is implemented to automate the simulation and evaluation of the nondeterministic behavior of the target agent.

[0200] Implement the Release phase, release the target agent, and perform pre-deployment checks;

[0201] The Deploy phase involves deploying the target intelligent agent to a target operating environment, which may include a private cloud, a public cloud, or a hybrid cloud.

[0202] During the Operate phase, the operating status of the target agent is continuously monitored.

[0203] The Retrain phase involves updating and optimizing the core large language model upon which the target agent relies, based on the runtime data collected in the Operate phase. The improved large language model is then applied to the Prompt phase, driving a new cycle of development and optimization for the target agent.

[0204] It should be noted that the specific execution process can be found in the detailed description of the above method embodiments, and will not be elaborated here.

[0205] For specific execution steps, please refer to the description of the foregoing method embodiments, which will not be detailed here.

[0206] This application also provides a computer storage medium that can store multiple instructions. These instructions are adapted to be loaded and executed by a processor using the intelligent agent lifecycle management method based on an eight-stage closed loop provided in this application. For details of the execution process, please refer to the specific description of the method embodiments shown above, which will not be elaborated here.

[0207] This application also provides a computer program product containing instructions that, when run on an electronic device, cause the electronic device to execute the method steps of the method embodiments shown above.

[0208] This application also provides a chip module, including a transceiver component and a chip, wherein the chip is used to execute the method steps of the above-described method embodiments.

[0209] It is understood that the above-described intelligent agent lifecycle management system based on an eight-stage closed loop, intelligent agent lifecycle management device based on an eight-stage closed loop, computer storage medium, computer program, computer program product, and chip are all used to execute the method shown in any implementation of the corresponding aspect of the embodiments of this application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects in the corresponding method, and will not be detailed here.

[0210] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes the processes of the embodiments of the above methods.

[0211] The term "at least one" in this application refers to one or more items. "More than one item" means two or more items. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, it should be understood that although the terms "first," "second," etc., may be used to describe objects in this application, these objects should not be limited to these terms. These terms are only used to distinguish the objects from each other.

[0212] The terms “including” and “having” mentioned above, and any variations thereof, are intended to cover non-exclusive inclusion.

[0213] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for intelligent agent lifecycle management based on an eight-stage closed loop, characterized in that, The method includes: The entire lifecycle of the intelligent agent is defined, which includes eight sequentially connected phases: Prompt phase, Code phase, Build phase, Test phase, Release phase, Deploy phase, Operate phase, and Retrain phase. The Prompt phase is implemented by receiving and parsing the target functional requirements of unstructured input; In the Code phase, automated programming is performed using intelligent programming tools or coding agents to create implementation code for the target agent that meets the target functional requirements. The Build phase is implemented to integrate the code generated in the Code phase into a target intelligent agent that can run. The Test phase is implemented to automate the simulation and evaluation of the nondeterministic behavior of the target agent. The Release phase is implemented, the target agent is released, and pre-deployment checks are performed. The Deploy phase involves deploying the target intelligent agent to a target operating environment, which may include a private cloud, a public cloud, or a hybrid cloud. During the Operate phase, the operating status of the target agent is continuously monitored. In the Retrain phase, based on the runtime data collected in the Operate phase, the core large language model on which the target agent depends is updated and optimized, and the improved large language model is applied to the Prompt phase to drive a new round of development and optimization cycle for the target agent. The process of updating and optimizing the core large language model upon which the target agent relies, based on the operational data collected during the Operate phase, includes: Based on the task samples in the AET data collected during the Operate phase that meet the preset conditions, the dataset to be optimized is determined. The preset conditions include a multidimensional confidence score lower than a preset score and / or a task success rate lower than a preset success rate. Based on the defect patterns reflected in the dataset to be optimized, there is one or more intelligent agents that lack the ability to reverse the process. The one or more intelligent agents to be optimized include one or more intelligent agents of the target intelligent agent and the auxiliary intelligent agent. The auxiliary intelligent agent is any other intelligent agent that is invoked during any life cycle of the target intelligent agent, other than the target intelligent agent. The adversarial game loop is executed, the main agent is scheduled to generate candidate outputs of reference test cases, and the critic agent is scheduled to review the candidate outputs. The main agent is driven to perform multiple rounds of iterative correction until the quality threshold is met or the maximum number of iterations is reached. The main agent belongs to the agent to be optimized. The reference test cases are coded test cases specifically generated based on the defect patterns reflected in the dataset to be optimized. Collect game data from the adversarial game cycle, and solve for the first equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques. The first equilibrium solution is used to indicate the optimal strategy for the main agent to process the task. The first equilibrium solution is transformed into a reward signal and / or gradient constraint to update the parameters of the large language model and / or optimize the prompt word template; After identifying one or more agents lacking the ability to infer defect patterns based on the dataset to be optimized, the method further includes: The cooperative game loop is executed, and agents with different functions are scheduled to cooperate to complete the reference test task. After the task is completed, the marginal contribution value of each agent is calculated based on the alliance game model, and a reward or penalty signal is assigned based on the marginal contribution value of each agent. The agents with different functions belong to the agents to be optimized. Collect game data from the cooperative game cycle, and solve for a second equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques. The second equilibrium solution is used to indicate the contribution reward share of the agents with different functions. The second equilibrium solution is transformed into a reward signal for reinforcement learning to enhance the capabilities of each agent in the large language model and / or optimize the prompt word template.

2. The method as described in claim 1, characterized in that, Prior to implementing the Prompt phase, the method further includes: Determine the standardized specifications that the target intelligent agent must follow throughout its entire lifecycle; The standardization specifications include: Intelligent agent specification, used to describe the capabilities, dependencies, and operational constraints of the target intelligent agent in structured data; The phase specification is used to define the execution rules, input / output formats, and quality control protocols for each of the eight phases. The Agent Execution Trajectory AET Data Recording Specification defines the recording standards for the AET data recording model, which is used to record the complete behavioral path, thought chain, and multidimensional confidence score of the agent when performing the task during the Operate phase.

3. The method as described in claim 1 or 2, characterized in that, The automated programming based on intelligent programming tools or coded intelligent agents includes: The scheduling coding agent team performs collaborative programming; The coding intelligence team includes a planning intelligence, a programmer intelligence, and a testing intelligence. The planning intelligence is used to decompose the target functional requirements into executable coding tasks, the programmer intelligence is used to generate code based on the coding tasks, and the testing intelligence is used to generate test cases.

4. The method as described in claim 1 or 2, characterized in that, The method further includes: During the Retraining phase, user feedback data is collected, a reward model is trained, and reinforcement learning techniques are used to update the strategy of the target agent based on the reward model, so that the behavior of the target agent is more in line with user preferences. And / or, During the Retrain phase, the target agent uses its own execution trajectory AET data to perform retrospective analysis, identify logical loopholes and inefficient steps in the thought chain and / or action chain, and actively correct these defects in subsequent task execution to form a self-iterative optimization closed loop.

5. The method as described in claim 1 or 2, characterized in that, The automated simulation and evaluation of the nondeterministic behavior of the target intelligent agent includes: An LLM score is automatically generated by using LLM as the evaluator and based on predefined evaluation criteria. The evaluation criteria include two or more of the following dimensions: accuracy, factuality, tone, and security; and / or, For each output of the target agent, a multidimensional confidence score is generated, wherein the evaluation dimensions of the multidimensional confidence score include two or more of the following: factual accuracy, tool applicability, and compliance. Prior to implementing the Release phase, the method further includes: Based on the target agent's LLM score and / or multidimensional confidence score during the Test phase, determine whether to trigger the Release phase.

6. The method as described in claim 1 or 2, characterized in that, The continuous detection of the target agent's operating status includes: If a working state that meets the preset risk control conditions is determined, a manual intervention mechanism is automatically triggered. The preset risk control conditions include: the operating quality of the target agent is lower than the quality control threshold set in the stage specification corresponding to the Operate stage, and / or the multidimensional confidence score of the output content of the target agent is lower than the preset score.

7. An intelligent agent lifecycle management system based on an eight-stage closed loop, characterized in that, The system includes: The agent lifecycle management module standardizes the agent lifecycle into eight sequentially connected phases: Prompt, Code, Build, Test, Release, Deploy, Operate, and Retrain. The prompt word parsing module is used to implement the Prompt phase, receiving and parsing the target functional requirements of unstructured input; The coding module is used to implement the Code phase, and to perform automated programming based on intelligent programming tools or coding intelligence agents to create implementation code for the target intelligence agent that meets the target functional requirements. A building module is used to implement the Build phase, integrating the code generated in the Code phase into a runnable target intelligent agent; The testing module is used to implement the Test phase, and to automatically simulate and evaluate the nondeterministic behavior of the target intelligent agent; The release module is used to implement the Release phase, release the target agent, and perform pre-deployment checks; The deployment module is used to implement the Deploy phase and deploy the target intelligent agent to the target operating environment, which may include a private cloud, a public cloud, or a hybrid cloud. The operation module is used to implement the Operate phase and continuously monitor the running status of the target agent; The iteration and optimization module is used to implement the Retrain phase. Based on the running data collected in the Operate phase, it updates and optimizes the core large language model on which the target agent depends, and applies the improved large language model to the Prompt phase to drive a new round of development and optimization cycle for the target agent. The iteration and optimization module specifically includes a game theory optimization module. This module is used to determine the dataset to be optimized based on task samples from the AET data collected in the Operate phase that meet preset conditions. These preset conditions include a multidimensional confidence score lower than a preset score and / or a task success rate lower than a preset success rate. Based on the defect patterns reflected in the dataset to be optimized, it infers one or more agents with deficient backtesting capabilities. These agents include one or more agents from the target agent and auxiliary agents. The auxiliary agent is any other agent, besides the target agent, that is invoked during any lifecycle of the target agent. Finally, it executes an adversarial game loop. The process involves: scheduling the main agent to generate candidate outputs for reference test cases; scheduling a critique agent to review the candidate outputs; driving the main agent to perform multiple rounds of iterative correction until a quality threshold is met or the maximum number of iterations is reached; the main agent is the agent to be optimized; and the reference test cases are coded test cases specifically generated based on the defect patterns reflected in the dataset to be optimized. The process also involves collecting game data from the adversarial game cycle and solving for a first equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques. This first equilibrium solution is used to indicate the optimal strategy for the main agent to handle the task. Finally, the first equilibrium solution is transformed into reward signals and / or gradient constraints to update the parameters of the large language model and / or optimize the prompt word template. The game theory optimization module is also used to execute a cooperative game loop, schedule agents with different functions to cooperate in completing a reference test task, calculate the marginal contribution value for each agent based on the alliance game model after the task is completed, and allocate reward or penalty signals based on the marginal contribution value of each agent. The agents with different functions belong to the agents to be optimized. The module collects the game data of the cooperative game loop, solves the second equilibrium solution based on Nash equilibrium or Stackelberg equilibrium techniques, and the second equilibrium solution is used to indicate the contribution reward share of the agents with different functions. The second equilibrium solution is converted into a reward signal for reinforcement learning to improve the capabilities of each agent in the large language model and / or optimize the prompt word template.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which, when executed, performs the method according to any one of claims 1 to 6.