Method, device and medium for hosting intelligent agent tool call approval and execution control
By performing structured analysis and risk level assessment of managed intelligent agent tool call requests, approval policies and tokens are generated to ensure that calls are executed in a controlled environment. This solves the problems of inaccurate risk assessment and reliance on manual intervention in existing technologies, and enables the secure and controllable execution of high-risk calls in a production environment.
Patent Information
- Application Number
- CN202611265639.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-10
AI Technical Summary
In existing technologies, the tool calls of managed intelligent agents cannot effectively distinguish the risk differences of different call actions, parameters, resources and environments, resulting in insufficient accuracy of risk assessment. Furthermore, relying on manual approval is prone to misapproval and omissions, and it is impossible to generate scenario-based impact range, side effects and rollback solutions.
By performing structured analysis on tool call requests initiated by managed agents, the risk level is determined. Based on the risk level and tool type, pre-execution technical protection items are determined from the preset risk control matrix, and approval strategies and bound approval tokens are generated. Each item is verified before execution to ensure that the call is executed in a controlled environment.
It enables refined risk identification and control of managed intelligent agent tool invocation behavior, ensuring that high-risk invocations cannot access production resources when necessary conditions are lacking. This avoids the insufficient protection and resource waste of traditional static permissions and improves the controllability of automated operations in the production environment.
Smart Images

