An agent capability extension method and system based on external capability resource analysis and callable capability asset compilation
By parsing and merging external capability resources to generate callable capability assets, the problems of low efficiency, method bloat, and security risks in the expansion of intelligent agent capabilities are solved. Automated transformation and security verification are achieved, improving the efficiency and security of intelligent agent capability expansion.
Patent Information
- Application Number
- CN202611518601.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies suffer from problems such as low efficiency, lack of method assets, method bloat, and security risks in the process of expanding the capabilities of intelligent agents. They cannot automatically transform external capability resources into internal reusable and composable method assets, and new access capabilities lack verification mechanisms.
By parsing external capability resources, a structured capability representation that can be processed by machines is generated, common templates are extracted and similar capabilities are merged, an isolated verification environment is set up to verify validity, a callable capability asset is formed, and call eligibility control is implemented when the source changes.
It enables automated compilation of external capability resources into the intelligent body, improves extension efficiency, avoids method bloat, ensures security and reliability, and provides reusable method assets.
Smart Images

Figure CN123137630A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence and intelligent agent capability extension technology, and more specifically to an intelligent agent capability extension method and system based on external capability resource parsing and compiling callable capability assets, which automatically compiles external capability resources into verifiable, reusable, and governable callable capability assets and extends them to the intelligent agent's method space. Background Technology
[0002] With the development of artificial intelligence technology, AI agent systems, multi-agent collaborative systems, automated workflow systems, and low-code development platforms have been widely applied. In the practical implementation of these systems, it is often necessary to dynamically expand the capabilities of the agents, integrating external tools and skills into the agent's methodology to enrich the types of tasks the agents can handle. Existing AI agent systems typically expand their capabilities in the following ways: The manual implementation of prompts involves developers reading external skill documents, tool manuals, or API descriptions, then summarizing and writing them into prompt templates or system instructions for the agent to refer to when calling them. This approach requires repeatedly reading documentation, understanding the function, writing a prompt, and testing and verifying it for each new external capability added, making it highly reliant on manual labor. When a large number of capabilities are added, the labor cost is high, and the quality of prompts produced by different personnel varies, making consistency difficult to guarantee.
[0003] The Function Calling / Tool Calling approach involves registering external tools or APIs with an agent as function definitions. The agent then decides autonomously whether and how to call the corresponding tool during runtime. However, each tool in this approach requires manual definition, making it impossible to automatically abstract methods from multiple similar tools or compress common patterns among multiple tools. As the number of integrated tools increases, the tool definitions will continue to accumulate and expand.
[0004] RAG knowledge base management systems store external documents, skill descriptions, and sample code in a vector database, providing information to agents through retrieval-enhanced generation. However, such solutions can only output reference information to agents and cannot generate executable method assets. The system itself lacks pattern extraction and verification mechanisms; agents still need to understand and digest the retrieved document fragments on their own, failing to transform external capability resources into internal reusable executable methods.
[0005] Workflow orchestration involves developers pre-combining multiple tool calls into a fixed workflow, which the agent then executes according to the pre-set process. This approach heavily relies on manual orchestration, cannot automatically generate workflows from external skill resources, and lacks a corresponding validation gate mechanism.
[0006] Another approach employs skills learning and skills transfer learning, relying on a small number of samples to learn new skills. However, these techniques focus on updating model parameters or fine-tuning the model, and do not cover the complete compilation and transformation process from external capability resources to structured methodological assets.
[0007] In addition, agent configuration / plugin systems have emerged in the industry, relying on configuration files or plugin mechanisms to extend agent capabilities. However, plugin configuration is highly dependent on manual operation, the system lacks automatic pattern extraction capabilities, and it also lacks a candidate method verification process. Newly integrated capabilities can easily be directly introduced into the runtime environment, bringing reliability and security risks. This problem is particularly prominent in security-sensitive scenarios such as financial transactions, industrial control, and medical assistance.
[0008] In summary, existing capability extension solutions each have their limitations. Some existing solutions do not provide a combination mechanism for maintaining source dependency, isolating candidate access, and restricting the original calling qualifications after changes in source-related validity information. This has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0009] In view of this, the present invention provides a method and system for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets, specifically solving the following technical problems: (1) Efficiency problem of capability expansion: The process of transforming external capability resources into executable methods of intelligent agents is highly dependent on manual labor and cannot be scaled up; (2) Problem of missing method assets: External capability resources cannot be automatically converted into reusable and composable method assets within the agent; (3) Method explosion problem: When the number of external capability objects increases, if the common template is not extracted and the difference boundary mapping is not retained, a large number of redundant methods are easily generated, resulting in redundant expansion of the number of methods; (4) Risks of accessing new capabilities: Newly accessed external capabilities lack an automatic verification mechanism, which poses security and reliability risks.
[0010] This invention is applicable to computer systems, software systems, or automated control systems that generate, select, combine, verify, route, invoke, or update one or more callable processing capabilities based on task requirements, operating status, operating constraints, or historical operating information; including but not limited to artificial intelligence systems, multi-agent systems, software development and maintenance systems, distributed software platforms, workflow systems, cloud computing systems, enterprise software systems, industrial control systems, robot systems, model service systems, data processing systems, and tool or service invocation systems. In one embodiment, this invention is applied to AI agent systems, parsing external capability resources such as Methods, Skills, Tools, APIs, MCP services, and Agent capabilities; forming candidate callable capability structures and compiling callable capability assets; and implementing call eligibility control after changes in source validity.
[0011] This invention does not replace the system's basic reasoning capabilities, nor does it replace the agent's task planning capabilities. Instead, it serves as a "capability input and compilation layer" within the agent's capability system, providing the agent with an automated conversion channel from external fragmented capability resources to internal structured callable capability assets. This invention centers on the protection of external capability resource parsing, candidate callable capability structure formation, source-related asset formation, and call eligibility control after changes in source validity. Other related technologies (such as experience-driven subsequent call control adjustments, method structure gap filling, overall state space evolution, and final execution authorization) can be used as related implementation methods, but are not essential technical features of this invention.
[0012] To achieve the above objectives, the present invention provides the following technical solution: A method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets includes the following steps: S1. Acquire external capability resources and perform parsing processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source; S2. Generate candidate callable capability structures based on at least one machine-processable structured capability representation, and establish an association between the candidate callable capability structures and external capability resources or their source information that participate in forming the candidate callable capability structures, as well as information used to determine interfaces, execution constraints, applicable conditions, failure boundaries or other validity conditions; S3. Perform validity checks on candidate callable capability structures, and record the failure reasons and failure boundary information of candidate callable capability structures that fail the checks; before a candidate callable capability structure meets the predetermined validity conditions, it does not change the agent's currently valid capability selection, invocation decision, or execution control result. S4. The candidate callable capability structures that meet the predetermined valid conditions are deposited as callable capability assets and stored in the method space of the agent for the agent to call and reuse. When storing in the method space, the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structure is established. S5. When the source information of the interface, execution constraints, applicable conditions, failure boundaries or other validity basis of the callable capability asset changes, the callable capability asset that may be affected shall be determined based on the source association; before the callable capability asset is re-determined to meet the predetermined validity conditions, the callable capability asset shall be restricted from participating in subsequent calls according to the capability selection, call decision or execution conditions before the change.
[0013] Optionally, in S1, the external capability resource is at least one of the following: skill description file, tool definition file, API interface description document, workflow configuration file, agent capability declaration file, function specification document, code interface description information, plugin description, MCP capability declaration or tool declaration, SDK interface information, OpenAPI or other interface pattern file, service capability description, function definition or other machine-readable or resolvable resource, carrying at least one of capability description information, input / output specifications, execution constraints and applicable conditions.
[0014] Optionally, in S1, the parsing process includes at least one of semantic parsing, structural parsing, pattern parsing, interface pattern parsing, static code parsing, rule extraction, template matching, field mapping, information extraction, or model-assisted parsing; the machine-processable structured capability representation includes one or more of capability objects, graph structures, structured documents, table structures, key-value structures, or registry entries; when the machine-processable structured capability representation is a capability object, the extracted capability information and source metadata are encapsulated into capability objects to obtain capability objects carrying source associations; wherein, the source metadata is at least one of resource identifier, parsing version, content fingerprint, source location, source subject identifier, resource version, content summary, update time, source interface version, or source dependency identifier; capability information includes one or more of capability type, capability parameters, capability constraints, capability applicable conditions, and failure boundary conditions; the capability object includes one or more information dimensions of capability type identifier, input parameter specification, output result specification, execution preconditions, execution constraints, applicable scenario description, and failure boundary conditions.
[0015] Optionally, in S2, when candidate callable capability structures are generated based on multiple machine-processable structured capability representations, and the machine-processable structured capability representations are capability objects, similarity analysis, pattern recognition, or structure merging is used to determine the capability pattern; wherein, similarity analysis, pattern recognition, or structure merging includes at least one of clustering, vector similarity, rule matching, graph structure matching, template matching, model inference, or neural network pattern recognition; the specific process of generating candidate callable capability structures is as follows: For each capability object, extract a feature vector or feature set. The feature vector or feature set includes one or more of the following: capability type features, input / output structure features, execution flow features, constraint features, and applicable scenario features. Based on the extracted feature vectors or feature sets, multiple capability objects are similarly merged, and multiple capability objects with similar capability features, similar processing procedures or similar constraints are grouped into the same capability pattern cluster; A common structure is extracted from multiple capability objects in the same capability pattern cluster to form a common template. Candidate callable capability structures are generated based on the common template and object difference parameter mapping. The object difference parameter mapping includes at least the interface differences, applicable scope differences, execution constraint differences, failure boundary differences, and corresponding parameter or path selection rules between different sources. The applicable scope of the candidate callable capability structure is jointly limited by the common template and the difference boundary. When multiple candidate callable capability structures corresponding to multiple capability pattern clusters have the same method signature or the same processing flow, the corresponding candidate callable capability structures are merged and the method reuse relationship is recorded.
[0016] Optionally, in S2, the capability form of the candidate callable capability structure includes one or more of the following: method, skill, tool, function, plugin, agent, model capability, service, operator, workflow, action, execution node, call chain, execution plan, or composite structure; the candidate callable capability structure includes at least one of the following: method signature, method flow, method constraint, method verification condition, and failure boundary condition.
[0017] Optionally, in S3, when performing validity verification on candidate callable capability structures, at least one of the following methods can be used: isolated verification environment, shadow execution, simulation execution, read-only execution, real-time verification, sandbox, static verification, interface contract verification, replay verification, or restricted permission execution. When using an isolated verification environment for validity verification, the isolated verification environment is configured with the simulated dependencies, simulated data, simulated permissions, and security boundary configurations required for the execution of the candidate callable capability structure. An isolation boundary is set between the isolated verification environment and the agent's formal operating environment. The execution result of the candidate callable capability structure in the isolated verification environment does not change the agent's state in the formal operating environment.
[0018] Optionally, in S3, when using an isolated verification environment to perform validity verification, at least one verification test case is generated based on the method constraints and method verification conditions of the candidate callable capability structure. The verification test case covers at least one of the normal execution path, boundary condition execution path, and failure boundary execution path. The candidate callable capability structure is run using the verification test case in the isolated verification environment to verify the execution result, constraint compliance, failure boundary condition handling, and whether unexpected side effects are generated.
[0019] Optionally, S3 also includes: the failure reasons and failure boundary information of candidate callable capability structures that fail verification are recorded in the failure record library and converted into candidate generation constraints or verification enhancement conditions that are only used in the upstream parsing and capability objectification process or the candidate callable capability structure generation process; in the parsing and capability objectification process or the candidate callable capability structure generation process, the generation of candidates with the same failure mode is restricted according to the candidate generation constraints, or corresponding boundary verification test cases are added according to the verification enhancement conditions.
[0020] Optionally, in S5, when external capability resources change, the source information of the change is correlated with the validity basis actually used when forming the callable capability asset; the associated callable capability asset is determined to be potentially affected only when the change affects the interface, execution constraints, applicable conditions, failure boundaries, version conditions, or other validity basis that participated in forming the callable capability asset; before the callable capability asset meets the predetermined validity conditions again, the callable capability asset is restricted from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change; if the irrelevant source information that did not participate in the formation of the callable capability asset changes, the call restriction on the callable capability asset is not triggered; wherein, the source association relationship is implemented through one or more of the following: reference, mapping, dependency graph, lineage, version, content fingerprint, hash, or event chain.
[0021] A system for extending the capabilities of an intelligent agent based on the parsing of external capability resources and the compilation of callable capability assets, which executes the method for extending the capabilities of an intelligent agent based on the parsing of external capability resources and the compilation of callable capability assets as described above, includes a parsing and processing and structured capability representation module, a candidate callable capability structure generation module, an admission verification module, a callable capability asset formation module, and a source change response module. The parsing and structured capability representation module is used to acquire external capability resources and perform parsing and processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source. The candidate callable capability structure generation module is used to generate a candidate callable capability structure based on at least one machine-processable structured capability representation, and to establish an association between the candidate callable capability structure and the external capability resources or their source information that participate in forming the candidate callable capability structure, as well as information used to determine the interface, execution constraints, applicable conditions, failure boundaries or other validity conditions. The admission verification module is used to perform validity verification on candidate callable capability structures, and record the failure reasons and failure boundary information of candidate callable capability structures that fail verification; before the candidate callable capability structure meets the predetermined validity conditions, it does not change the agent's currently valid capability selection, invocation decision or execution control result. The callable capability asset formation module is used to deposit candidate callable capability structures that meet predetermined valid conditions as callable capability assets into the method space of the agent for the agent to call and reuse; when storing them into the method space, the module establishes the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structures. The source change response module is used to determine the potentially affected callable capability assets based on the source association when the source information of the interface, execution constraints, applicable conditions, failure boundaries, or other validity basis that participated in the formation of callable capability assets changes. Before the callable capability assets are re-determined to meet the predetermined validity conditions, the module restricts the callable capability assets from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change.
[0022] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets, which has the following beneficial effects: (1) Implement automated compilation of external capability resources into callable capability assets to improve capability expansion efficiency. This invention transforms the access to external capability resources from "manual reading comprehension → manual writing" to "automatic parsing → automatic compilation" through an automated process of external capability resource parsing, capability objectification, pattern extraction, and candidate callable capability structure generation. This upgrades the expansion of intelligent agent capabilities from manual operation to an automated compilation process, significantly reducing labor costs and improving expansion efficiency.
[0023] (2) Transform external capability resources into reusable and callable capability assets to achieve "compile once, reuse many times".
[0024] This invention transforms external capability resources into executable, reusable, and formally callable capability assets within an intelligent agent through capability objectification and a candidate callable capability structure generation mechanism. Unlike the RAG system, which only provides "reference information," this invention makes external capability resources truly methods that the intelligent agent can directly invoke. When the intelligent agent encounters similar capability requirements in subsequent tasks, it does not need to re-retrieve and understand the original resources; it can directly invoke the compiled methods to complete the execution.
[0025] (3) Method compression is achieved through pattern recognition and method merging to avoid linear expansion of the number of methods.
[0026] This invention identifies the common structure among multiple capability objects through capability pattern extraction and method merging mechanisms, and merges multiple capabilities with the same or similar processing logic into a single method. This reduces the number of methods in the method space to the level of capability patterns rather than the level of capability objects, thus avoiding the storage expansion and retrieval efficiency reduction problems caused by "method explosion" in traditional methods.
[0027] (4) Ensure the security and reliability of new access capabilities through isolation and verification mechanisms.
[0028] This invention establishes an isolated verification environment, ensuring that candidate callable capability structures are verified before entering the formal runtime environment. Compared to existing technologies that directly apply newly accessed capabilities to the runtime environment, this invention, through isolated verification and specialized verification of failure boundary conditions, ensures that candidate callable capability structures meet execution conditions, security conditions, and correctness requirements before entering the method space. This reduces the possibility of erroneous methods entering the runtime environment, leading to agent execution anomalies or security risks.
[0029] (5) Continuously reduce the recurrence of similar failure patterns through failure experience constraint mechanisms.
[0030] This invention records the failure reasons and failure boundary information of candidate callable capability structures that fail verification, forming failure experience constraints. In the subsequent parsing of capability objects and generation of candidate callable capability structures, it actively restricts the generation of candidate callable capability structures with similar failure characteristics or reduces their priority, thus upgrading failure experience from "discarded logs" to "constraints that actively affect the generation of subsequent methods".
[0031] (6) Provide a general capability extension scheme that is independent of specific capability resource formats.
[0032] This invention does not rely on the specific format of external capability resources (such as SKILL.md, YAML, JSON, API documentation, etc.), and uniformly converts various types of external capability resources into standardized capability objects, which has good format compatibility and cross-platform applicability.
[0033] (7) When the validity information of the source changes, the affected callable capability assets are restricted from entering the formal call according to the original call qualification until they are re-determined to meet the predetermined validity conditions. This is to prevent the source interface and constraint drift from causing the old method to continue to be called according to the conditions before failure, and to prevent the agent from calling callable capability assets that are inconsistent with the source constraints. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0035] Figure 1 A schematic diagram of the overall process of the intelligent agent capability extension method based on external capability resource parsing and compiling callable capability assets provided by the present invention; Figure 2 A schematic diagram illustrating the field composition and information dimensions of the structured capability object data structure provided by this invention; Figure 3 A schematic diagram illustrating the specific process of capability pattern extraction and candidate generation provided by the present invention; Figure 4 This is a flowchart illustrating the isolation verification and verification gate mechanism for the candidate callable capability structure provided by the present invention. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] This invention discloses a method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets, such as... Figure 1 As shown, it includes the following steps: I. Semantic parsing and capability objectification S1. Acquire external capability resources and perform parsing processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source.
[0038] External capability resources are at least one of the following: skill description files, tool definition files, API interface description documents, workflow configuration files, agent capability declaration files, function description documents, code interface description information, plugin descriptions, MCP capability declarations or tool declarations, SDK interface information, OpenAPI or other interface pattern files, service capability descriptions, function definitions or other machine-readable or resolvable resources, carrying at least one of the following: capability description information, input / output specifications, execution constraints and applicable conditions.
[0039] In one optional embodiment of the present invention, the parsing process includes at least one of semantic parsing, structural parsing, pattern parsing, interface pattern parsing, static code parsing, rule extraction, template matching, field mapping, information extraction, or model-assisted parsing; the machine-processable structured capability representation includes one or more of capability objects, graph structures, structured documents, table structures, key-value structures, or registry entries.
[0040] When a machine can process structured capabilities represented as capability objects, it performs capability objectification encapsulation processing on the extracted capability information and source metadata to obtain capability objects carrying source associations. Among them, the source metadata includes at least one of resource identifier, parsing version, content fingerprint, source location, source subject identifier, resource version, content summary, update time, source interface version, or source dependency identifier. Capability information includes one or more of capability type, capability parameters, capability constraints, capability applicable conditions, and failure boundary conditions. Capability objects include one or more information dimensions of capability type identifier, input parameter specification, output result specification, execution preconditions, execution constraints, applicable scenario description, and failure boundary conditions.
[0041] like Figure 2 As shown, a capability object is a structured representation of external capability resources, and the information dimensions it contains are described in detail below: (1) Capability type identifier, used to identify the functional category to which the capability belongs, including but not limited to one or more of the following: document processing, data analysis, code generation, API call, workflow orchestration, communication interaction, and storage operation.
[0042] (2) Input parameter specification, which describes the input parameters required when calling the capability, including at least one or more of the following: parameter name, parameter type, parameter format, whether it is required, default value, and value range.
[0043] (3) Output result specification, which describes the output result returned after the capability is executed, including at least one or more of the following: output type, output format, output structure, and success status code.
[0044] (4) Execution prerequisites, which describe the environmental conditions or system status that need to be met before calling the capability, including but not limited to one or more of the following: whether the dependent services are available, whether the permissions are available, whether the resources are sufficient, and whether the prerequisite capability has been completed.
[0045] (5) Execution constraints, which describe the restrictions that the capability needs to comply with during execution, including but not limited to one or more of the following: execution time limit, resource consumption limit, concurrency limit, call frequency limit, data size limit, and network access limit.
[0046] (6) Applicable scenario description, which describes the task type, application scenario or usage context to which the capability is applicable, and is used for scenario matching during subsequent capability pattern extraction.
[0047] (7) Failure boundary conditions, which describe under what conditions the capability may fail or should not be used, including but not limited to one or more of the following: input parameters exceeding the valid range, dependent services being unavailable, execution timeout, insufficient permissions, resource exhaustion, and data format mismatch. Failure boundary conditions are used in the subsequent generation and verification of candidate callable capability structures to ensure that the generated method can be correctly processed or safely terminated under failure boundary conditions.
[0048] Through step S1 above, external capability resources, originally described in natural language and with varying formats, can be converted into computable capability objects with a unified field structure, providing a standardized data foundation for subsequent capability pattern extraction and candidate callable capability structure generation. Each capability object carries source traceability metadata, which includes at least one of resource identifier, parsing version, or content fingerprint. This source traceability metadata is used to establish source associations between external capability resources, capability objects, candidate callable capability structures, and callable capability assets. Candidate callable capability structures are associated with the external capability resources or their source information that participated in forming the candidate callable capability structure, and callable capability assets establish a common-origin relationship with the sources that participated in forming the candidate callable capability structure. This source association is primarily used to: identify the validity information of the interfaces, constraints, scope of application, failure boundaries, or other validity bases that participate in the formation of the callable capability asset when the source information changes, and to locate the callable capability assets that may be affected and implement call eligibility control accordingly; in addition, this source association can also be used to locate the original external resources corresponding to the candidate callable capability structure during the verification phase to verify the consistency between the capability information and the original resources, and to compare the updated resource identifiers, parsing versions, or content fingerprints of external capability resources during the change detection phase.
[0049] II. Capability Pattern Extraction and Method Candidate Generation
[0050] S2. Generate candidate callable capability structures based on at least one machine-processable structured capability representation, and establish an association between the candidate callable capability structures and external capability resources or their source information that participate in forming the candidate callable capability structures, as well as information used to determine interfaces, execution constraints, applicable conditions, failure boundaries, or other validity conditions.
[0051] like Figure 3 As shown, when candidate callable capability structures are generated based on multiple machine-processable structured capability representations, and the machine-processable structured capability representations are capability objects, similarity analysis, pattern recognition, or structure merging is used to determine the capability pattern; wherein, similarity analysis, pattern recognition, or structure merging includes at least one of clustering, vector similarity, rule matching, graph structure matching, template matching, model inference, or neural network pattern recognition; the specific process of generating candidate callable capability structures is as follows: (1) Feature extraction of capability objects For each capability object, extract a feature vector or feature set. The feature vector or feature set includes one or more of the following: capability type features, input / output structure features, execution flow features, constraint features, and applicable scenario features.
[0052] (2) Clustering and Pattern Recognition of Capability Objects
[0053] Based on the extracted feature vectors or feature sets, multiple capability objects are grouped by similarity, and multiple capability objects with similar capability features, similar processing flows, or similar constraints are grouped into the same capability pattern cluster. Clustering criteria include, but are not limited to: the same or similar capability type, the same parameter pattern in the input and output structure, the same step sequence or processing logic in the execution flow, and the same restriction type or restriction range in the constraint conditions.
[0054] Multiple capability objects within the same capability pattern cluster are considered to have a reusable common structure.
[0055] (3) Extraction of common structures
[0056] Common structures are extracted from multiple capability objects in the same capability pattern cluster to form common templates. The common structures include at least one of the following: common input parameter template, common output result template, common execution process template, common constraint set, and common applicable scenario scope.
[0057] (4) Generation of candidate callable capability structures
[0058] Candidate callable capability structures are generated based on common templates and object difference parameter mappings. The object difference parameter mappings include at least the interface differences, applicable scope differences, execution constraint differences, failure boundary differences, and corresponding parameter or path selection rules between different sources. The applicable scope of the candidate callable capability structure is jointly limited by the common template and the difference boundary.
[0059] The capability forms of candidate callable capability structures include one or more of the following: methods, skills, tools, functions, plugins, intelligent agents, model capabilities, services, operators, workflows, actions, execution nodes, call chains, execution plans, or composite structures; the candidate callable capability structures include at least one of the following: method signatures, method flows, method constraints, method verification conditions, and failure boundary conditions, wherein: Method signature: method name, input parameter list, output result type; Method flow: Execution step sequence, dependencies between steps, exception handling path; Method constraints: execution preconditions, execution constraints, and failure boundary conditions; Method verification conditions: Test cases or verification rules used to verify the correctness of the candidate callable capability structure.
[0060] (5) Record of method merging and reuse relationship
[0061] When multiple candidate callable capability structures corresponding to capability pattern clusters have the same method signature or the same processing flow, the corresponding candidate callable capability structures are merged and the method reuse relationship is recorded to avoid the linear expansion of the number of methods due to the increase in capability resources.
[0062] When merging methods, the applicable scope and failure boundary differences of each capability object are preserved. This allows the merged method to select the appropriate execution path or parameter configuration based on different calling contexts, avoiding the loss of the specialization boundaries of each capability object during merging. For example, multiple external source capabilities may belong to the same common template, but the interface input parameter fields, call frequency resource limits, and failure boundary conditions of different sources may not be entirely consistent. The difference parameter mapping records the parameter values, execution paths, and boundary thresholds corresponding to each source. When receiving a task call context, the system queries the difference parameter mapping: if the context matches the boundary conditions of a certain source, the parameters corresponding to that source are selected and the corresponding execution path is switched; if the calling context exceeds the applicable scope and failure boundaries of all sources, the application of the candidate callable capability structure is rejected.
[0063] Method reuse relationships are used to record which capability patterns are merged and which capability objects share the same method. The method merging mechanism can achieve convergence from multiple capability objects to a single method, making the number of methods in the method space related to the number of capability patterns rather than the number of capability objects, thus avoiding a linear expansion of the number of methods due to an increase in capability resources.
[0064] It should be noted that the use of cluster analysis for pattern recognition in this embodiment is only one possible implementation method, not the only one. For pattern recognition of multiple capability objects, at least one of rule matching and graph structure matching can also be used. This invention does not rely on a specific neural network model, nor does it require a model training process to complete pattern recognition, common structure extraction, and candidate callable capability structure generation.
[0065] Based on the process and data structure disclosed in this specification, those skilled in the art can complete the entire processing chain of "capability object feature extraction - pattern recognition - common template extraction - object difference parameter mapping - candidate callable capability structure generation". This embodiment provides a processing flow that can be implemented by those skilled in the art.
[0066] III. Verification of Candidate Callable Capability Structure
[0067] S3. Perform validity checks on candidate callable capability structures, and record the reasons for failure and failure boundary information for candidate callable capability structures that fail the verification; before a candidate callable capability structure meets the predetermined validity conditions, it does not change the agent's currently valid capability selection, invocation decision, or execution control result. For example... Figure 4 As shown, the specific steps are as follows: (1) Configuration of the isolation verification environment When performing validity verification on candidate callable capability structures, at least one of the following methods shall be used: isolated verification environment, shadow operation, simulation execution, read-only execution, real-time verification, sandbox, static verification, interface contract verification, replay verification, or restricted permission execution. When using an isolated verification environment for validity verification, an isolated verification environment that is logically or physically isolated from the agent's actual operating environment shall be set up. The isolated verification environment shall be configured with the simulated dependencies, simulated data, simulated permissions, and security boundary configurations required for the execution of the candidate callable capability structure.
[0068] An isolation boundary is set between the isolation verification environment and the agent's actual operating environment. The execution result of the candidate callable capability structure in the isolation verification environment does not change the agent's state in the actual operating environment.
[0069] (2) Test case generation
[0070] When using an isolated verification environment to perform validity verification, at least one verification test case is generated based on the method constraints and method verification conditions of the candidate callable capability structure. The verification test case covers at least one of the normal execution path, boundary condition execution path, and failure boundary execution path.
[0071] (3) Verify execution
[0072] In an isolated verification environment, run candidate callable capability structures using verification test cases to verify the execution results, constraint compliance, failure boundary condition handling, and whether unexpected side effects occur. Verification includes, but is not limited to: whether the candidate callable capability structure can complete execution normally; whether the execution result conforms to the method signature output specification; whether execution constraints are violated during execution; whether failure boundary conditions are correctly detected and safely terminated; and whether unexpected side effects occur during execution.
[0073] During the verification process, when the capability object corresponding to the candidate callable capability structure has failure boundary conditions, the failure boundary conditions are specifically verified in an isolated verification environment to confirm that the candidate callable capability structure can be correctly processed or safely terminated under failure boundary conditions.
[0074] It should be noted that this invention does not limit the specific implementation method of validity verification. The key control logic is that candidate callable capability structures will not enter the formal callable set before meeting predetermined validity conditions. The aforementioned isolation verification is only one of the possible implementation methods of this invention. Isolation verification is not merely a static evidence judgment at the metadata level of candidate callable capability structures. In this possible implementation method, the isolation verification environment can be configured with corresponding isolation dependencies, load simulated data to carry out the actual runtime execution of candidate callable capability structures; after running, the actual execution results of candidate callable capability structures can be compared and verified, and side effect checks can be performed to detect whether candidate callable capability structures will produce unexpected behaviors such as state tampering or unauthorized calls.
[0075] (4) Verification result determination
[0076] Based on the results of the verification execution, determine whether the candidate callable capability structure passes the verification. If all verification test cases pass, the candidate callable capability structure is deemed to have passed the verification; if any verification test case fails, the candidate callable capability structure is deemed to have failed the verification, and the reason for failure, the failed test case, and the failure boundary information are recorded.
[0077] (5) Handling of failures and feedback on failure experiences
[0078] Unverified candidate callable capability structures do not enter the formal method space. Their failure reasons and failure boundary information are recorded in the failure log library and converted into candidate generation constraints or verification enhancement conditions used only in the upstream parsing and capability objectification processes or the candidate callable capability structure generation process. During the parsing and objectification processes of capability objects or the generation of candidate callable capability structures, candidate generation constraints restrict the generation of candidates with the same failure mode, or corresponding boundary verification test cases are added based on the verification enhancement conditions. This mechanism can upgrade failure experience from "discarded logs" to constraints that apply to capability objectification, candidate generation, and verification stages, reducing the repeated generation of similar failure modes.
[0079] IV. Accumulation of Callable Capability Assets
[0080] S4. The candidate callable capability structures that meet the predetermined valid conditions are deposited as callable capability assets and stored in the method space of the agent for the agent to call and reuse. When storing in the method space, the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structures is established.
[0081] S5. When the source information of the interface, execution constraints, applicable conditions, failure boundaries or other validity basis of the callable capability asset changes, the callable capability asset that may be affected shall be determined based on the source association; before the callable capability asset is re-determined to meet the predetermined validity conditions, the callable capability asset shall be restricted from participating in subsequent calls according to the capability selection, call decision or execution conditions before the change.
[0082] The method space differs from the external capability repository—the external capability repository stores the original external documents or descriptions, while the method space stores method assets that, after compilation and verification, can be directly used as components of the agent's capabilities.
[0083] When external capability resources change, the source information of the change is correlated with the validity basis actually used when the callable capability asset was formed. The associated callable capability asset is determined to be potentially affected only when the change affects the interface, execution constraints, applicable conditions, failure boundaries, version conditions, or other validity basis that participated in the formation of the callable capability asset. Before the callable capability asset meets the predetermined validity conditions, the callable capability asset is restricted from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change. Changes in irrelevant source information that did not participate in the formation of the callable capability asset will not trigger call restrictions on the callable capability asset. The source association relationship is implemented through one or more of the following: reference, mapping, dependency graph, lineage, version, content fingerprint, hash, or event chain.
[0084] and Figure 1Corresponding to the method described above, this embodiment of the invention also provides an intelligent agent capability extension system based on external capability resource parsing and compiling callable capability assets, used for... Figure 1 The specific implementation of the method provided in this embodiment of the invention is an intelligent agent capability extension system based on external capability resource parsing and compiling callable capability assets, which can be applied to computer terminals or various mobile devices. Specifically, it includes a parsing processing and structured capability representation module, a candidate callable capability structure generation module, an access verification module, a callable capability asset formation module, and a source change response module. The parsing and structured capability representation module is used to acquire external capability resources and perform parsing and processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source. The candidate callable capability structure generation module is used to generate a candidate callable capability structure based on at least one machine-processable structured capability representation, and to establish an association between the candidate callable capability structure and the external capability resources or their source information that participate in forming the candidate callable capability structure, as well as information used to determine the interface, execution constraints, applicable conditions, failure boundaries or other validity conditions. The admission verification module is used to perform validity verification on candidate callable capability structures, and record the failure reasons and failure boundary information of candidate callable capability structures that fail verification; before the candidate callable capability structure meets the predetermined validity conditions, it does not change the agent's currently valid capability selection, invocation decision or execution control result. The callable capability asset formation module is used to deposit candidate callable capability structures that meet predetermined valid conditions as callable capability assets into the method space of the agent for the agent to call and reuse; when storing them into the method space, the module establishes the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structures. The source change response module is used to determine the potentially affected callable capability assets based on the source association when the source information of the interface, execution constraints, applicable conditions, failure boundaries, or other validity basis that participated in the formation of callable capability assets changes. Before the callable capability assets are re-determined to meet the predetermined validity conditions, the module restricts the callable capability assets from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change.
[0085] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0086] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets, characterized in that, Includes the following steps: S1. Acquire external capability resources and perform parsing processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source; S2. Generate candidate callable capability structures based on at least one machine-processable structured capability representation, and establish an association between the candidate callable capability structures and external capability resources or their source information that participate in forming the candidate callable capability structures, as well as information used to determine interfaces, execution constraints, applicable conditions, failure boundaries or other validity conditions; S3. Perform validity checks on candidate callable capability structures and record the reasons for failure and failure boundary information of candidate callable capability structures that fail the checks. Before the candidate callable capability structure meets the predetermined valid conditions, it does not change the agent's currently valid capability selection, invocation decision, or execution control result; S4. The candidate callable capability structures that meet the predetermined valid conditions are deposited as callable capability assets and stored in the method space of the agent for the agent to call and reuse. When storing in the method space, the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structure is established. S5. When the source information of the interface, execution constraints, applicable conditions, failure boundaries or other validity basis of the callable capability asset changes, the callable capability asset that may be affected shall be determined based on the source association; before the callable capability asset is re-determined to meet the predetermined validity conditions, the callable capability asset shall be restricted from participating in subsequent calls according to the capability selection, call decision or execution conditions before the change.
2. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, In S1, external capability resources are at least one of the following: skill description files, tool definition files, API interface description documents, workflow configuration files, agent capability declaration files, function description documents, code interface description information, plugin descriptions, MCP capability declarations or tool declarations, SDK interface information, OpenAPI or other interface pattern files, service capability descriptions, function definitions or other machine-readable or resolvable resources, carrying at least one of capability description information, input / output specifications, execution constraints and applicable conditions.
3. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, In S1, the parsing process includes at least one of the following: semantic parsing, structural parsing, pattern parsing, interface pattern parsing, static code parsing, rule extraction, template matching, field mapping, information extraction, or model-assisted parsing. Machine-processable structured capability representations include one or more of capability objects, graph structures, structured documents, table structures, key-value structures, or registry entries. When a machine-processable structured capability representation is a capability object, the extracted capability information and source metadata are encapsulated into a capability object to obtain a capability object carrying source association. Among these, source metadata includes at least one of resource identifier, parsed version, content fingerprint, source location, source subject identifier, resource version, content summary, update time, source interface version, or source dependency identifier. Capability information includes one or more of capability type, capability parameters, capability constraints, capability applicable conditions, and failure boundary conditions. Capability objects include one or more information dimensions of capability type identifier, input parameter specification, output result specification, execution preconditions, execution constraints, applicable scenario description, and failure boundary conditions.
4. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, In S2, when candidate callable capability structures are generated based on multiple machine-processable structured capability representations, and the machine-processable structured capability representations are capability objects, similarity analysis, pattern recognition, or structure merging is used to determine the capability pattern; wherein, similarity analysis, pattern recognition, or structure merging includes at least one of clustering, vector similarity, rule matching, graph structure matching, template matching, model inference, or neural network pattern recognition; the specific process of generating candidate callable capability structures is as follows: For each capability object, extract a feature vector or feature set. The feature vector or feature set includes one or more of the following: capability type features, input / output structure features, execution flow features, constraint features, and applicable scenario features. Based on the extracted feature vectors or feature sets, multiple capability objects are similarly merged, and multiple capability objects with similar capability features, similar processing procedures or similar constraints are grouped into the same capability pattern cluster; A common structure is extracted from multiple capability objects in the same capability pattern cluster to form a common template. Candidate callable capability structures are generated based on the common template and object difference parameter mapping. The object difference parameter mapping includes at least the interface differences, applicable scope differences, execution constraint differences, failure boundary differences, and corresponding parameter or path selection rules between different sources. The applicable scope of the candidate callable capability structure is jointly limited by the common template and the difference boundary. When multiple candidate callable capability structures corresponding to multiple capability pattern clusters have the same method signature or the same processing flow, the corresponding candidate callable capability structures are merged and the method reuse relationship is recorded.
5. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, In S2, the capability forms of candidate callable capability structures include one or more of the following: methods, skills, tools, functions, plugins, intelligent agents, model capabilities, services, operators, workflows, actions, execution nodes, call chains, execution plans, or composite structures. Candidate callable capability structures include at least one of the following: method signature, method flow, method constraints, method verification conditions, and failure boundary conditions.
6. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 5, characterized in that, In S3, when performing validity verification on candidate callable capability structures, at least one of the following methods can be used: isolated verification environment, shadow execution, simulation execution, read-only execution, real-time verification, sandbox, static verification, interface contract verification, replay verification, or restricted permission execution. When using an isolated verification environment for validity verification, the isolated verification environment is configured with the simulated dependencies, simulated data, simulated permissions, and security boundary configurations required for the execution of the candidate callable capability structure. An isolation boundary is set between the isolated verification environment and the agent's actual operating environment. The execution result of the candidate callable capability structure in the isolated verification environment does not change the agent's state in the actual operating environment.
7. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 6, characterized in that, In S3, when using an isolated verification environment to perform validity verification, at least one verification test case is generated based on the method constraints and method verification conditions of the candidate callable capability structure. The verification test case covers at least one of the normal execution path, boundary condition execution path, and failure boundary execution path. The candidate callable capability structure is run using the verification test case in the isolated verification environment to verify the execution result, constraint compliance, failure boundary condition handling, and whether unexpected side effects are generated.
8. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, S3 also includes: the failure reasons and failure boundary information of candidate callable capability structures that fail verification are recorded in the failure record library and converted into candidate generation constraints or verification enhancement conditions that are only used in the upstream parsing and capability objectification process or the candidate callable capability structure generation process; in the parsing and capability objectification process or the candidate callable capability structure generation process, the generation of candidates with the same failure mode is restricted according to the candidate generation constraints, or corresponding boundary verification test cases are added according to the verification enhancement conditions.
9. The method for extending the capabilities of an intelligent agent based on external capability resource parsing and compiling callable capability assets according to claim 1, characterized in that, In S5, when external capability resources change, the source information of the change is correlated with the validity basis actually used when forming the callable capability asset. The associated callable capability asset is determined to be potentially affected only when the change affects the interface, execution constraints, applicable conditions, failure boundaries, version conditions, or other validity basis that participated in the formation of the callable capability asset. Before the callable capability asset meets the predetermined validity conditions, the callable capability asset is restricted from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change. Changes in irrelevant source information that did not participate in the formation of the callable capability asset will not trigger call restrictions on the callable capability asset. The source association relationship is implemented through one or more of the following: reference, mapping, dependency graph, lineage, version, content fingerprint, hash, or event chain.
10. A capability extension system for intelligent agents based on external capability resource parsing and compiling callable capability assets, characterized in that, The method for extending the capabilities of an intelligent agent based on the parsing of external capability resources and the compilation of callable capability assets as described in any one of claims 1-9 includes a parsing and processing and structured capability representation module, a candidate callable capability structure generation module, an admission verification module, a callable capability asset formation module, and a source change response module. The parsing and structured capability representation module is used to acquire external capability resources and perform parsing and processing to extract capability information and form a machine-processable structured capability representation that retains the association with the external source. The candidate callable capability structure generation module is used to generate a candidate callable capability structure based on at least one machine-processable structured capability representation, and to establish an association between the candidate callable capability structure and the external capability resources or their source information that participate in forming the candidate callable capability structure, as well as information used to determine the interface, execution constraints, applicable conditions, failure boundaries or other validity conditions. The admission verification module is used to perform validity checks on candidate callable capability structures and record the failure reasons and failure boundary information of candidate callable capability structures that fail the verification. Before the candidate callable capability structure meets the predetermined valid conditions, it does not change the agent's currently valid capability selection, invocation decision, or execution control result; The callable capability asset formation module is used to deposit candidate callable capability structures that meet predetermined valid conditions as callable capability assets into the method space of the agent for the agent to call and reuse; when storing them into the method space, the module establishes the source association relationship between the callable capability assets and the external capability resources or source information that participated in the formation of the candidate callable capability structures. The source change response module is used to determine the potentially affected callable capability assets based on the source association when the source information of the interface, execution constraints, applicable conditions, failure boundaries, or other validity basis that participated in the formation of callable capability assets changes. Before the callable capability assets are re-determined to meet the predetermined validity conditions, the module restricts the callable capability assets from participating in subsequent calls according to the capability selection, call decision, or execution conditions before the change.
