A method, system, and storage medium for generating intelligent agent tools based on action ontology.
By using an intelligent agent tool generation method based on action ontology, enterprise action semantic slots are parsed to generate action semantic contracts, and tool interfaces and governance strategies are automatically generated. This solves the problem of inconsistency in existing intelligent agent tool interfaces and enables secure and reliable enterprise business operations.
Patent Information
- Application Number
- CN202611635640.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-17
AI Technical Summary
Existing intelligent agent tool interfaces lack action semantic descriptions, resulting in high development costs, long deployment cycles, and difficulty in maintenance. Furthermore, there are issues such as inconsistencies between the tool interfaces and enterprise business rules, inconsistent permission policies, and a lack of interpretable dry-run pre-rendering and automatic rollback generation mechanisms.
The intelligent agent tool generation method based on action ontology obtains enterprise action ontology data, parses action semantic slots to generate action semantic contracts, and automatically generates tool interfaces, execution adapters, and governance policies to achieve consistency and security control between tool interfaces and enterprise action semantics.
It reduces the cost of integrating intelligent agent tools, improves the security, consistency and manageability of enterprise business operations, reduces the risk of misoperation, and supports version management and exception rollback.
Smart Images

Figure CN123114460A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and business process automation, and in particular to a method, system and storage medium for generating intelligent agent tools based on action ontology. Background Technology
[0002] With the development of large language models and AI agent technologies, enterprise intelligent systems are gradually expanding from simple information question answering, report generation, and knowledge retrieval to intelligent agent systems capable of executing actual business operations. For example, an intelligent agent can create orders, submit purchase requests, approve refunds, close work orders, generate invoices, modify customer status, initiate contract processes, or synchronize data from external systems based on user instructions. In these scenarios, the intelligent agent not only needs to understand the user's natural language intent but also needs to select the correct enterprise tool interface, fill in the correct calling parameters, determine whether the current user has the necessary permissions, confirm whether the action requires approval, predict the resulting state changes, and perform auditing and rollback in case of anomalies.
[0003] Existing enterprise systems typically contain numerous APIs, workflows, approval processes, RPA scripts, low-code actions, and backend management functions. However, most of these execution entry points are designed for human engineers or traditional application systems. Their interface documentation usually only describes paths, parameters, and return values, lacking the action semantics, preconditions, post-effects, permission policies, approval rules, audit fields, and rollback mechanisms required for secure execution by intelligent agents.
[0004] Therefore, when introducing AI agents, enterprises typically need engineers to manually write tool schemas, parameter descriptions, permission verification logic, approval triggering logic, auditing logic, and exception handling logic for each callable tool. This approach is costly to develop, has a long deployment cycle, and is prone to inconsistencies between tool interfaces and enterprise business rules.
[0005] The existing intelligent agent tool interface implementation and calling methods have at least the following problems.
[0006] First, existing intelligent agent tool interfaces primarily rely on manual configuration. Engineers typically write tool names, descriptions, input parameters, and output formats manually based on API documentation or business experience. When an enterprise system has numerous interfaces, complex business rules, or frequently changing permission policies, manual configuration becomes difficult to maintain in a timely manner.
[0007] Second, existing tool interfaces typically only describe "how to call the API," lacking action semantics such as "whether the call is allowed, what conditions need to be met before the call, and what impact the call will have." Intelligent agents may initiate calls based solely on natural language descriptions and parameter schemas, failing to accurately determine preconditions, post-action state changes, and business risks.
[0008] Third, existing tool call governance often exists in the form of plug-in rules. The permission system, approval system, audit system, and API gateway each maintain their own rules, and there is a lack of a unified semantic connection between the smart proxy tool schema and these rules, resulting in inconsistent governance methods for the same action in different tools.
[0009] Fourth, existing intelligent agents struggle to perform interpretable dry-run rehearsals before invocations. For high-risk operations in specific scenarios, such as refunds, shipments, changes to customer status, data deletion, and approval submissions, enterprises need to know which objects will be affected by the invocation, which states will be changed, whether approval will be triggered, and whether rollback is possible. However, ordinary tool interfaces cannot provide this information.
[0010] Fifth, existing tool interfaces lack automatic rollback and auditing mechanisms. After the intelligent agent executes an action, if a business anomaly, parameter error, or user request to cancel occurs, the system struggles to automatically find the corresponding compensation action or rollback process based on the tool definition.
[0011] Sixth, there is a lack of version control between existing tool interfaces and enterprise action semantics. When the underlying APIs, workflows, approval rules, or permission policies change, the tools that the smart agent can call may still use the old schema, leading to incorrect parameters, permission bypass, approval omissions, or execution failures. Summary of the Invention
[0012] In view of the above problems, the present invention is proposed to provide a method, system and storage medium for generating intelligent agent tools based on action ontology that overcomes or at least partially overcomes the above problems.
[0013] This invention provides a method for generating intelligent agent tools based on action ontology, the method comprising: Obtain enterprise action ontology or action candidate data. Enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field, and rollback action. The action types corresponding to the enterprise action ontology or action candidate data are parsed according to the preset action semantic slots, and action semantic contracts are generated based on the action semantic slot parsing results. Action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts, and rollback contracts. The tool interface definition, underlying execution adapter, and runtime governance strategy for generating intelligent agents based on action semantic contracts; Verify the tool interface definition, underlying execution adapter, and runtime governance strategy; Once the tool interface definition, underlying execution adapter, and runtime governance strategy have all passed verification, a versioned smart agent toolkit is generated and published to the smart agent runtime environment. When the intelligent agent receives a user task, it selects a candidate intelligent agent toolkit that matches the user task according to the tool interface definition, generates tool invocation parameters, and performs security controls based on runtime governance policies.
[0014] Another aspect of the present invention provides a system for generating intelligent agent tools based on action ontology, the system comprising functional modules for implementing the method for generating intelligent agent tools based on action ontology as described above, including: The acquisition module is used to acquire enterprise action ontology or action candidate data. The enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field and rollback action. The semantic contract generation module is used to parse the action types corresponding to the enterprise action ontology or action candidate data according to the preset action semantic slots, and generate action semantic contracts based on the action semantic slot parsing results. Action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts, and rollback contracts. The component generation module is used to generate tool interface definitions, underlying execution adapters, and runtime governance strategies for smart agents based on action semantic contracts; The component verification module is used to verify the tool interface definition, the underlying execution adapter, and the runtime governance strategy; The toolkit publishing module is used to generate versioned smart agent toolkits and publish them to the smart agent runtime environment when the tool interface definition, underlying execution adapter and runtime governance strategy have all passed verification. The governance module is used to select candidate smart agent toolkits that match the user task based on the tool interface definition when the smart agent receives a user task, in order to generate tool call parameters and perform security control based on runtime governance policies.
[0015] In another aspect, the present invention also provides a computer storage medium storing a computer program that, when executed, implements the intelligent agent tool generation method based on action ontology as described above.
[0016] The present invention provides a method, system, and storage medium for generating intelligent agent tools based on action ontology. This method converts action types from enterprise action ontology or action candidate data into action semantic contracts. Based on these action semantic contracts, it generates intelligent agent tool interfaces, underlying execution adapters, and runtime governance strategies. When the tool interface definition, underlying execution adapter, and runtime governance strategy all pass verification, a versioned intelligent agent toolkit is generated and deployed to the intelligent agent runtime environment. Through this technical solution, when executing enterprise business actions, the intelligent agent can complete tool selection, parameter generation, pre-call checks, rehearsals, permission approval, risk control, formal execution, audit logging, and exception rollback based on the action semantic contracts. This reduces tool integration costs and improves the security, consistency, and manageability of enterprise business operations.
[0017] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a flowchart illustrating a method for generating an intelligent agent tool based on an action ontology, according to an embodiment of the present invention. Figure 2 This is a structural block diagram of an intelligent agent tool generation system based on action ontology, according to an embodiment of the present invention. Detailed Implementation
[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0020] It is understood that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0021] Figure 1 A flowchart illustrating a method for generating an intelligent agent tool based on action ontology, according to an embodiment of the present invention, is shown. Figure 1 As shown, the present invention proposes a method for generating intelligent agent tools based on action ontology. This method can be applied to enterprise ontology management systems, semantic layer management systems, knowledge graph governance systems, or intelligent agent runtime semantic governance systems, and includes the following steps: S1. Obtain enterprise action ontology or action candidate data. Enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field, and rollback action.
[0022] In this embodiment, the enterprise action ontology can come from a published enterprise ontology, business action catalog, action registry center, API management platform, workflow platform, approval platform, RPA platform, low-code platform, or enterprise action modeling system.
[0023] In this embodiment, action candidate data can be obtained from business behavior data. The business behavior data includes at least one of API call logs, workflow logs, approval flow logs, status transition logs, user operation logs, application event logs, and system audit logs.
[0024] The enterprise action ontology or action candidate data includes at least one action type. The system reads at least one of the following action metadata for each action type: action name, action description, target object, action category, input parameters, output result, preconditions, post-effects, state transition, exception type, permission requirements, approval requirements, risk level, dryrun pre-rehearsal support, audit fields, and rollback actions. An action identifier and a version identifier are generated for each action type. The action identifier is used to uniquely identify the action in the tool registry, and the version identifier is used to distinguish different versions of the action semantic contract, tool interface, and governance policy.
[0025] S2. Parse the action type corresponding to the enterprise action ontology or action candidate data according to the preset action semantic slots, and generate action semantic contracts based on the action semantic slot parsing results. Action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts, and rollback contracts.
[0026] S3, Tool interface definition, underlying execution adapter and runtime governance strategy for generating intelligent agents based on action semantic contracts.
[0027] S4. Verify the tool interface definition, underlying execution adapter, and runtime governance strategy.
[0028] In this embodiment, the specific implementation method for verifying the tool interface definition, the underlying execution adapter, and the runtime governance strategy is as follows: Perform parameter description validation on the tool interface definition. Parameter description validation includes schema validity validation, verifying the parameter types, required fields, output fields, and whether the tool description is complete.
[0029] Perform consistency checks on the tool interface definition and action semantic contract, verifying whether the input parameters cover the necessary parameters for the action, whether the output results include the execution status, and whether the governance strategy covers the requirements for permissions, approval, auditing, and rollback.
[0030] Perform callability verification on the execution adapter to verify whether the parameter mapping is complete, whether the underlying execution entry point is accessible, whether the identity context can be injected, and whether the results can be normalized.
[0031] Perform comprehensive validation of the governance strategy to verify whether the preset high-risk actions are configured with risk scoring and approval strategies, whether the preset sensitive fields are configured with audit strategies, and whether actions with rollback requirements are bound to rollback strategies.
[0032] S5. When the tool interface definition, underlying execution adapter, and runtime governance strategy are all verified, a versioned smart agent toolkit is generated and published to the smart agent runtime environment.
[0033] Specifically, the versioned smart agent toolkit includes tool interface definition, execution adapter, governance policy, version number, scope of application, dependencies, and release status. The system can release the smart agent toolkit to at least one of the following: smart agent runtime environment, tool registry, capability registry, SDK repository, API gateway, or low-code platform. If any of the tool interface definition, underlying execution adapter, or runtime governance policy fails verification, the system marks the toolkit as unreleaseable, dry-run only, internally tested only, or pending manual intervention.
[0034] S6. When the intelligent agent receives a user task, it selects a candidate intelligent agent toolkit that matches the user task according to the tool interface definition, generates tool call parameters, and performs security control based on the runtime governance policy. Specifically, when the intelligent agent calls the tool interface definition, it performs pre-call verification, call control, execution auditing, or exception rollback based on the runtime governance policy.
[0035] In this embodiment, the intelligent agent receives user tasks and selects candidate tools based on tool description, target object, action semantics, and visibility rules. The intelligent agent then generates tool call parameters based on the input parameter schema and the current context. The system performs parameter validation, context validation, precondition validation, and permission validation. If validation fails, it returns the reason for failure and correctable fields, without executing the underlying action. The system performs risk scoring. If the risk score is below the automatic execution threshold and no approval is required, it proceeds to formal execution; if the risk score exceeds the threshold or meets the approval triggering conditions, it proceeds to dry-run, manual confirmation, or approval processes. When dry-run is required, the system generates a description of the proposed execution impact based on the pre-execution strategy. Furthermore, the intelligent agent can display this impact description to the user for confirmation. When approval is required, the system initiates an approval process according to the approval strategy and continues execution after approval; execution terminates if approval is rejected or timeout occurs. The system calls the underlying execution entry point through the execution adapter to complete the actual business action. The execution result is normalized based on the output result schema, and audit logs are recorded according to the audit strategy. When an execution error occurs, partial success is achieved, or the returned result is inconsistent with the subsequent effect, the system triggers a rollback operation or compensation process according to the rollback strategy.
[0036] The intelligent agent tool generation method based on action ontology provided by this invention converts the action types in the enterprise action ontology or action candidate data into action semantic contracts. Then, a tool interface generator, an execution adapter generator, and a governance strategy generator generate intelligent agent tool interfaces, underlying execution adapters, and runtime governance strategies based on the action semantic contracts, respectively. When the tool interface definition, underlying execution adapter, and runtime governance strategy all pass verification, a versioned intelligent agent toolkit is generated and released to the intelligent agent runtime environment. Through the above technical solution, when the intelligent agent executes enterprise business actions, it can complete tool selection, parameter generation, pre-call checks, rehearsals, permission approval, risk control, formal execution, audit logging, and exception rollback based on the action semantic contracts, thereby reducing tool access costs and improving the security, consistency, and manageability of enterprise business operations.
[0037] In this embodiment of the invention, the system performs action semantic slot parsing on the action type. The action semantic slot includes target object slot, parameter slot, precondition slot, post-effect slot, state transition slot, permission slot, approval slot, risk slot, rehearsal slot, audit slot, exception slot, and rollback slot.
[0038] Furthermore, step S2, which generates the action semantic contract based on the action semantic slot parsing result, specifically includes the following steps, which are not shown in the attached figures: S21. Determine the target business object information for the action based on the target object slot. Specifically, determine the business object type, object identifier field, object status field, and accessible data range affected by the action based on the target object slot. For example, the target object of the ApproveRefund action is RefundRequest, the object identifier field is refund_request_id, and the status field is status.
[0039] S22. Generate parameter contracts based on parameter slots, status contracts based on precondition slots and post-effect slots, permission contracts based on permission slots, approval contracts based on approval slots, risk contracts based on risk slots, and pre-rehearsal contracts, audit contracts, and rollback contracts based on pre-rehearsal slots, audit slots, and rollback slots, respectively. Specifically, parameter contracts include at least one of the following: parameter name, parameter type, whether it is required, default value, enumerated value, numerical range, format rules, cross-field constraints, context binding relationship, and sensitivity level. Status contracts include at least one of the following: the state conditions that the target object must meet before the action is executed, the state changes that occur in the target object or related objects after execution, field changes, event triggers, and external notifications. Permission contracts include at least one of the following: subject type, role requirements, organizational scope, data scope, resource scope, action scope, tenant scope, and context conditions. Approval contracts include at least one of the following: approval trigger conditions, approver role, approval level, approval timeout policy, amount threshold, sensitive object conditions, manual confirmation conditions, and approval result write-back method. Risk contracts include at least one of the following: action risk baseline, object sensitivity level, parameter risk factor, amount threshold, number of affected objects, historical failure rate, whether rollback is possible, and whether manual confirmation is required. The rehearsal contract describes how to calculate the intended impact without changing production data; the audit contract describes the execution information that needs to be recorded; and the rollback contract describes the compensation actions or recovery processes invoked in the event of an anomaly.
[0040] S23. Combine the parameter contract, status contract, authority contract, approval contract, risk contract, rehearsal contract, audit contract and rollback contract into an action semantic contract.
[0041] In this embodiment of the invention, the tool interface definition for generating intelligent agents based on action semantic contracts in step S3 specifically includes: The tool name and description are generated based on the action semantic contract. Specifically, the tool name can be generated by combining the action category, target object, and business semantics; the tool description includes the business purpose that the tool can accomplish, applicable scenarios, inapplicable scenarios, and security tips.
[0042] The system generates input parameter schemas based on parameter contracts, output parameter schemas based on output results and post-effects, tool invocation instructions based on preconditions and post-effects, and tool visibility rules based on permission and risk contracts. The input parameter schema includes parameter type, required fields, enumerated values, default values, format validation, numerical range, cross-field constraints, and context binding rules. The output result schema may include at least one of the following: execution status, target object identifier, pre-change status, post-change status, approval status, risk score, audit number, and rollback prompt. The tool invocation instructions indicate to the intelligent agent in which context the tool can be selected and the potential business impact of its execution. The tool visibility rules determine whether the tool is exposed to a specific intelligent agent, user, role, or business scenario.
[0043] A multi-format tool interface definition is generated based on the tool name, tool description, input parameter description template, output parameter description template, tool call instructions, and tool visibility rules. The tool definition can be at least one of the following: JSON Schema, function call schema, OpenAPI extension schema, SDK type definition, GraphQL mutation, RPC definition, UI form definition, or workflow node definition.
[0044] A governance strategy reference is embedded in the tool interface definition to establish the association between the tool interface and the corresponding permission contract, approval contract, risk contract, rehearsal contract, audit contract, and rollback contract. The governance strategy reference is used to associate the tool interface with permission verification, approval triggering, dry-run, risk scoring, audit logging, and rollback operations.
[0045] In this embodiment of the invention, step S3, generating the underlying execution adapter based on the action semantic contract, specifically includes: The underlying execution entry point corresponding to the business action to be executed is determined based on the action type. The underlying execution entry point includes at least one of the following: API interface, workflow node, approval process, RPA script, message queue event, database stored procedure, low-code action or third-party SaaS interface.
[0046] Construct a parameter mapping relationship that maps parameters in the intelligent agent tool interface to request parameters, path parameters, query parameters, request body fields, and / or process variables of the underlying execution entry point.
[0047] Context injection rules, call execution rules, and rollback call rules are generated based on the action semantic contract. Specifically, these can be generated by the Agent or a large model, guided by some preset basic prompts. The context injection rules inject the current user identity, role, organization, tenant, data scope, session identifier, request source, idempotent key, and trace number. Call execution rules include at least one of the following: synchronous call, asynchronous call, retry strategy, timeout strategy, idempotency control, exception handling, error code mapping, and result normalization. When a rollback action exists in the action semantic contract, the system maps the rollback action to the corresponding underlying execution entry point and generates rollback parameter mappings, rollback conditions, and rollback audit rules.
[0048] The parameter mapping relationship, context injection rules, call execution rules, and rollback call rules are combined to generate the underlying execution adapter.
[0049] In this embodiment of the invention, step S3, which generates a runtime governance strategy based on action semantic contracts, includes: Based on the permission contract, parameter contract, risk contract, approval contract, rehearsal contract, audit contract, and rollback contract, the following strategies are generated: pre-call permission verification strategy, parameter verification strategy, risk scoring strategy, approval triggering strategy, rehearsal strategy, audit strategy, and exception rollback strategy. The pre-call permission verification strategy determines whether the current user or intelligent agent has the permission to execute the action on the target object. The parameter verification strategy verifies parameter types, required fields, enumerated values, amount ranges, object status, cross-field constraints, and context consistency. The risk scoring strategy calculates a risk score based on the action risk baseline, parameter risk, object sensitivity level, amount threshold, number of affected objects, call frequency, historical failure rate, and rollback availability. The rehearsal strategy returns the object to be changed, the fields to be changed, status changes, approval requirements, risk score, and rollback availability before formal execution. The audit strategy records the operator, intelligent agent identifier, user instructions, tool name, input parameter summary, pre-execution status, post-execution status, approval result, execution result, exception information, and rollback result. The exception rollback strategy is used to invoke rollback actions or compensation processes when execution fails, partially succeeds, approval is revoked, or manual revocation is requested. When the risk score exceeds a threshold, the amount exceeds a threshold, the object belongs to a sensitive category, or the action is not rollbackable, the system can require manual confirmation or trigger an approval process.
[0050] The pre-call permission verification strategy, parameter verification strategy, risk scoring strategy, approval triggering strategy, pre-rehearsal strategy, auditing strategy, and exception rollback strategy are combined to generate a runtime governance strategy.
[0051] In an optional embodiment of the present invention, the method further includes the following steps not shown in the accompanying drawings: S7. Obtain the results of intelligent agent toolkit calls, execution exceptions, and policy hits. Specifically, collect runtime data such as tool call results, execution exceptions, permission verification results, approval results, user confirmation results, rollback results, and audit logs.
[0052] S8. Mark the status of the tool interface definition and runtime governance strategy based on the intelligent agent toolkit invocation results, execution exceptions, and policy hit results. The status includes at least one of the following: available, pre-run only, requires manual confirmation, suspended, obsolete, requires regeneration, and / or awaits manual inspection. S9. When the underlying execution entry returns abnormal parameters, fails to grant permissions, is unavailable for approval processes, or fails to rollback, suspend the use of the current version of the smart agent toolkit, or downgrade it to a pre-run only state.
[0053] Furthermore, when the action ontology version, underlying API version, workflow version, or permission policy version changes, the system regenerates or revalidates the corresponding toolkit based on version dependencies. The system records the toolkit version, action ontology version, execution adapter version, governance policy version, and release time to track the consistency between intelligent agent tool calls and enterprise action semantics.
[0054] The technical solution of the present invention will be explained in detail below through several specific embodiments.
[0055] Example 1: Generation of tool interface and governance strategy for approving refund actions.
[0056] The enterprise action body contains the `ApproveRefund` action type. This action operates on the `RefundRequest` object, and its input parameters include `refund_request_id` (refund request number), `approved_amount` (approved amount), and `reason` (approval reason). Prerequisites include a pending refund request status and the approved amount not exceeding the requested amount. This action requires the caller to have the `FinanceManager` role; when the approved amount exceeds 50,000 yuan, approval from the CFO is required. It also supports dry-run and rollback actions like `CancelRefund`.
[0057] The system first parses the action into an action semantic contract, and then automatically generates the intelligent agent tool `approve_refund_request`. The input schema of this tool includes the refund request number, the approved amount, and the reason for approval; the output schema includes the execution status, whether approval is required, the risk score, the audit number, and whether rollback is possible.
[0058] When the intelligent agent invokes this tool, the system first verifies whether the refund application exists and is in a pending state, then verifies whether the approved amount exceeds the application amount, and checks whether the current user has financial manager permissions. If the amount exceeds the threshold, the system automatically initiates approval by the financial director; after approval, the system calls the underlying refund API (application programming interface) to execute the action and records the audit log. When the refund execution fails or the user cancels, the system calls the CancelRefund (cancel refund) rollback action.
[0059] Example 2: Generation of tool interface for order fulfillment action.
[0060] The enterprise action entity contains a ShipOrder action type. This action operates on the Order object, and its input parameters include order_id (order number), carrier (logistics carrier), and tracking_number (logistics tracking number). The prerequisite is that the order status must be paid, and the post-action effect is that the order status changes to shipped and a logistics record is generated. This action can only be executed by the logistics role and supports dry-run (trial run).
[0061] The system generates the tool `ship_order` (order delivery) based on this action, and generates parameter validation rules, status validation rules, permission validation rules, and an execution adapter. The execution adapter maps the tool parameters to ` / orders / {id} / ship` (order delivery interface) and automatically injects the current operator, tenant identifier, and idempotent key.
[0062] When the intelligent agent invokes the tool, the system first executes a dry-run (trial run), returning the proposed shipment order, logistics carrier, status changes, customer notifications, and audit fields. After user confirmation, the system formally invokes the shipping API (Application Programming Interface) and records the status before and after execution.
[0063] Example 3: Risk management of customer status change actions.
[0064] The enterprise action body contains the action type "SuspendCustomerAccount". This action changes the customer account status from active to suspended, which may affect order creation, invoicing, and customer service processing. This action has a high risk level and can only be executed by the customer success manager, who is required to provide a reason.
[0065] When the system generates a tool interface, it marks the action as a high-risk action and generates a risk scoring strategy. When the intelligent agent intends to call the tool, the system calculates a risk score based on the customer level, the number of incomplete orders, the amount owed, and whether there are any pending work orders. If the risk score exceeds the threshold, the system requires manual confirmation and triggers approval; only if the approval is approved will the system call the underlying customer system interface to execute the status change.
[0066] Example 4: Generation of approval strategy for procurement request submission.
[0067] The enterprise action entity contains a SubmitPurchaseRequest action type. This action operates on the PurchaseRequest object, and its input parameters include the purchase item, amount, supplier, and budget item. The action entity defines that additional approval is required when the amount exceeds the budget threshold or when the supplier is a new supplier.
[0068] The system generates approval trigger strategies based on approval contracts. When the intelligent agent invokes the purchase requisition submission tool, the system determines whether department manager, finance, or legal approval is required based on the amount, budget balance, and supplier status. The system writes the approval process number into the output schema and records the approval chain in the audit log.
[0069] Example 5: Toolkit state management when the underlying execution entry point changes.
[0070] A company migrated its refund execution entry point from the old API (Application Programming Interface) POST / refunds / approve (refund approval interface) to the new workflow refund_approval_flow_v2 (second version of the refund approval workflow). After detecting an inconsistency between the original execution adapter version and the action body version, the system marked the old toolkit status as "dry-run only" and regenerated the execution adapter based on the new workflow entry point.
[0071] After the regenerated toolkit is verified through parameter mapping, approval process, and result normalization, the system releases a new version of the toolkit. When the smart agent subsequently calls the refund approval action, it automatically uses the new version of the toolkit, avoiding continued calls to the old API (Application Programming Interface).
[0072] The intelligent agent tool generation method based on action ontology provided by this invention has the following beneficial effects: This invention does not merely generate tool interfaces based on ordinary API documentation. Instead, it parses action semantic slots from the enterprise action ontology, including target objects, input parameters, preconditions, post-effects, state transitions, permissions, approvals, risks, dry-runs, audits, and rollbacks, and generates action semantic contracts. This solution enables intelligent agent tool interfaces to express complete business action semantics, not just interface parameter formats.
[0073] This invention automatically generates tool names, tool descriptions, input parameter schemas, output result schemas, invocation instructions, visibility rules, and governance policy references for intelligent agents based on action semantic contracts. This solution can reduce the cost of enterprise AI agent tool integration and ensure that the tool interface is consistent with the enterprise's action semantics.
[0074] This invention automatically maps action semantic contracts to underlying APIs, workflows, approval processes, RPA, message queues, low-code actions, or third-party SaaS interfaces, generating parameter mappings, identity context injection, idempotent control, exception handling, result normalization, and rollback call rules. This solution enables intelligent agent tool interfaces to shield the differences in underlying systems, securely executing enterprise actions in a unified manner.
[0075] This invention automatically generates pre-call permission verification, parameter verification, risk scoring, approval triggering, dry-run rehearsal, audit logs, and exception rollback strategies based on the semantics of permissions, approval, risk, dry-run, audit logs, and rollback in the action ontology. This solution embeds governance rules into the intelligent agent tool's invocation process, rather than relying on decentralized manual configuration.
[0076] This invention can generate a proposed impact description before formal execution based on preconditions, post-action effects, and risk agreements. This description includes the object to be changed, the fields to be changed, status changes, approval requirements, risk scores, and rollback availability. This solution can reduce the security risks of intelligent agent misoperation and high-risk automated execution.
[0077] This invention combines tool interfaces, execution adapters, and governance strategies into a versioned toolkit. Based on call results, exceptions, approval failures, or version dependency changes, the toolkit undergoes state management, including availability, dry-run only, pause, obsolescence, or regeneration. This solution improves the maintainability and consistency of enterprise AI Agent tool systems.
[0078] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0079] This invention provides a smart agent tool generation system based on action ontology, the system including functional modules for implementing the smart agent tool generation method based on action ontology as described in any of the above embodiments. Figure 2 The schematic diagram illustrates the structure of the intelligent agent tool generation system based on action ontology provided in an embodiment of the present invention. (Refer to...) Figure 2 The system described in this embodiment of the invention includes: The acquisition module 201 is used to acquire enterprise action ontology or action candidate data. The enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field and rollback action. The semantic contract generation module 202 is used to parse the action type corresponding to the enterprise action ontology or action candidate data according to the preset action semantic slots, and generate action semantic contracts based on the action semantic slot parsing results. The action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts and rollback contracts. Component generation module 203 is used to generate tool interface definitions, underlying execution adapters and runtime governance strategies for smart agents based on action semantic contracts; Component verification module 204 is used to verify tool interface definitions, underlying execution adapters, and runtime governance strategies; The toolkit publishing module 205 is used to generate a versioned smart agent toolkit and publish it to the smart agent runtime environment when the tool interface definition, underlying execution adapter and runtime governance strategy have all passed verification. The governance module 206 is invoked to select a candidate smart agent toolkit that matches the user task according to the tool interface definition when the smart agent receives the user task, so as to generate tool invocation parameters and perform security control based on the runtime governance policy.
[0080] In this embodiment of the invention, the system further includes a state governance module (not shown in the accompanying drawings). The state governance module is used to obtain the intelligent agent toolkit invocation results, execution exceptions, and policy hit results; and to mark the tool interface definition and runtime governance strategy with status based on the intelligent agent toolkit invocation results, execution exceptions, and policy hit results. The status includes at least one of the following: available, pre-run only, requires manual confirmation, suspended, obsolete, requires regeneration, and / or awaits manual inspection. When the underlying execution entry returns abnormal parameters, fails to grant permissions, is unavailable for approval processes, or fails to rollback, the current version of the intelligent agent toolkit is suspended or downgraded to a pre-run only state.
[0081] As the system implementation is basically similar to the method implementation, the description is relatively simple, and relevant parts can be found in the description of the method implementation.
[0082] Furthermore, another embodiment of the present invention provides a computer storage medium storing a computer program, which, when executed, implements the steps described in the above embodiment of the intelligent agent tool generation method based on action ontology, for example... Figure 1 Steps S1-S6 are shown.
[0083] Furthermore, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps described in the above embodiment of the intelligent agent tool generation method based on action ontology, for example... Figure 1 Steps S1-S6 are shown.
[0084] This invention reduces the cost of tool integration and maintenance. Existing methods typically require engineers to read API documentation one by one and manually write tool schemas. This invention automatically generates tool interfaces, execution adapters, and governance policies based on enterprise action ontology, reducing redundant development and improving tool deployment efficiency.
[0085] This invention can express complete action semantics. Ordinary API documentation typically only describes the path, parameters, and return value. This invention extracts preconditions, post-effects, permissions, approvals, audits, and rollback information from the action ontology, enabling the intelligent agent tool interface to express the complete semantics of business actions.
[0086] This invention enables integrated governance of tool invocation. It binds permission verification, parameter verification, risk scoring, approval, dry-run rehearsal, auditing, and rollback to the tool interface and action semantic contract, enabling intelligent agents to perform security control according to a unified strategy when invoking tools.
[0087] This invention can reduce the risk of erroneous execution in high-risk operations. Before formal execution, this invention can automatically perform risk scoring, dry-run rehearsal, manual confirmation, and approval triggering, thereby reducing the risk of erroneous operations in high-risk scenarios such as refunds, shipments, deletions, and status changes.
[0088] This invention supports exception rollback and compensation. It generates rollback strategies based on rollback contracts in the action ontology and triggers rollback actions or compensation processes when execution fails, partially succeeds, or the user cancels, thereby improving the recoverability of enterprise business operations.
[0089] This invention supports versioning and state management. It combines tool interfaces, execution adapters, and management strategies into a versioned toolkit, and performs downgrading, pausing, obsolescence, or regeneration based on call results, exceptions, and version dependency changes, thereby improving the maintainability of the tool system.
[0090] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments can be used in any combination.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating intelligent agent tools based on action ontology, characterized in that, The method includes: Obtain enterprise action ontology or action candidate data. Enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field, and rollback action. The action types corresponding to the enterprise action ontology or action candidate data are parsed according to the preset action semantic slots, and action semantic contracts are generated based on the action semantic slot parsing results. Action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts, and rollback contracts. The tool interface definition, underlying execution adapter, and runtime governance strategy for generating intelligent agents based on action semantic contracts; Verify the tool interface definition, underlying execution adapter, and runtime governance strategy; Once the tool interface definition, underlying execution adapter, and runtime governance strategy have all passed verification, a versioned smart agent toolkit is generated and published to the smart agent runtime environment. When the intelligent agent receives a user task, it selects a candidate intelligent agent toolkit that matches the user task according to the tool interface definition, generates tool invocation parameters, and performs security controls based on runtime governance policies.
2. The method according to claim 1, characterized in that, Action semantic slots include target object slots, parameter slots, precondition slots, post-effect slots, permission slots, approval slots, risk slots, rehearsal slots, audit slots, and rollback slots; Generate an action semantic contract based on the action semantic slot parsing results, including: Determine the target business object information to be acted upon based on the target object slot; Parameter contracts are generated based on parameter slots, status contracts are generated based on precondition slots and post-effect slots, permission contracts are generated based on permission slots, approval contracts are generated based on approval slots, risk contracts are generated based on risk slots, and pre-rehearsal contracts, audit contracts, and rollback contracts are generated based on pre-rehearsal slots, audit contracts, and rollback contracts, respectively. The parameter contract, status contract, permission contract, approval contract, risk contract, rehearsal contract, audit contract, and rollback contract are combined into an action semantic contract.
3. The method according to claim 2, characterized in that, The tool interface definition for generating intelligent agents based on action semantic contracts includes: Generate tool name and tool description based on action semantic contract; Generate input parameter description templates based on parameter contracts, generate output parameter description templates based on output results and post-effects, generate tool call instructions based on preconditions and post-effects, and generate tool visibility rules based on permission contracts and risk contracts. Generate multi-format tool interface definitions based on tool name, tool description, input parameter description template, output parameter description template, tool call instructions, and tool visibility rules; A governance strategy reference procedure is embedded in the tool interface definition to establish the association between the tool interface and the corresponding permission contract, approval contract, risk contract, rehearsal contract, audit contract, and rollback contract.
4. The method according to claim 1, characterized in that, The underlying execution adapter is generated based on action semantic contracts, including: The underlying execution entry point corresponding to the business action to be executed is determined based on the action type. The underlying execution entry point includes at least one of the following: API interface, workflow node, approval process, RPA script, message queue event, database stored procedure, low-code action or third-party SaaS interface. Construct a parameter mapping relationship that maps the parameters in the intelligent agent tool interface to the request parameters, path parameters, query parameters, request body fields and / or process variables of the underlying execution entry point; Generate context injection rules, call execution rules, and rollback call rules based on action semantic contracts; The parameter mapping relationship, context injection rules, call execution rules, and rollback call rules are combined to generate the underlying execution adapter.
5. The method according to claim 1, characterized in that, Runtime governance strategies are generated based on action semantic contracts, including: Generate pre-call permission verification strategy, parameter verification strategy, risk scoring strategy, approval triggering strategy, rehearsal strategy, audit strategy, and exception rollback strategy based on permission contract, parameter contract, risk contract, approval contract, rehearsal strategy, audit strategy, and exception rollback strategy; The pre-call permission verification strategy, parameter verification strategy, risk scoring strategy, approval triggering strategy, pre-rehearsal strategy, auditing strategy, and exception rollback strategy are combined to generate a runtime governance strategy.
6. The method according to claim 1, characterized in that, The validation of tool interface definitions, underlying execution adapters, and runtime governance strategies includes: Perform parameter description validation on the tool interface definition; Perform consistency verification between the tool interface definition and the action semantic contract; Perform callability verification on the execution adapter; Perform comprehensive validation of the governance strategy to verify whether the preset high-risk actions are configured with risk scoring and approval strategies, whether the preset sensitive fields are configured with audit strategies, and whether actions with rollback requirements are bound to rollback strategies.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: Obtain the results of the intelligent agent toolkit call, execution exceptions, and policy hit results; The tool interface definition and runtime governance strategy are marked with status based on the intelligent agent toolkit invocation results, execution exceptions, and policy hit results. When the underlying execution entry returns abnormal parameters, fails to grant permissions, is unavailable for the approval process, or fails to rollback, the use of the current version of the smart agent toolkit is suspended, or it is downgraded to a pre-run only state.
8. A smart agent tool generation system based on action ontology, characterized in that, The system includes functional modules for implementing the method as described in claim 1, including: The acquisition module is used to acquire enterprise action ontology or action candidate data. The enterprise action ontology or action candidate data includes at least one action type. The action type includes action name, target object, input parameters, output result, preconditions, post-effects, permission rules, approval rules, rehearsal support, risk level, audit field and rollback action. The semantic contract generation module is used to parse the action types corresponding to the enterprise action ontology or action candidate data according to the preset action semantic slots, and generate action semantic contracts based on the action semantic slot parsing results. Action semantic contracts include parameter contracts, status contracts, permission contracts, approval contracts, risk contracts, rehearsal contracts, audit contracts, and rollback contracts. The component generation module is used to generate tool interface definitions, underlying execution adapters, and runtime governance strategies for smart agents based on action semantic contracts; The component verification module is used to verify the tool interface definition, the underlying execution adapter, and the runtime governance strategy; The toolkit publishing module is used to generate versioned smart agent toolkits and publish them to the smart agent runtime environment when the tool interface definition, underlying execution adapter and runtime governance strategy have all passed verification. The governance module is used to select candidate smart agent toolkits that match the user task based on the tool interface definition when the smart agent receives a user task, in order to generate tool call parameters and perform security control based on runtime governance policies.
9. The system according to claim 8, characterized in that, The system also includes: The state governance module is used to obtain the call results, execution exceptions, and policy hit results of the intelligent agent toolkit; to mark the state of the tool interface definition and runtime governance policy based on the call results, execution exceptions, and policy hit results of the intelligent agent toolkit; and to suspend the use of the current version of the intelligent agent toolkit or downgrade it to a pre-run state when the underlying execution entry returns abnormal parameters, fails to grant permissions, is unavailable for the approval process, or fails to rollback.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed, implements the intelligent agent tool generation method based on action ontology as described in any one of claims 1-7.
