Life cycle management method, device and equipment of agent skill, and medium
Patent Information
- Application Number
- CN202610626603.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-09-11
AI Technical Summary
[0003]在 AI 生成技能的场景中,现有技术无法对生成过程、生成结果、调试过程、发布过程进行全链路的状态管控,易出现生成过程中用户误操作、未调试的技能直接发布上线、线上版本被随意修改等问题,无法满足企业级业务对稳定性、安全性、合规性的要求
(1)建立了智能体技能状态管理的标准化闭环流程,通过接收请求、验证权限、执行流转并生成视图,将技能状态变更纳入统一、可控的机制,实现了对技能全生命周期的规范化管控,避免了随意操作,为后续精细化管控奠定了基础;(2)提升了状态流转操作的数据可靠性与系统高可用性,通过引入分布式共识算法,确保每一次状态变更记录在集群多数节点间达成一致后才生效,有效防止了因单点故障导致的状态丢失、冲突或不一致,满足了企业级应用对强一致性和高可靠性的要求;(3)强化了发布上线环节的质量把控,通过将“至少完成一次成功调试”设定为从草稿状态发布到上线状态的强制性前置条件,从流程机制上确保了任何技能在对外提供服务前都必须经过基本的功能验证,从根本上杜绝了未经验测的技能被部署到生产环境,降低了线上故障的发生概率。
Smart Images