Figure CN123070710A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method, apparatus, and medium for controlling the approval and execution of managed intelligent agent tool calls. Background Technology
[0002] With the deep integration of large language models and intelligent agent technologies into enterprise R&D, operations, data processing, cloud platform management, and business automation, the capabilities of intelligent agents have evolved from simple text generation to the ability to perform entity operations via tool interfaces. Currently, managed intelligent agents rely on a unified platform to achieve centralized management of models, sessions, permissions, credentials, and execution environments, autonomously completing high-risk operations such as code submission, cluster changes, database read / write, pipeline triggering, and cloud resource creation.
[0003] Existing technologies for controlling the invocation of intelligent agent tools generally adopt static control schemes based on traditional manual approval and fixed API authentication. Among them, traditional manual approval mainly relies on a fixed process approval mechanism based on pre-configured tool-level static whitelist permissions. However, this approach is a coarse-grained tool-level mode, which cannot distinguish the risk differences of the same tool under different invocation actions, parameters, resources and environments, resulting in insufficient accuracy in risk assessment.
[0004] Tool invocation instructions for managed intelligent agents are usually dynamically generated by the model or the caller. The invocation intent, parameters, context, and execution environment are all uncertain. Often, the tools to be invoked have side effects. Traditional API authentication only focuses on whether the caller has the necessary permissions. It usually does not combine task objectives, session plans, model outputs, etc. for joint evaluation. As a result, the approval process cannot generate effective approval basis such as the scope of impact, side effects, and rollback plans in a scenario-based manner. Approver can only rely on subjective experience for review, which is very easy to make mistakes in approval or omission. Even if the tool invocation passes the pre-approval, it can still cause irreversible business and data risks. Summary of the Invention
[0005] In view of this, the present disclosure provides a method, apparatus, and medium for managing the approval and execution control of intelligent agent tool calls, which can solve the problems in the prior art such as the serious mismatch between the intelligent agent tool call effect and the actual scenario, high dependence on manual intervention, and inability to identify risks in the call process in a timely manner.
[0006] In a first aspect, embodiments of this disclosure provide a method for managing intelligent agent tool invocation approval and execution control, including: Perform structured analysis on tool call requests initiated by managed intelligent agents to determine the risk level corresponding to the tool call requests; Based on the risk level and the tool type corresponding to the tool call request, determine the pre-execution technical protection items corresponding to this call from the preset risk control matrix; Based on the risk level and the dynamic and historical information corresponding to the tool call request, determine the approval strategy corresponding to the current request; The approval strategy is executed, and an approval token for that session, bound to the approval result, is generated upon approval. Before the tool is invoked and executed, the technical protection items before execution are checked one by one based on the risk level to obtain the environment-side verification result; the consistency of the business instruction content for this tool invocation is checked based on the current approval token to obtain the request-side verification result. When both the environment-side verification result and the request-side verification result pass the verification, the tool invocation request is executed in the controlled execution environment.
[0007] Secondly, this disclosure also provides a computer device, which adopts the following technical solution: The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor; the instructions are executed by the at least one processor to enable the at least one processor to execute any of the managed agent tool invocation approval and execution control methods described above.
[0008] Thirdly, embodiments of this disclosure also provide a computer-readable storage medium storing computer instructions; the computer instructions are used to cause a computer to execute any of the managed intelligent agent tool invocation approval and execution control methods described above.
[0009] Fourthly, embodiments of this disclosure also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods described above.
[0010] The managed agent tool call approval and execution control method provided in this disclosure performs structured analysis on tool call requests initiated by the managed agent and determines the risk level. This enables granular risk quantification and identification of non-deterministic call instructions dynamically output by the model, overcoming the limitations of traditional solutions that only coarsely classify risks at the tool level. This supports the generation of differentiated control strategies. By matching risk levels with corresponding pre-execution technical protection items based on tool type, appropriate isolation, parameter filtering, and resource restriction rules can be configured according to risk levels. This avoids insufficient protection or resource waste caused by a uniform protection strategy, ensuring that call behaviors with different risk levels have corresponding security pre-constraints. This method determines the approval strategy based on risk level, dynamic call information, and historical information. An approval token is then generated and bound to this call, which solidifies the approval scope into a machine-recognizable credential, binding the approval conclusion with a single call behavior. This allows for consistency verification of business instructions based on the approval token, intercepting unauthorized changes such as parameter tampering, new parameters, and resource out-of-bounds modifications after approval. Before execution, both environmental protection items and request-side consistency are checked simultaneously. The call request is only allowed to execute in the controlled execution environment if both checks pass. This ensures that the execution environment meets security baselines and that the call instructions do not exceed the approved scope. This prevents high-risk calls from accessing production resources when pre-existing security conditions are missing or instructions deviate from approval boundaries, achieving deterministic constraints across the entire tool call chain with real side effects and improving the controllability of automated operations in the managed intelligent agent's production environment.
[0011] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart illustrating the managed intelligent agent tool invocation approval and execution control method provided in this embodiment of the disclosure.
[0014] Figure 2 A flowchart illustrating the method for determining the risk level corresponding to a tool call request provided in this embodiment of the disclosure.
[0015] Figure 3 A flowchart illustrating the method for determining the risk level corresponding to a tool call request provided in this embodiment of the disclosure.
[0016] Figure 4 This is a flowchart illustrating the method for obtaining the approval policy corresponding to the current request provided in an embodiment of this disclosure.
[0017] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. Detailed Implementation
[0018] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0019] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0020] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0021] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0022] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0023] Reference Figure 1 This application discloses a method for approved and executed managed agent tool calls, comprising: S100 performs structured analysis on tool call requests initiated by the managed agent to determine the risk level corresponding to the tool call request.
[0024] Among them, the managed intelligent agent is an intelligent agent that is managed and run by a unified platform. The platform is responsible for model invocation, tool registration, permission control, session management, execution environment and audit management. In other words, the managed intelligent agent is an AI agent program that is automatically scheduled by a large model or planner and is not manually controlled in real time. No one needs to manually click buttons or fill in parameters. The AI automatically initiates operations according to the task.
[0025] The AI agent program does not perform operations, data processing, and business operations out of thin air. It must call external systems and make operation requests to various underlying systems, platforms, and automation tools. These requests are tool call requests initiated by the managed intelligent agent.
[0026] The tool calls subject to control are all autonomously initiated by unattended AI-hosted intelligent agents, and involve various operation requests to server commands, code repositories, container platforms, databases, release pipelines, cloud platforms, AI tool protocol services, process robots, and interfaces of internal enterprise business systems.
[0027] S200: Based on the risk level and the tool type corresponding to the tool call request, determine the pre-execution technical protection items corresponding to this call from the preset risk control matrix; S300 determines the approval strategy for the current request based on the risk level and the dynamic and historical information corresponding to the tool call request; S400 executes the approval strategy and generates an approval token for that session that is bound to the approval result after the approval is approved.
[0028] Before the tool is executed, S500 verifies each technical protection item based on the risk level to obtain the environment-side verification result; and verifies the consistency of the business instruction content for this tool call based on the current approval token to obtain the request-side verification result.
[0029] S600: When both the environment-side verification result and the request-side verification result pass, the tool call request is executed in the controlled execution environment.
[0030] The managed agent tool invocation approval and execution control method disclosed in this application enables a deterministic and verifiable constraint on the execution process of real tool invocation based on a risk assessment result for the output of an untrusted, non-deterministic model. This prevents high-risk outputs from accessing production resources in the absence of necessary technical prerequisites and allows for automatic recovery, compensation, or manual takeover when execution deviates from the approved scope or pre-simulation results. When a managed agent invokes a tool with real side effects, it no longer relies solely on static permissions or single manual confirmation; the method disclosed in this application enables secure, controllable, explainable, and traceable execution in a production environment.
[0031] In this application, tool invocation refers to invocations initiated by a managed agent to Shell, Git, Kubernetes, databases, CI / CD, cloud APIs, MCP Servers, RPA tools, or enterprise system APIs.
[0032] The calls to Shell include server terminal commands, such as deleting files, checking processes, and modifying system configurations; calls to Git include code repository operations, such as pulling code, committing, merging branches, and rolling back versions; calls to databases include creating, deleting, modifying, and querying data tables, clearing data, modifying database and table structures, and exporting data; calls to CI / CD include pipeline deployments, automatically building, deploying new versions, and rolling back business deployments. Calls to cloud APIs include public cloud vendor interfaces, creating cloud servers, storage, permissions, and network resources. Calls to MCP Server include large model tool protocol services, providing a standardized external capability call channel specifically for AI. Calls to RPA tools include automated process robots, automatically operating backend business systems, forms, and page data entry; calls to enterprise system APIs include internal company interfaces, self-developed business interfaces, financial interfaces, operations and maintenance interfaces, and open interfaces for permission platforms.
[0033] Reference Figure 2 The methods for determining the risk level corresponding to an S100 tool invocation request include: S110 performs structured analysis on tool call requests initiated by the managed agent to obtain a tool call risk vector.
[0034] This step includes: 1) Standardizing tool call requests and extracting key risk features. Specifically, in response to tool call requests initiated by the managed agent, the tool call requests are intercepted, bound to a preset traceability identifier, and all tool call requests are standardized to generate a unified tool call record, i.e., a candidate tool call record awaiting risk review. Key risk features matching actual needs, i.e., tool call semantic vectors, are extracted from the unified tool call record.
[0035] The preset traceability identifiers include at least one of the following: task identifier, session identifier, agent identifier, user identifier, tenant identifier, project identifier, execution environment identifier, and request time.
[0036] Key risk characteristics include one or more of the following: tool name, tool type, action type, raw parameters, normalized parameters, target resources, target environment, target namespace, target account, data range, execution identity, required permissions, expected side effects, and reason for tool invocation. These can be flexibly set according to actual needs.
[0037] In this step, different types of tool calls use different communication protocols and message structures, and the data fields are disorganized, making it difficult to uniformly perform parsing, risk vectorization, and approval judgment. This step standardizes and translates various heterogeneous requests, uniformly mapping them to standard tool call records with fixed field structures, which can shield the differences in underlying call protocols.
[0038] 2) Collect the task context associated with the tool call request.
[0039] Specifically, information such as user requests, agent execution plans, session history, system baseline prompts, task authorization scope, approval history, and tool invocation reasons are obtained. Based on preset context association rules, the above multi-source information is structured and parsed, and intent features, capability constraint features, permission boundary features, historical handling features, and invocation motivation features are extracted respectively. Various features are fused to generate a complete task context, which is used for pre-approval verification before tool invocation.
[0040] 3) Determine the pre-execution security verification information before the tool is called, based on the task context.
[0041] Specifically, based on the extracted task context, multi-dimensional compliance checks are performed on the tool call, including intent, target, parameters, permissions, and security risks. This obtains pre-execution security check information before the tool call is executed, specifically including whether the user intent is clear, whether the tool call is consistent with the task target, whether there are any conflicts or ambiguities in the parameters, whether it exceeds the scope of user authorization, and whether there are any prompt injections, unauthorized instructions, or uncertain expressions in the model.
[0042] 4) Generate a tool call risk vector based on key risk characteristics and pre-security verification information.
[0043] The tool call risk vector includes one or more of the following: tool risk, action risk, parameter risk, resource risk, environment risk, data risk, permission risk, rollback risk, historical risk, and context risk. The specific risk vector can be flexibly set according to the needs of the corresponding scenario.
[0044] In existing technologies, natural language input can be contaminated by prompts, allowing attackers to construct phrases that make malicious operations appear semantically benign. However, in this embodiment, during the structured analysis of tool call requests, the structured tuples are extracted from the actual call parameters by the platform-side parser. The resulting tool call risk vector is generated solely from the extracted structured fields, without vectorizing the natural language text generated by the agent. This means the semantics are carried by the fields themselves, eliminating the injection surface at the input source.
[0045] S120: Determine the risk level corresponding to the tool invocation request based on the tool invocation risk vector and the preset mandatory coverage rules.
[0046] Reference Figure 3 The methods for determining the risk level corresponding to a tool call request include: S121, determine the preset forced coverage rules according to the corresponding scenario.
[0047] For example, the preset forced overwrite rules include deleting core services in the production environment, updating the production database without a WHERE clause, exporting keys, or creating cloud resources that exceed the budget.
[0048] S122, If the tool call risk vector hits the mandatory coverage rule, the risk level corresponding to the mandatory coverage rule will be used as the risk level corresponding to the tool call request.
[0049] When a tool invokes a risk vector that matches a mandatory coverage rule, the risk level corresponding to the tool invocation request is directly determined to be high risk.
[0050] S123, If the tool calls the risk vector but does not hit the mandatory coverage rule, determine the risk information of the tool calls the risk vector that hits the anchor point according to the preset risk anchor point library.
[0051] Specifically, a preset risk anchor point library and corresponding baseline levels are determined. In this embodiment, the preset risk anchor point library includes anchor point A1 representing write operations in the production environment, anchor point A2 representing data out-of-domain operations, anchor point A3 representing permission change operations, anchor point A4 representing business-irrelevant operations, anchor point A5 representing write operations within a specified business domain, anchor point A6 representing read operations within a specified business domain, and anchor point A7 representing sensitive data read operations. The corresponding baseline levels are R3, R3, R4, R4, R2, R1, and R2, respectively. Among them, R4 is the highest level, and R1 is the lowest level.
[0052] Anchor point A3 has the highest baseline level because permission change operations alter the boundaries of the control system itself. If an agent can first elevate its own or associated identities before performing business operations, all downstream controls will fail. Therefore, such meta-operations that change the rules of the game must be constrained at the highest level.
[0053] Furthermore, if the anchor points corresponding to R3 and R2 are hit within the same task, for example, if A7 is hit first (reading sensitive data) and then A2 is hit (data goes out of the domain), the risk is directly upgraded to the highest level R4 based on the sequence combination.
[0054] Then, the tool retrieves the target anchor points hit by the risk vector and calculates the anchor point score corresponding to each target anchor point based on the baseline level of each target anchor point.
[0055] Specifically, the anchor point corresponding to a single target anchor point is divided into sim(v) op , v Ai )×base(Ai)×k rev ×k blast ×k sens , where sim(v op , v Ai The risk vector v is used to invoke the tool. op With the target anchor point v Ai The cosine similarity, where base(Ai) is the target anchor point v. Ai The baseline score corresponding to the baseline level.
[0056] k rev The reversibility coefficient is the value corresponding to the target anchor point that was hit. If the operation corresponding to the target anchor point hit by the tool's call risk vector can be rolled back, take 1.0; if it is irreversible, such as deletion without snapshot capability or sending messages, take 1.5.
[0057] k blast This is the impact coefficient of the hit target anchor point. Specifically, it can be segmented according to the estimated number of affected instances: 1.0 when the number of instances is 1, 1.2 when 2 ≤ the number of instances n ≤ 10, and 1.5 when the number of instances n > 10.
[0058] k sens The data sensitivity coefficient for the hit target anchor point is determined based on the data type of the target anchor point hit by the risk vector called by the tool. For example, it is 1.0 when it is ordinary data, 1.3 when it is personal identification information or financial data, and 1.5 when it is a credential key.
[0059] The baseline scores corresponding to different baseline levels can be R1=0.25, R2=0.50, R3=0.75, and R4=1.00, respectively, and can be flexibly set according to actual needs.
[0060] S124 uses the risk level corresponding to the highest risk information as the risk level corresponding to the tool call request.
[0061] Specifically, the highest anchor score is obtained, and the risk level corresponding to that anchor score is determined according to the preset anchor score mapping table, which is then used as the risk level corresponding to the tool call request.
[0062] For example, a preset anchor score mapping table may include: when the maximum anchor score is in the range [0, 0.2), the corresponding risk level is R0, representing no risk; when the maximum anchor score is in the range [0.2, 0.4), the corresponding risk level is R1, representing low risk; when it is in the range [0.4, 0.6), the corresponding risk level is R2, representing medium risk; when it is in the range [0.6, 0.8), the corresponding risk level is R3, representing high risk; and when it is not less than 0.8, the corresponding risk level is R4, representing severe risk.
[0063] The method for determining the pre-execution technical protection items corresponding to this S200 call includes: obtaining the tool type corresponding to the tool call request; determining the preset risk control matrix corresponding to the current scenario; and determining the pre-execution technical protection items corresponding to this call from the preset risk control matrix based on the risk level and the tool type corresponding to the tool call request.
[0064] If the risk level is R0, there is no risk and no technical protection is required; if the risk level is R1, regardless of whether the tool type corresponding to the tool call request is Kubernetes, database, cloud API, message / email outbound, etc., the technical protection item before execution for this call is determined to be the approval token.
[0065] If the risk level is R2 and the tool type corresponding to the tool call request is Kubernetes, the pre-execution technical protection items for this call are determined to be approval tokens and declarative idempotency.
[0066] If the risk level is R2 and the tool type corresponding to the tool call request is database or message / email outbound, the pre-execution technical protection items for this call are determined to be approval token and transaction-level simulation.
[0067] If the risk level is R2 and the tool type corresponding to the tool call request is a cloud API, the pre-execution technical protection item corresponding to this call is determined to be an approval token.
[0068] If the risk level is R3 and the tool type corresponding to the tool call request is Kubernetes, the technical protection items for this call before execution are determined to include target resource snapshot, target resource lock, approval token, declarative idempotency, and transaction-level emulation.
[0069] If the risk level is R3 and the tool type corresponding to the tool call request is database, the pre-execution technical protection items for this call are determined to include target resource snapshots, approval tokens, transaction-level simulations such as backup tables and rollback SQL.
[0070] If the risk level is R3 and the tool type corresponding to the tool call request is a cloud API, the pre-execution technical protection items for this call are determined to include target resource locks, approval tokens, and transaction-level simulations such as budget simulations.
[0071] If the risk level is R3 and the tool type corresponding to the tool call request is message / email outbound, the technical protection items for this call before execution are determined to include approval token, transaction-level simulation and manual approval.
[0072] If the risk level is R4, the corresponding pre-execution technical safeguards include rejection or manual takeover.
[0073] This embodiment can form an adaptive protection mechanism that provides strong protection for high-risk situations and light protection for low-risk situations, thus avoiding the problems of insufficient protection or resource redundancy caused by a unified protection mode.
[0074] Reference Figure 4 The methods for obtaining the approval policy corresponding to the current S300 request include: S310, obtain dynamic information corresponding to the tool call request.
[0075] The dynamic information includes one or more of the following: subject identity, scope of permissions, tenant, project requirements, target environment, tool characteristics, and execution time period.
[0076] S320, retrieve historical behavior information corresponding to tool call requests.
[0077] Among them, historical behavior information includes potential risks such as repeated rollbacks of the agent and abnormal parameter drift.
[0078] S330, based on preset priority decision rules, performs multi-level linkage analysis on risk level, dynamic information, and historical behavior information to determine the approval strategy corresponding to the current request.
[0079] Specifically, an initial approval baseline is obtained by matching risk levels with a preset mapping relationship; dynamic information is used to verify the legality of operations, match multi-layered control constraints of tenants, projects, environments, and tools, and assess the temporal risks brought by the execution window, while simultaneously verifying the protection readiness status to achieve the lower limit constraint of the approval level; historical behavior information is queried, and when frequent rollbacks by the intelligent agent or continuous parameter drift alarms of the tool are detected, the approval level is dynamically increased based on the current approval level to obtain the target approval strategy. Among them, the approval strategy includes automatic release, weak confirmation, manual approval, multi-level approval, rejection, or manual takeover.
[0080] In this embodiment, dynamic approval strategies are generated by combining dynamic information and historical behavior data. This can accurately output the scope of impact, side effects, and rollback plan of the current call, providing objective quantitative basis for approval decisions and effectively reducing the risk of manual misapproval and omissions.
[0081] Furthermore, the mapping relationship between preset risk levels and approval strategies can be flexibly configured according to actual needs to determine the basic approval baseline corresponding to the current request. For example, R0 corresponds to automatic release, R1 corresponds to automatic release or weak confirmation, R2 corresponds to weak confirmation or manual approval, R3 corresponds to manual approval and the production environment can be configured for multi-level approval, and R4 corresponds to rejection or manual takeover.
[0082] Then, based on dynamic information, legality verification and constraint correction are performed. For example, if the verification of the subject's identity or scope of authority fails, the approval policy is directly determined to be rejection; if it is detected that the current operation protection capability is not ready and the operation cannot be rolled back, the lower limit of the approval policy is locked to manual approval; at the same time, the baseline approval level is corrected in combination with the control constraints of the tenant, project, target environment, tool characteristics and execution time.
[0083] Next, the approval level is dynamically upgraded based on historical behavior information. For example, if the agent has short-term and frequent rollback behavior or the tool has abnormal parameter drift alarms exceeding the threshold, the approval level will be upgraded by one level based on the current approval level, up to a maximum of multiple approval levels.
[0084] In this embodiment, the basic approval baseline obtained by risk level matching is used as the initial approval level; dynamic information correction results are superimposed, and strong constraint rules such as direct rejection for illegal permissions and locking manual approval without rollback are prioritized. The approval level is fine-tuned to adapt to the control requirements of tenants, projects, environments, tools, and execution periods; historical behavior risks are checked, and the current approval level is upgraded when the conditions of frequent rollback or excessive parameter drift are met. The level upgrade follows a fixed link of automatic release, weak confirmation, manual approval, and multi-level approval. Multi-level approval is the highest approval level and will not be upgraded. Finally, a unique target approval strategy, i.e., the approval form, is output.
[0085] Furthermore, an approval state machine can be built for each controlled tool call. The state can include states such as pending evaluation, evaluation completed, automatic approval, weak confirmation, waiting for manual approval, approval timeout, approval passed, request for modification, approval rejected, sandbox pre-rehearsal, pre-inspection failure, execution in progress, execution successful, execution failed, pending rollback, rollback completed, manual takeover, and policy update.
[0086] During the operation of the state machine, all state transition actions will be recorded in a complete audit log. The log uniformly records the event type that triggered the state transition, the identity of the subject performing the operation, the time when the state change occurred, the input parameters corresponding to this tool call, intermediate output information, the reason for triggering the state transition, relevant supporting evidence, and the unique identifier of the associated audit event.
[0087] A typical workflow includes moving from the pending evaluation state to the awaiting manual approval state, then switching to the approved state after approval, entering the execution state after completing the pre-inspection, and finally moving to the execution completed state.
[0088] For S400, a unique approval token (i.e., a token for that specific instance) is generated only after approval is granted. Without this token, the actual call cannot be executed. The approval token includes one or more of the following: a normalized hash of the call parameters, the target resource scope, the risk level, necessary pre-execution technical safeguards, the token validity period, and a limit on the number of times the token can be executed.
[0089] Specifically, the key service responds to the approved tool call task and constructs the approval token payload by concatenating fields; the key service calls the pre-configured task key, performs a key hash message authentication operation on the approval token payload to obtain the key hash message authentication digest, and concatenates the approval token payload with the key hash message authentication digest to generate the approval token.
[0090] The payload includes one or more of the following: token unique identifier, normalized parameter hash, target resource range, final risk level, set of required protection items, token issuance time, token validity period, maximum number of executions, one-time random number, permission set version, policy version, tool call semantic vector hash, user permission vector hash, task boundary vector hash, and cross-constraint executable range hash.
[0091] For S500, before the tool is executed, the pre-execution technical protection items are checked item by item based on the risk level to obtain the environmental side verification results.
[0092] Specifically, for the target resource snapshot protection item, the readiness conditions required for it to take effect are divided into two parts. First, the generation of a snapshot of the current state of the target resource must be completed. Different types of resources correspond to different snapshot carriers. Among them, K8s resources use resource manifest snapshots, databases use backup tables or rollback SQL, and various cloud resources generate configuration snapshots. Second, the registration of snapshot integrity hash must be completed to retain the snapshot baseline fingerprint.
[0093] The snapshot validity verification mechanism of this protection system adopts a dual verification mechanism, which combines snapshot storage receipt and hash comparison for verification. The snapshot storage receipt is used to confirm that the snapshot data is successfully and completely persisted. The hash comparison compares the hash value calculated in real time after reading the snapshot with the pre-registered baseline hash to jointly determine whether the snapshot has any defects or tampering issues. Only when both verifications pass can the snapshot be used for resource rollback and recovery, that is, only then is it determined that the target resource snapshot protection item has passed the readiness verification.
[0094] The readiness check for the target resource lock protection item includes: successfully acquiring the mutex lock corresponding to the target resource instance, and confirming that the lock holder's identity is consistent with the identity of the current operation execution.
[0095] This protection relies on lock service queries as the sole verification method. Before executing an operation, it proactively initiates a query request to the lock service to verify the holding status of the target resource mutex lock and the lock owner. Only when the query result confirms that the current executor is legally holding the mutex lock is the subsequent resource operation allowed to continue, which means that the target resource lock protection has passed the readiness check.
[0096] The readiness checks for approval token protection items include: requiring that the approval token actually exists, is within its validity period, and has not yet reached the set limit for the number of times it has been used.
[0097] This protection uses token metadata verification as the verification method. It reads various metadata built into the token and checks the token's existence, validity period, and execution count one by one. Only after all verifications pass can the token protection item be confirmed as ready for approval.
[0098] The readiness check for declarative idempotency protection items includes: first, converting the original imperative call into a declarative description of the resource's expected state; comparing the current state of the resource with the declared expected state; detecting whether there is a valid difference between the two; and only when the check confirms that there is a change to be executed, is the declarative idempotency protection item determined to have passed the readiness check.
[0099] In this practical example, if the comparison finds that the current state is consistent with the expected state, it means that no change needs to be performed, and the operation is terminated directly. Only when a real and valid state difference is identified is a change instruction allowed to be issued. This verification can avoid the repeated issuance of redundant operations and prevent anomalies caused by multiple executions.
[0100] The readiness verification for transaction-level simulation protection items includes: the system has completed trial operation, execution scheme simulation, or shadow execution of such transaction simulation processes, and has generated predicted impact data including the number of changed rows, the number of affected resources, and the estimated cost, and all predicted impact indicators are within the range specified in the approval document; the existence verification of the simulation report and the comparison of indicator ranges are used as verification methods. First, it is verified that a complete simulation report has been generated, and then the predicted values in the report are extracted and compared with the limits specified in the approval document item by item. After both verifications pass, the transaction-level simulation protection item is determined to have passed the readiness verification.
[0101] The method for verifying the consistency of the business instruction content for this tool call based on the current approval token in S500, and obtaining the verification result on the request side, specifically includes: After receiving a tool invocation request, the execution gateway initiates a verification request to the key service. The key service then uses the task key it holds to recalculate the key hash message authentication digest and compares the result with the key hash message authentication digest attached to the token. Multiple token attribute verifications are performed to confirm that the resource scope covers the target resource of this invocation, that the protection set is consistent with the environment-side verification results, that the token is valid, that the cumulative execution count obtained based on the token identifier does not exceed the maximum execution count limit, and that the one-time random number has no usage record to prevent replay attacks. At the same time, it is verified that the permission version and policy version are still the currently valid versions of the system. If any verification fails, the verification result on the request side is determined to be unsuccessful.
[0102] For S600, when both the environment-side verification result and the request-side verification result pass, the tool call request is executed in the controlled execution environment. This includes: when both the environment-side verification result and the request-side verification result pass, the controlled execution module builds a controlled execution environment based on the tool gateway, execution runner, sandbox, container, Kubernetes task, cloud function or restricted execution node. The managed agent does not hold high-privilege credentials in the production environment and initiates the tool call request through the platform's controlled environment.
[0103] In this embodiment, both are blocking security access checks before tool execution. Two rigid interception checkpoints are set up before the business operation is implemented. One ensures that the operating environment has sufficient security protection capabilities, and the other ensures that the operation to be executed and the approved authorization content are completely consistent. Security vulnerabilities are blocked from two dimensions: the environment and the business instructions. Only when both types of checks pass can the subsequent execution process be allowed.
[0104] After the approval process is completed, the executor can use the approval token to obtain a temporary credential with minimum privileges. The scope of access to this credential is strictly limited to the target resource specified by the approval token, and the network access control policy ensures that access is only allowed to the target system within the approval scope.
[0105] Furthermore, the execution process can employ isolated file systems and temporary working directories, strictly enable command whitelists and parameter constraint mechanisms and intercept dangerous parameters, disallow any new unapproved call parameters, and set execution timeouts, concurrency limits and resource quotas.
[0106] The system can continuously collect standard output, error output, process exit codes, and target resource change information, and perform sensitive information desensitization on the output content. When necessary, it only returns a summary or hash value to the model context to prevent sensitive raw data from being directly passed into the model.
[0107] When a task is completed, times out, or fails to execute, the temporary credential is automatically revoked and the temporary working directory is cleaned up. Audit events are generated throughout the process, and the status of the target resources before and after execution is compared, leaving a complete operation audit record.
[0108] If any security check fails, a tiered control action will be implemented. The tiered control action includes at least one of the following: blocking execution, escalating the approval process, transferring to a sandbox for rehearsal, degrading execution authority, and manual takeover.
[0109] In this embodiment, the existence of real side effects in tool calls refers to the following conditions being met to determine that a tool call has real side effects: First, it can change the persistent state of external systems, including writing, modifying, or deleting external data, or adjusting resource configurations, starting or stopping related services; second, it will cause costs or quota consumption, such as creating various billing resources or calling application interfaces with billing attributes; third, it sends irreversible information or pushes data across existing trust boundaries, typical scenarios include sending emails, pushing instant messages, writing data to external storage, and calling external application interfaces with business parameters.
[0110] This invention breaks through the limitations of traditional static whitelists, which can only control permissions at the tool level, by performing structured analysis on tool call requests dynamically generated by managed intelligent agents, constructing risk vectors, and implementing refined risk classification. It can distinguish the risk differences between different call parameters, target resources, and execution contexts of the same tool, and realize quantitative risk judgment of nondeterministic model output call behavior.
[0111] Based on the risk level, a dynamic approval strategy is matched and the scope of impact is generated. The approval process no longer relies solely on the subjective experience of the reviewers. It can output objective and referable side effect prediction information, reducing the probability of manual misapproval and omission.
[0112] Once the approval is completed, an approval token bound to the current call context is generated, solidifying the approval boundary into a verifiable credential and establishing a strong binding relationship between the approval chain and the execution chain.
[0113] During the execution phase, simultaneous verification of environmental protection items and dual verification of request consistency based on approval tokens are carried out to ensure that the execution environment meets the pre-protection conditions such as isolation, rate limiting, and parameter filtering required for the corresponding risk level. At the same time, abnormal behaviors such as instruction tampering, parameter appending, and access to resources beyond the scope are intercepted after approval, ensuring that call instructions that have not been verified for compliance cannot reach production resources.
[0114] The controlled execution environment constrains its operation behavior based on mechanisms such as least privilege temporary credentials, network isolation, file isolation, and output anonymization. When the task ends, credentials are automatically reclaimed and the execution environment is cleaned up, avoiding the risk of persistent side effects caused by tool calls.
[0115] After execution, conduct audits and collect behavioral data to continuously optimize control strategies and form a complete control loop.
[0116] The entire mechanism transmits the certainty of risk assessment conclusions to the tool execution stage, enabling the entire chain of risk assessment, approval, execution, and audit to be verifiable and traceable. Once the execution behavior deviates from the approved limits, the process can be switched to manual takeover or automatic compensation and recovery operations can be performed. This solves the technical defects of relying solely on static permissions and single manual confirmation, which cannot continuously constrain the use of high-risk tools by intelligent agents. It ensures that the operation of tools with real side effects is safe, controllable, and interpretable in the production environment.
[0117] A computer device according to embodiments of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0118] The processor may be a central processing unit (CPU) or other processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the managed intelligent agent tool invocation approval and execution control method described in the foregoing embodiments of this disclosure.
[0119] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.
[0120] like Figure 5 This is a schematic diagram of a computer device provided for an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the computer device in the embodiments of the present disclosure. Figure 5 The computer device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0121] like Figure 5 As shown, a computer device may include a processor (such as a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) or programs loaded from storage devices into random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer device. The processor, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0122] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow the computer device to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 5 A computer apparatus with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0123] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the managed intelligent agent tool invocation approval and execution control method of embodiments of this disclosure are performed.
[0124] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0125] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When these non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the managed intelligent agent tool invocation approval and execution control methods described in the foregoing embodiments of the present disclosure are performed.
[0126] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0127] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0128] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0129] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.
[0130] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0131] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0132] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0133] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0134] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A method for approving and controlling the execution of managed intelligent agent tool calls, characterized in that, include: Perform structured analysis on tool call requests initiated by managed intelligent agents to determine the risk level corresponding to the tool call requests; Based on the risk level and the tool type corresponding to the tool call request, determine the pre-execution technical protection items corresponding to this call from the preset risk control matrix; Based on the risk level and the dynamic and historical information corresponding to the tool call request, determine the approval strategy corresponding to the current request; The approval strategy is executed, and an approval token for that session, bound to the approval result, is generated upon approval. Before the tool is invoked and executed, the technical protection items before execution are verified one by one based on the risk level to obtain the environmental verification results. Based on the current approval token, perform consistency verification of the business instruction content for this tool call, and obtain the verification result from the request side; When both the environment-side verification result and the request-side verification result pass the verification, the tool invocation request is executed in the controlled execution environment.
2. The managed intelligent agent tool invocation approval and execution control method according to claim 1, characterized in that, The structured analysis of tool invocation requests initiated by the managed agent to determine the risk level corresponding to the tool invocation requests includes: Perform structured analysis on tool invocation requests initiated by managed agents to obtain tool invocation risk vectors; Based on the tool invocation risk vector and the preset mandatory coverage rules, the risk level corresponding to the tool invocation request is determined.
3. The managed intelligent agent tool invocation approval and execution control method according to claim 2, characterized in that, The structured analysis of tool invocation requests initiated by the managed agent to obtain a tool invocation risk vector includes: Standardize the processing of tool call requests and extract key risk characteristics; Collect the task context associated with the tool invocation request; Based on the task context, determine the pre-execution security verification information before the tool is invoked; Based on the key risk characteristics and the pre-security verification information, a tool invocation risk vector is generated.
4. The managed intelligent agent tool invocation approval and execution control method according to claim 3, characterized in that, The standardization of tool call requests and extraction of key risk characteristics include: In response to a tool call request initiated by a managed intelligent agent, the tool call request is intercepted and bound to a preset traceability identifier; All tool call requests are standardized and transformed to generate a unified tool call record; The unified tool call records are parsed to extract key risk features.
5. The managed intelligent agent tool invocation approval and execution control method according to claim 1, characterized in that, The step of determining the risk level corresponding to the tool invocation request based on the tool invocation risk vector and the preset mandatory coverage rule includes: Determine the preset mandatory coverage rules based on the corresponding scenario; If the tool invokes a risk vector that matches the mandatory coverage rule, the risk level corresponding to the mandatory coverage rule will be used as the risk level corresponding to the tool invocation request; If the tool call risk vector does not match the mandatory coverage rule, the risk information of the tool call risk vector that matches the anchor point is determined according to the preset risk anchor point library; The risk level corresponding to the highest risk information is used as the risk level corresponding to the tool call request.
6. The managed intelligent agent tool invocation approval and execution control method according to claim 1, characterized in that, The step of determining the risk information of the tool calling risk vector that hits the anchor point according to the preset risk anchor point library includes: Determine the preset risk anchor point library and the corresponding baseline levels; The tool retrieves the target anchor points hit by the risk vector and obtains the corresponding anchor point score based on the baseline level of each target anchor point.
7. The managed intelligent agent tool invocation approval and execution control method according to claim 6, characterized in that, The step of obtaining the corresponding anchor point score based on the baseline level of each target anchor point includes: Obtain the cosine similarity between the tool invocation risk vector and a single target anchor point; Obtain the baseline score for the baseline level corresponding to each target anchor point; Based on the operation type and impact information corresponding to a single target anchor point, determine the reversibility coefficient and impact coefficient; The cosine similarity, baseline rating, reversibility coefficient, and influence coefficient are fused to determine the anchor point score corresponding to a single target anchor point.
8. The managed intelligent agent tool invocation approval and execution control method according to claim 1, characterized in that, The step of determining the approval strategy corresponding to the current request based on the risk level and the dynamic and historical information corresponding to the tool call request includes: Obtain the dynamic information corresponding to the tool invocation request; Obtain the historical behavior information corresponding to the tool call request; Based on preset priority decision rules, a multi-level linkage analysis is performed on the risk level, the dynamic information, and the historical behavior information to determine the approval strategy corresponding to the current request.
9. A computer device, characterized in that, The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor; the instructions are executed by the at least one processor to enable the at least one processor to execute the managed agent tool invocation approval and execution control method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions; the computer instructions are used to cause the computer to execute the managed intelligent agent tool invocation approval and execution control method as described in any one of claims 1-8.
11. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1-8.