Figure CN122736121A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent agent skill management technology, and in particular to a method, apparatus, device and storage medium for lifecycle management of intelligent agent skills. Background Technology
[0002] Currently, existing agent skills and workflow solutions mostly focus on the creation and execution capabilities of skills, lacking a standardized state management mechanism for the entire skill lifecycle. Related technologies typically categorize skill states as only "saved" or "released," without state management for the AI generation process, or version management, sandbox debugging, and release / decommissioning control capabilities adapted to enterprise-level scenarios.
[0003] In AI-generated skills scenarios, existing technologies cannot provide full-chain state control over the generation process, generation results, debugging process, and release process. This can easily lead to problems such as user misoperation during the generation process, direct release of un-debugged skills, and arbitrary modification of online versions, failing to meet the stability, security, and compliance requirements of enterprise-level businesses. Summary of the Invention
[0004] In view of the above, this application provides a method, apparatus, device and storage medium for lifecycle management of intelligent agent skills, the purpose of which is to solve the above-mentioned technical problems.
[0005] Firstly, this application provides a method for lifecycle management of intelligent agent skills, the method comprising: Receive a first state operation request for the target agent's skill, the first state operation request including a first user identity and a first target state; Obtain the current state of the target agent's skill, and perform permission verification based on the first user identity, the current state, and the first target state; In response to successful permission verification, a state transition operation from the current state to the first target state is executed, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to the event sequence corresponding to the target agent skill; Based on the event sequence, a lifecycle management view corresponding to the first target state is generated.
[0006] In some embodiments, performing the state transition operation from the current state to the first target state includes: Based on predefined state machine rules, determine whether a transition from the current state to the first target state is permitted; In response to the determination that the transition is allowed, the event record is replicated and committed as a state machine log among multiple nodes in the distributed cluster based on a distributed consensus algorithm; In response to the event log being successfully submitted by a majority of nodes in the distributed cluster, the state of the target agent's skill is updated to the first target state.
[0007] In some embodiments, the event record includes an event type, an event payload, a timestamp, and an event sequence number; adding the event record to the event sequence corresponding to the target agent's skill includes: The event records are stored in the event database; Based on the event sequence number, the event record is linked to the end of the event sequence, which includes event records arranged in chronological order that describe all state changes of the target agent's skill since its creation.
[0008] In some embodiments, the method further includes: Receive a state rollback request for the target agent's skill, the state rollback request including the target event sequence number; From the event database, read the event records from the first event record to the event sequence number corresponding to the target event sequence number to form a target event subsequence; By re-executing each event record in the target event subsequence, the state of the target agent's skill is reconstructed to the state at the time corresponding to the target event sequence number.
[0009] In some embodiments, generating a lifecycle management view corresponding to the first target state based on the event sequence includes: Obtain the metadata of the target agent's skills from the skill metadata repository; Obtain operational metric data and log data associated with the event sequence from the observability data repository; The lifecycle management view is generated based on the event sequence, the metadata, the operational metrics data, and the log data.
[0010] In some embodiments, generating a lifecycle management view includes: At least one external tool interface on which the target agent's skills depend is parsed from the metadata; Query the data lineage graph to obtain upstream data source information and downstream dependent skill information of the at least one external tool interface; Based on the upstream data source information and the downstream dependent skill information, a lineage display panel for the lifecycle management view is generated; Receive change notifications for at least one external tool interface; Based on the data lineage map, identify one or more agent skills that will be affected by the changes, forming a set of affected skills; The skills in the affected skill set that are currently online are marked as risk skills, and alarm information is generated and displayed in the lifecycle management view.
[0011] In some embodiments, the first target state includes a generating state, a draft state, and an online state; the permission verification based on the first user identity, the current state, and the first target state includes: When the first state operation instruction is a release instruction and the current state is a draft state, perform pre-verification for the release instruction, including: Determine whether the target agent's skill has been successfully debugged at least once in the draft state; If the target agent's skill has been successfully debugged at least once, then the pre-verification is deemed to have passed. If the target agent's skills are not successfully debugged, the pre-verification is deemed to have failed.
[0012] Secondly, this application provides a lifecycle management device for intelligent agent skills, the lifecycle management device for intelligent agent skills comprising: The receiving module is configured to receive a first state operation request for the target intelligent agent's skill, wherein the first state operation request includes a first user identity and a first target state; The acquisition module is used to acquire the current state of the target intelligent agent's skill and perform permission verification based on the first user identity, the current state, and the first target state; An execution module is configured to, in response to successful permission verification, perform a state transition operation from the current state to the first target state, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to an event sequence corresponding to the target agent skill; The generation module is used to generate a lifecycle management view corresponding to the first target state based on the event sequence.
[0013] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the lifecycle management method for intelligent agent skills as described in any embodiment of the first aspect.
[0014] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the lifecycle management method for intelligent agent skills as described in any embodiment of the first aspect.
[0015] The technical solutions provided in this application have the following advantages compared with the prior art: (1) A standardized closed-loop process for managing the skill status of intelligent agents has been established. By receiving requests, verifying permissions, executing the flow and generating views, skill status changes are incorporated into a unified and controllable mechanism, realizing standardized management and control of the entire life cycle of skills, avoiding arbitrary operations, and laying the foundation for subsequent refined management and control; (2) The data reliability and system high availability of status flow operations have been improved. By introducing a distributed consensus algorithm, it is ensured that each status change record is effective only after consensus is reached among most nodes in the cluster. This effectively prevents status loss, conflict or inconsistency caused by single point of failure, and meets the requirements of strong consistency and high reliability for enterprise-level applications; (3) The quality control of the release and online process has been strengthened. By setting "at least one successful debugging" as a mandatory prerequisite for release from the draft state to the online state, the process mechanism ensures that any skill must undergo basic functional verification before providing services to the outside world. This fundamentally prevents untested skills from being deployed to the production environment and reduces the probability of online failures. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating a preferred embodiment of the lifecycle management method for intelligent agent skills in this application; Figure 2 This is a schematic diagram of a preferred embodiment of the lifecycle management device for intelligent agent skills in this application. Figure 3 This is a schematic diagram of a preferred embodiment of the electronic device of this application; The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0020] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0021] Reference Figure 1 The diagram shown is a flowchart illustrating an embodiment of the intelligent agent skill lifecycle management method of this application. The method is executed by an electronic device, which can be implemented by a software system and / or a hardware system. The intelligent agent skill lifecycle management method includes: Step 101: Receive a first state operation request for the target agent's skill, the first state operation request including a first user identity and a first target state.
[0022] A target intelligent agent skill refers to a specific, executable automated business process or functional unit, which can consist of a series of logical nodes and tool calls, and can be executed by an intelligent agent to complete a specific task. For example, a hospital outpatient registration and appointment skill can be a target intelligent agent skill, including a series of business nodes such as user identification, department selection, schedule inquiry, and appointment submission.
[0023] A first-state operation request refers to an operation request triggered by a user or system that intends to change the life stage of a target agent's skills.
[0024] The first user identity refers to the identifier information of the entity that initiates the status operation request. For example, this identity could be a project administrator or an automated scheduling system.
[0025] The first target state refers to the next specific lifecycle stage to which the skill is expected to be changed in the first state operation request. The first target state can include generating, draft, live, and generating failed.
[0026] The four states defined in this application embodiment can fully cover the entire lifecycle of a skill. The core definition, permission control rules, and applicable scenarios of each state are shown in Table 1 below.
[0027] Table 1. Examples of State Machine Rules
[0028] Step 102: Obtain the current state of the target intelligent agent's skill, and perform permission verification based on the first user identity, the current state, and the first target state.
[0029] The current state refers to the specific stage that the target intelligent agent's skill is currently in. For example, a skill that has just been generated and created by AI but has not yet been released is currently in the draft state; a skill that is currently providing services to the public is currently in the online state.
[0030] Permission verification refers to the process of logically judging whether a first user's identity is allowed to change a skill from its current state to a first target state based on a predefined set of rules.
[0031] The verification content of the permission verification includes, but is not limited to: checking whether the flow path from the current state to the first target state is allowed (for example, prohibiting direct jump from the online state to the generating state), and whether the first user identity has the operation permission to initiate such a state change in the current state of the skill.
[0032] In some embodiments, when the first state operation instruction is a release instruction and the current state is a draft state, pre-verification for the release instruction is performed, including: S11, determine whether the target agent skill has been executed at least once in the draft state as a successful debugging operation.
[0033] A release command is a specific type of first-state operation command, which means requesting that the agent's skill be changed from the draft state to the online state, that is, the skill is officially provided to the public.
[0034] Pre-verification refers to the mandatory checks performed on certain conditions that a skill must meet, based on business rules, before the formal execution of a state transition operation.
[0035] In some embodiments, during the permission verification process, the type of the first state operation instruction is first parsed and the current state of the skill is obtained. When the type of the first state operation instruction is identified as a release instruction and the current state of the skill is found to be draft state through query, a special verification process for the release instruction is triggered, that is, a pre-verification for the release instruction is performed.
[0036] It should be noted that the above examples illustrate the pre-verification of the release command for illustrative purposes. In practice, pre-verification can be performed for every change in state. For more details, please refer to the explanation of standardized state transition rules later in the text.
[0037] Debugging refers to the testing behavior of simulating online calls and running the complete skill process in an isolated sandbox environment in order to verify the correctness, stability and whether the business logic meets expectations while the skill is in draft form.
[0038] A successful debugging operation means that the final execution result of a debugging operation is judged to be completely successful, that is, all nodes in the skill process are executed correctly, no unhandled errors or exceptions are generated, and the output meets the expected results.
[0039] In some embodiments, when performing pre-release verification on a skill in a draft state, the test record storage or observability database of the skill can be accessed. Using the unique identifier of the target agent skill as the key, all execution records of type debug operation during its lifecycle in the draft state can be queried. Based on the execution records, it can be determined whether the target agent skill has been executed at least once successfully in the draft state.
[0040] S12, if the target agent skill has been successfully debugged at least once, then the pre-verification is deemed to have passed.
[0041] In some embodiments, after determining whether the target agent skill has been successfully debugged at least once in the draft state, if the query and determination result is yes, that is, confirming that there is at least one successful debugging record, then the pre-verification will be deemed to have passed.
[0042] S13, if the target agent's skills are not successfully debugged, the pre-verification is deemed to have failed.
[0043] In some embodiments, after determining whether the target agent skill has undergone at least one successful debugging operation in the draft state, if the query and determination result is negative, i.e., confirming that there is no debugging record with a successful execution status, then the pre-verification is deemed to have failed. This means that the skill has not undergone effective functional verification and does not meet the basic quality requirements for release. This process mandates that skills must be tested before release, ensuring the quality of released skills and preventing business risks caused by the release of untested skills from the outset.
[0044] Step 103: In response to successful permission verification, a state transition operation from the current state to the first target state is executed, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to the event sequence corresponding to the target agent skill.
[0045] State transition operation refers to the process of updating the state attribute of the target agent's skill from the current state value to the first target state value, and performing operations related to this state change.
[0046] An event log is a complete descriptive data record of a single state transition operation, which includes at least key information such as the type of operation, the target state of the operation, the executor of the operation, the timestamp of the operation, and the result of the operation.
[0047] An event sequence is an ordered set of all event records related to the skills of the same target agent, arranged in chronological order.
[0048] In some embodiments, the state transition operation from the current state to the first target state includes the following operations: S21, determine whether the transition from the current state to the first target state is allowed according to the predefined state machine rules.
[0049] Predefined state machine rules refer to a set of rules established in advance during the design or configuration phase, formally specifying all possible states of an agent's skills and the allowed transition paths and conditions between states. Examples of state machine rules are shown in Table 1 above.
[0050] In some embodiments, after successful permission verification, the current state and the first target state can be used as input to query a predefined set of state machine rules. The purpose of the query is to determine whether there exists a valid transition path from the current state to the first target state within the rule set. For example, assuming the current state is "draft" and the first target state is "launched," the rules can be queried to confirm the existence of a path from "draft" to "launched." Furthermore, it can be checked whether specific preconditions (such as mandatory pre-release validation conditions) are associated with this path, and these conditions are validated. Only when the path exists and all associated preconditions are met is it determined that the transition from the current state to the first target state is permitted.
[0051] S22, in response to the determination that the transition is allowed, based on the distributed consensus algorithm, the event record is replicated and committed as a state machine log among multiple nodes in the distributed cluster.
[0052] A distributed consensus algorithm is a protocol used in a distributed system composed of multiple independent nodes (computers) to achieve consensus on a given data value or the order of operations. Distributed consensus algorithms include Raft and Paxos. Their goal is to ensure consistent and correct service even when some nodes fail.
[0053] In the context of distributed systems and consensus algorithms, a state machine log specifically refers to a persistent sequence of all consensus-reached instructions (i.e., event records) that are about to be applied to the state machine or have already been applied. Each event record needs to go through a consensus process to ensure that all nodes in the cluster see the same sequence of instructions, thus guaranteeing that even if a node fails, the rebuilt states of each node will be identical.
[0054] A node is an independent computing unit in a distributed cluster; it can be a server or a server process.
[0055] S23, in response to the event record being successfully submitted by a majority of nodes in the distributed cluster, the state of the target agent's skill is updated to the first target state.
[0056] A majority of nodes successfully committing is a key condition in distributed consensus algorithms. This means that for a specific event record, the node that initiated the commit has received responses from more than half of the total number of nodes in the distributed cluster, confirming that the log has been successfully persisted.
[0057] When the coordinating node confirms that the event record has been successfully submitted by a majority of nodes in the distributed cluster, it means that the state change request has been globally and consistently recognized in the distributed environment and has been securely persisted on a majority of nodes. Even if individual nodes fail at this moment, the data cannot be lost.
[0058] In some embodiments, the event record includes an event type, an event payload, a timestamp, and an event sequence number.
[0059] Event type is a field in the event log that identifies the category of the state operation or behavior corresponding to the record. Typical event types include skill creation, state transition to generation, state transition to draft, state transition to online (i.e., published), state transition to generation failure, skill offline, and skill regeneration trigger.
[0060] An event payload is a field in an event record used to store specific business data and contextual information related to the current event type. The event payload is a structured data object, and its content varies depending on the event type. For example, for a release-type event record, its event payload may include the user identifier (operator) of the person performing the release operation, details of the results of all mandatory pre-release validation conditions passed during the release, and the version number of the generated online version. For a failure-type event record, its event payload may include the specific failure error code, error message, and the original configuration snapshot that triggered the generation.
[0061] A timestamp is a field in an event log that is used to precisely record the point in time when the event occurred.
[0062] The event sequence number is a field in the event record. It is a unique and monotonically increasing number used to identify the absolute order of the record in a specific event stream.
[0063] In some embodiments, adding the event record to the event sequence corresponding to the target agent skill includes: storing the event record in an event database; and linking the event record to the end of the event sequence according to the event sequence number, wherein the event sequence includes event records arranged in chronological order that describe all state transitions of the target agent skill since its creation.
[0064] An event database is a dedicated data store used for persistently storing event records. It can be a relational database, a NoSQL database, or a specialized event store.
[0065] In this embodiment, the data structure and storage specifications for state events are clearly defined, achieving a complete and orderly change history. By defining structured event records and linking them sequentially into an event sequence, a clear, tamper-proof, and sequentially traceable audit log is generated for each state transition of a skill, providing a reliable data foundation for problem localization, compliance auditing, and state rollback.
[0066] Step 104: Based on the event sequence, generate a lifecycle management view corresponding to the first target state.
[0067] A lifecycle management view is a visual interface or data presented to users that reflects the current lifecycle stage of a target intelligent agent's skills and its related contextual information.
[0068] In some embodiments, the latest current state of the target agent's skill (i.e., the first target state that has just been successfully updated) and the complete event sequence associated with the skill can be read, and the logic of the state display and exception handling unit can be invoked to dynamically render and generate a lifecycle management view.
[0069] In some embodiments, generating a lifecycle management view corresponding to the first target state based on the event sequence includes the following operations: S31, Obtain the metadata of the target agent's skills from the skill metadata repository.
[0070] The skill metadata repository is a dedicated data store used to store and manage all basic and descriptive configuration information of agent skills, excluding runtime dynamic data. It preserves the static definitions and configurations of skills. This includes basic configuration information required during skill creation, such as the skill name, business description, and selected API interface, as well as editable information in draft mode, such as toolboxes, business function nodes, and exception handling configurations.
[0071] Metadata is attribute data that describes the structure, capabilities, and configuration of a target intelligent agent's skills. For example, skill metadata includes skill name, business description, a list of associated API interface tools, process node definitions, parameter configurations, creator, and creation time.
[0072] In some embodiments, a query request can be initiated to the skill metadata repository using the unique identifier of the target agent's skill (such as a skill ID) as the query key. The skill metadata repository retrieves and returns all metadata related to the skill based on this identifier.
[0073] S32, retrieve operational metric data and log data associated with the event sequence from the observability data repository.
[0074] An observable data repository is a dedicated data storage system for centrally storing various types of data generated by an agent's skills during operation, debugging, and generation. These data types can include operational metrics, logs, and other data types, used to monitor, diagnose, and analyze the behavior and health status of the skills. Examples include execution logs, call statistics, running logs, debugging logs, and generation process logs.
[0075] Operational metrics data are numerical time-series data stored in the observability data repository, used to quantify the operational status, performance, and resource usage of an agent's skills. For example, operational metrics data for a skill in an online state may include the number of calls per unit time, average response time, success rate, failure rate, and the distribution of execution time across nodes.
[0076] Log data is a text record stored in an observability data repository, recorded chronologically, and describing discrete events that occur at specific points in time in relation to an agent's skills. Log data provides a detailed trace of the operational process. Examples include logs of the AI's thought process during skill generation, detailed steps and results logs generated during sandbox debugging in the draft state, and request and response details and error stacks for each business call when the skill is deployed.
[0077] In some embodiments, a query can be initiated to the observability data repository using the unique identifier of the target agent's skill and the time range covered by the event sequence or the ID of the relevant event as association conditions. Since the event sequence records all state changes of the skill (such as creation, release, and offline), operational metric data and log data associated with the corresponding time period or a specific event (such as a release event) can be obtained based on the timestamps of these events.
[0078] S33. Based on the event sequence, the metadata, the operational metrics data, and the log data, generate the lifecycle management view.
[0079] In some embodiments, the latest first target state of a skill can be determined based on the event sequence, the corresponding rendering logic of the state display and exception handling unit can be invoked, and the information most relevant to the state can be selected, organized and presented from various types of data to form a lifecycle management view.
[0080] For example, if the first target status is "online," the view can display the basic skill configuration in the metadata, integrate and display recent operational metric data, provide a query entry point for log data, and display the release history according to the event sequence. The operation area only provides buttons such as "offline."
[0081] If the first target status is "generation failed," the view can highlight the failure reason extracted from the log data, display the user's previously entered configuration in the metadata, and indicate the event of the last generation failure based on the event sequence. The operation area provides buttons such as "regenerate."
[0082] If the initial target state is draft, the view can display complete, editable metadata, provide associated debug log data, and check whether the release conditions are met based on the event sequence (such as whether there are successful debug records). The operation area provides buttons for release, debug, etc.
[0083] In some embodiments, the information dynamically combined according to the status can be presented as a complete user interface, namely a lifecycle management view, thereby achieving unified, intuitive and operable management of the skill's entire lifecycle status.
[0084] In some embodiments, generating a lifecycle management view further includes the following operations: S331, at least one external tool interface on which the target agent's skills depend is parsed from the metadata.
[0085] External tool interfaces refer to application programming interfaces (APIs) provided by external sources or services that a target intelligent agent's skills call to complete specific functions when executing their business processes. These correspond to the toolbox or selected API interface tools in the skill configuration. For example, the user identification interface, department list query interface, doctor schedule query interface, appointment submission interface, and payment interface relied upon by the outpatient registration and appointment skill could be five specific external tool interfaces.
[0086] S332, query the data lineage graph to obtain the upstream data source information and downstream dependent skill information of the at least one external tool interface.
[0087] A data lineage graph is a graphical model used to describe how data is generated, where it comes from, where it goes, and what transformations and processes it undergoes. Data lineage graphs can be used to track the sources, movements, transformations, and dependencies of data. In some embodiments, a data lineage graph can be a map recording the relationships between an external tool interface and the source (upstream) that provides its data, as well as the skills of other intelligent agents that depend on that interface (downstream).
[0088] Upstream data source information refers to the underlying databases, tables, or services that provide raw input data or business logic support for external tool interfaces. It describes where the interface's data or functionality originates. For example, for a doctor scheduling query interface, its upstream data source information could include the hospital scheduling management database that the interface queries and the specific doctor scheduling table.
[0089] Downstream dependent skill information refers to the identifiers and related information of other agent skills that are declared in their own metadata and depend on this external tool interface. It describes which skills use this interface. For example, in addition to the outpatient appointment booking skill, a hospital might also have an online consultation skill that relies on a doctor scheduling query interface to obtain available doctor appointment times; the online consultation skill could be considered a downstream dependent skill of this interface.
[0090] In some embodiments, the identifier of an external tool interface can be used as a query key to initiate a query to the database storing the data lineage map in order to obtain the upstream data source information of the interface, that is, which core or database ultimately supports the function or data of the interface, as well as the downstream dependent skills information of the interface.
[0091] S333, Based on the upstream data source information and the downstream dependent skill information, generate the lineage display panel of the lifecycle management view.
[0092] The lineage display panel is a specific visualization area or component in the lifecycle management view, designed to graphically or structurally display the data flow and dependencies between a target agent's skills and upstream data sources and downstream dependent skills through its external tool interfaces.
[0093] In some embodiments, when rendering the lifecycle management view, a separate display area can be created as a lineage display panel. Within this panel, the target agent's skill can be used as the core node, with arrows or lines connecting each external tool interface it resolves as an intermediate node. Starting from each interface node, arrows point to its corresponding upstream data source information (indicating the data source), and simultaneously, arrows point to each downstream dependent skill information that depends on that interface (indicating the data / service destination). This graphical approach intuitively presents the static dependencies and dynamic lineage relationships of skills to the user, allowing them to clearly understand the skill's input source, output impact, and its position in the overall business chain.
[0094] S334, Receive a change notification for the at least one external tool interface.
[0095] A change notification is a message issued by an external entity, service governance platform, or interface provider, informing that the configuration, version, protocol, or availability of a certain external tool interface is about to change or has already changed.
[0096] In some embodiments, a communication channel with the external tool interface management can be established through message queue subscription, registration of callback hooks, or polling of the interface registry center to receive change notifications from the external tool interface.
[0097] S335, based on the data lineage map, determine the skills of one or more agents that will be affected by the change, and form an affected skills set.
[0098] The affected skills set refers to the set of unique identifiers of all agent skills that, after analysis, are determined to be affected by a change event in an external tool interface.
[0099] In some embodiments, the data lineage graph can be queried again using the identifier of the changed external tool interface as the starting point. The graph can return a list of all skills that directly depend on this interface. Collecting all skill identifiers in this list and logically grouping them results in the set of affected skills.
[0100] S336, mark the skills in the affected skill set that are currently in the online state as risk skills, and generate alarm information to be displayed in the lifecycle management view.
[0101] Risk skills are temporary labels or attributes assigned internally to skills in the affected skill set that are currently in the online state. They are used to identify skills that face potential operational risks due to changes in dependencies and require priority attention and handling.
[0102] Alarm messages are automatically generated notification messages that alert users or maintenance personnel to potential risks. These messages include a detailed description of the risk, the affected parties, and suggested actions.
[0103] In some embodiments, each skill in the affected skill set can be traversed. For each skill in the set, its latest current status is queried. If the queried skill status is "online," the skill is marked as a risk skill. After traversal and marking are completed, specific alarm information can be generated.
[0104] In this embodiment, proactive risk management based on dependencies is implemented. By analyzing the dependencies of skills on external interfaces and monitoring upstream changes using data lineage graphs, affected online skills can be automatically identified and alerts generated. This shifts from passive response to proactive prevention, enabling the assessment and handling of potential risks before dependencies change, thus ensuring the stability of the business chain.
[0105] In some embodiments, the lifecycle management method for intelligent agent skills disclosed in this application may further include: S41, Receive a state rollback request for the target agent's skill, the state rollback request including the target event sequence number.
[0106] A state rollback request is a special operation request triggered by a user or agent, used to restore the current state of a target agent's skill to a state at a specific point in history.
[0107] The target event sequence number is a key parameter included in the state rollback request, used to specify the precise position in the event sequence to which the rollback operation should be traced.
[0108] S42, read the event records from the first event record to the event sequence number corresponding to the target event from the event database to form a target event subsequence.
[0109] The event record corresponding to the target event sequence number refers to the specific event record in the event sequence whose value of the event sequence number field corresponds to the target event sequence number specified in the status rollback request.
[0110] A target event subsequence is an ordered set of consecutive event records that start from the first event record and end at the event record corresponding to the target event sequence number, arranged in order of event sequence number.
[0111] S43, by re-executing each event record in the target event subsequence, the state of the target agent's skill is reconstructed to the state at the time corresponding to the target event sequence number.
[0112] Re-execution refers to the process of applying the state change operations represented by each historical event record in the target event subsequence again in their original chronological order.
[0113] State reconstruction refers to the process of re-executing historical events to gradually update all the current variable attributes of the target agent's skills (including but not limited to core state fields, configuration content, version information, etc.) until the result is consistent with the operation at a specific moment in history (i.e. the moment corresponding to the target event sequence number).
[0114] In some embodiments, a temporary, initially empty (or consistent with the state before skill creation) skill state context can be created. Starting with the first event record in the target event subsequence (i.e., the first event record, which could be a creation event), each record is processed sequentially according to its sequence number. For each event record, its event type and event payload are parsed, and the operation represented by that event is simulated. For example, if the event type is a state transition to "Generation in Progress," the skill state is set to "Generation in Progress" in the temporary context; if the event type is a "Release," not only is the state set to "Live," but the corresponding online version is also created based on the information in the event payload. After all events have been re-executed, the skill state in the temporary context is equal to the state after the target event was historically processed. This reconstructed state (and its associated configuration and version data) is replaced or marked as the skill's current latest valid state, thereby completing the reconstruction of the target agent's skill state to the state at the time corresponding to the target event sequence number. This method ensures the accuracy and consistency of state rollback because it is achieved by replaying authoritative historical operation logs, rather than simply overwriting them.
[0115] This embodiment provides precise state rollback capabilities. By reading and replaying the historical records of a specified segment in the event sequence, the state of a skill (including its configuration) can be accurately reconstructed to any point in history, realizing critical version rollback and rapid fault recovery functions in enterprise-level operations and maintenance, and enhancing the maintainability and robustness of the system.
[0116] The following embodiments use hospital outpatient registration and appointment skills as an example to illustrate the specific implementation process of the present invention in detail: 1. Basic Scenario Information: A hospital tenant needs to create an outpatient registration and appointment skill to realize the entire business process of user identification, department selection, schedule query, appointment submission and payment. The skill is created by selecting AI generation method, filling in the skill name, business description and selecting 5 corresponding API interfaces.
[0117] 2. Status Management During Creation and Generation: When a user clicks "AI Generation", the system verifies the basic information and assigns the initial status of the skill to "Generating". It intercepts all editing and publishing operations and displays the thought process of AI generation to the user in real time. If the generation task fails due to an abnormal matching of interface input and output parameters during the AI generation process, the skill will automatically switch to the "Generation Failed" status, displaying the reason for the failure to the user, while retaining all configuration information filled in by the user and the generation process.
[0118] 3. Handling of generation failure exceptions: When the user clicks "Regenerate", the original configuration will be displayed in a pop-up window. After the user adds or modifies the business description, they can click "Confirm Generation", and the skill flow will change to the "Generating" status. If the AI generation task is successfully executed, the skill will automatically change to the "Draft" status, displaying the generated business function nodes and processes.
[0119] 4. Draft editing and debugging: In draft mode, users can fine-tune the generated process nodes, and the system automatically saves the configuration every minute; users can enter the debug tab to complete 3 full-process sandbox simulation debuggings, and the last debugging execution is successful, meeting the pre-release conditions.
[0120] 5. Release and Online Status Management: When a user clicks "Release," the system performs pre-release verification. Once all verifications pass, the skill flow transitions to the "Online" status, generating an official online version, which is stored in isolation and provides C-end SDK call services. In the online state, the system intercepts all editing and modification operations, and only supports viewing execution logs and taking the system offline.
[0121] 6. Version Modification and Re-release: Users need to add a coupon redemption step to the reservation process. After clicking "Offline," the system verifies that there are no ongoing tasks, and the skill flow changes to the "Draft" state, and the online version stops service. Users can modify the process in the draft state, add a coupon redemption node, and re-release after debugging. The skill will then change to the "Online" state again, generating a new online version. At the same time, historical version records are retained, supporting retrospection.
[0122] The full lifecycle state management scheme for intelligent agent skills provided in this application embodiment can bring the following technical effects: (1) Construct a full lifecycle state machine to achieve refined management and control of the entire process: Define four standardized states covering the generation process, draft, online, and generation failure, fully covering the entire lifecycle of skills from creation, generation, debugging, release, online, offline, and modification. Exclusive operation permissions and management and control rules can be configured for each state to achieve refined management and control.
[0123] (2) Adapt to AI generation scenarios and ensure the stability of the generation process: For the entire process of AI automated generation, exclusive "generating" and "generation failed" states are set up to constrain user operations during the generation process and avoid repeated triggering and abnormalities caused by configuration modifications; at the same time, for the scenario of generation failure, the configuration information and error content are retained, and one-click regeneration is supported, which greatly improves the efficiency of use.
[0124] (3) Strengthen online version control and ensure business stability: It is clear that skills that are already online are prohibited from being edited or modified. They must be changed to draft status through offline operation before they can be modified and republished. This mechanism prevents online versions from being modified at will and ensures the stable operation of online business.
[0125] (4) Standardized draft state debugging mechanism to improve release compliance: The draft state supports sandbox debugging capabilities, which can fully simulate the online execution link for testing. It restricts skills to be released only after debugging and verification, thus avoiding business risks caused by the release of untested skills from the source and meeting enterprise-level compliance release requirements.
[0126] (5) Improved abnormal state handling capabilities and enhanced user experience: For the state of failure to generate, the reason for failure is automatically displayed, the previous configuration information and generation process are retained, and the pop-up window for one-click restart is supported. Users do not need to fill in the configuration repeatedly, which greatly improves the efficiency of abnormal handling and user experience.
[0127] (6) Implement version isolation management to meet enterprise-level requirements: Implement isolated management of online and draft versions of skills. Modifications taken offline will not affect the online version currently in operation. At the same time, version rollback is supported to meet enterprise-level version management and maintenance requirements.
[0128] Reference Figure 2 The diagram shown is a functional module schematic of the intelligent agent skill lifecycle management device 100 of this application.
[0129] The intelligent agent skill lifecycle management device 100 described in this application is installed in an electronic device. Depending on the functions implemented, the intelligent agent skill lifecycle management device 100 includes a receiving module 110, an acquiring module 120, an execution module 130, and a generation module 140. These modules can also be referred to as units, which are a series of computer program segments that can be executed by the electronic device's processor and perform a fixed function, stored in the electronic device's memory.
[0130] In this embodiment, the functions of each module / unit are as follows: The receiving module 110 is configured to receive a first state operation request for the target intelligent agent's skill, wherein the first state operation request includes a first user identity and a first target state; The acquisition module 120 is used to acquire the current state of the target intelligent agent's skill and perform permission verification based on the first user identity, the current state, and the first target state; The execution module 130 is configured to, in response to successful permission verification, perform a state transition operation from the current state to the first target state, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to an event sequence corresponding to the target agent skill; The generation module 140 is used to generate a lifecycle management view corresponding to the first target state based on the event sequence.
[0131] The specific implementation of the lifecycle management device for intelligent agent skills in this application is largely the same as the specific implementation of the lifecycle management method for intelligent agent skills described above, and will not be repeated here.
[0132] Reference Figure 3 The diagram shown is a schematic representation of a preferred embodiment of the electronic device of this application.
[0133] The electronic device includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs, such as lifecycle management programs for intelligent agent skills; In some embodiments, the processor 111 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 111 can be used to control the overall operation of the electronic device, such as performing data interaction or communication-related control and processing. In this embodiment, the processor 111 is used to run program code stored in the memory 113 or process data.
[0134] The communication interface 112 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The communication interface 112 may also be used to establish a communication connection between the electronic device and other electronic devices.
[0135] The memory 113 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 113 may be an internal storage unit of the electronic device, such as the hard disk or memory of the electronic device. In other embodiments, the memory 113 may also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. of the electronic device. Of course, the memory 113 may include both internal storage units and external storage devices of the electronic device. In this embodiment, the memory 113 may be used to store the operating system and various computer programs installed on the electronic device, such as the program code of a lifecycle management program for intelligent agent skills. In addition, the memory 113 may also be used to temporarily store various types of data that have been output or will be output.
[0136] Figure 3 Only an electronic device with components 111-114 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0137] In this embodiment, the processor 111, when executing the program stored in the memory 113, implements the lifecycle management method for intelligent agent skills provided in any of the foregoing method embodiments, including: Receive a first state operation request for the target agent's skill, the first state operation request including a first user identity and a first target state; Obtain the current state of the target agent's skill, and perform permission verification based on the first user identity, the current state, and the first target state; In response to successful permission verification, a state transition operation from the current state to the first target state is executed, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to the event sequence corresponding to the target agent skill; Based on the event sequence, a lifecycle management view corresponding to the first target state is generated.
[0138] For a detailed explanation of the above steps, please refer to the above. Figure 1Description of a flowchart of an embodiment of a lifecycle management method for intelligent agent skills.
[0139] Furthermore, this application also proposes a computer-readable storage medium that is both non-volatile and volatile. This computer-readable storage medium is any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a data storage area and a program storage area. The program storage area stores a lifecycle management program for an intelligent agent skill. When executed by a processor, the lifecycle management program for the intelligent agent skill performs the following operations: Receive a first state operation request for the target agent's skill, the first state operation request including a first user identity and a first target state; Obtain the current state of the target agent's skill, and perform permission verification based on the first user identity, the current state, and the first target state; In response to successful permission verification, a state transition operation from the current state to the first target state is executed, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to the event sequence corresponding to the target agent skill; Based on the event sequence, a lifecycle management view corresponding to the first target state is generated.
[0140] The specific implementation of the computer-readable storage medium in this application is largely the same as the specific implementation of the above-described lifecycle management method for intelligent agent skills, and will not be repeated here.
[0141] It should be noted that the sequence numbers of the embodiments in this application are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware simulation platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in the storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0143] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for lifecycle management of intelligent agent skills, characterized in that, The method includes: Receive a first state operation request for the target agent's skill, the first state operation request including a first user identity and a first target state; Obtain the current state of the target agent's skill, and perform permission verification based on the first user identity, the current state, and the first target state; In response to successful permission verification, a state transition operation from the current state to the first target state is executed, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to the event sequence corresponding to the target agent skill; Based on the event sequence, a lifecycle management view corresponding to the first target state is generated.
2. The lifecycle management method for intelligent agent skills as described in claim 1, characterized in that, The state transition operation from the current state to the first target state includes: Based on predefined state machine rules, determine whether a transition from the current state to the first target state is permitted; In response to the determination that the transition is allowed, the event record is replicated and committed as a state machine log among multiple nodes in the distributed cluster based on a distributed consensus algorithm; In response to the event log being successfully submitted by a majority of nodes in the distributed cluster, the state of the target agent's skill is updated to the first target state.
3. The lifecycle management method for intelligent agent skills as described in claim 1, characterized in that, The event log includes the event type, event payload, timestamp, and event sequence number; Adding the event record to the event sequence corresponding to the target agent's skill includes: The event records are stored in the event database; Based on the event sequence number, the event record is linked to the end of the event sequence, which includes event records arranged in chronological order that describe all state changes of the target agent's skill since its creation.
4. The lifecycle management method for intelligent agent skills as described in claim 3, characterized in that, The method further includes: Receive a state rollback request for the target agent's skill, the state rollback request including the target event sequence number; From the event database, read the event records from the first event record to the event sequence number corresponding to the target event sequence number to form a target event subsequence; By re-executing each event record in the target event subsequence, the state of the target agent's skill is reconstructed to the state at the time corresponding to the target event sequence number.
5. The lifecycle management method for intelligent agent skills as described in claim 1, characterized in that, The step of generating a lifecycle management view corresponding to the first target state based on the event sequence includes: Obtain the metadata of the target agent's skills from the skill metadata repository; Obtain operational metric data and log data associated with the event sequence from the observability data repository; The lifecycle management view is generated based on the event sequence, the metadata, the operational metrics data, and the log data.
6. The lifecycle management method for intelligent agent skills as described in claim 5, characterized in that, The generation of the lifecycle management view includes: At least one external tool interface on which the target agent's skills depend is parsed from the metadata; Query the data lineage graph to obtain upstream data source information and downstream dependent skill information of the at least one external tool interface; Based on the upstream data source information and the downstream dependent skill information, a lineage display panel for the lifecycle management view is generated; Receive change notifications for at least one external tool interface; Based on the data lineage map, identify one or more agent skills that will be affected by the changes, forming a set of affected skills; The skills in the affected skill set that are currently online are marked as risk skills, and alarm information is generated and displayed in the lifecycle management view.
7. The lifecycle management method for intelligent agent skills as described in claim 1, characterized in that, The first target state includes a generating state, a draft state, and an online state; the permission verification based on the first user identity, the current state, and the first target state includes: When the first state operation instruction is a release instruction and the current state is a draft state, perform pre-verification for the release instruction, including: Determine whether the target agent's skill has been successfully debugged at least once in the draft state; If the target agent's skill has been successfully debugged at least once, then the pre-verification is deemed to have passed. If the target agent's skills are not successfully debugged, the pre-verification is deemed to have failed.
8. A lifecycle management device for intelligent agent skills, characterized in that, The device includes: The receiving module is configured to receive a first state operation request for the target intelligent agent's skill, wherein the first state operation request includes a first user identity and a first target state; The acquisition module is used to acquire the current state of the target intelligent agent's skill and perform permission verification based on the first user identity, the current state, and the first target state; An execution module is configured to, in response to successful permission verification, perform a state transition operation from the current state to the first target state, wherein the state transition operation generates an event record corresponding to the first request and adds the event record to an event sequence corresponding to the target agent skill; The generation module is used to generate a lifecycle management view corresponding to the first target state based on the event sequence.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the lifecycle management method for the intelligent agent skills as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the lifecycle management method for intelligent agent skills as described in any one of claims 1 to 7.