Agent Security: How Action Risk Changes the Rules
As LLM agents move from generating text to planning, calling tools, retaining memory, and running autonomously, security must move beyond content filtering. This article explains why action risk emerges from the combination of planning, tool use, memory, and autonomy; proposes treating permissions—identity, resources, actions, conditions, and evidence—as the primary security object; and outlines a practical control pipeline, organizational rules, and self-assessment questions for governing agent actions.
Agents do not create a mysterious subject out of thin air. They bring a long-overlooked fact to the foreground: in digital systems, the consequences of behavior are determined mainly by the permission structure, not by the “cognitive unit” itself. A model can propose plans, generate commands, and select tools, but what actually opens files, changes configurations, calls APIs, and sends messages is the identity, credentials, and scope that have been granted. Around 2026, security discussions are shifting from “will the model say something wrong” to “will the system do something wrong.” These two questions appear to differ by only one word, but the object of governance is completely different.
1. Output-Centric Security and Its Limits
In the early stage of large model applications, risk mainly stayed within the information boundary. People cared about whether training data was compliant, whether generated content was distorted, whether it amplified bias, and whether it was used for rumors or fraud scripts. Regulation and engineering measures followed this line: data source governance, output filtering, source labeling, human review, transparency, and appeal mechanisms. This framework had historical合理性? No. This framework had historical reasonableness because it assumed that a human still pressed the final execution key. The model was an advisor, and the human was the accountable subject.
Once a system has task decomposition, tool calling, cross-session memory, and continuous operation under preconfigured conditions, this assumption no longer holds. An agent is no longer just a “model that can talk”; it connects language planning to interfaces that can produce side effects. From receiving a goal to producing a consequence, the human buffer may be compressed to a few seconds, or even configured by policy as “no confirmation required.” At this point, an error is no longer just an inaccurate piece of text. It may be an unauthorized read, an incorrect write, an irreversible call, or an automated workflow repeatedly executed in the wrong context.
2. Where Action Risk Comes From
Action risk is not a single vulnerability. It is a systemic consequence of four capabilities stacking together.
First, reasoning and planning allow a goal to be automatically broken into multi-step paths. Each step may look “reasonable,” but together they may bypass checkpoints originally designed for human-computer interaction.
Second, tool calling maps language directly to file systems, browser automation, messaging channels, and business APIs. If interfaces are designed according to “authorize if it can be used,” model hallucinations or prompt injection become real operations.
Third, memory allows context to persist across sessions. A wrong fact written yesterday, a contaminated preference, or a stolen instruction will continue to drive actions today. If memory is not auditable and cannot be invalidated, it gives errors a long-term residence.
Fourth, autonomous execution removes “waiting for a nod every time.” Scheduled tasks, event triggers, and multi-round loops turn a single unauthorized action into continuous behavior, lengthening the detection window and increasing rollback costs.
The risk gene can be summarized in one sentence: untrusted input, through insufficiently constrained planning, acts on over-privileged tools, and lands through side effects that are difficult to reverse. Prompt injection, tampered tool descriptions, and indirect instructions hidden in webpages or documents are common entry points in this chain. Defense should not focus only on whether the model’s answer is polite. It should focus on whether every call has an identity, a scope, an approval, and a trace.
3. Change the Security Object from Content to Permissions
Content safety remains necessary, but it is no longer sufficient. The primary object of agent security should be the permission structure, which includes at least five elements: identity, resources, actions, conditions, and evidence.
Identity: An agent cannot inherit all the permissions of the operator, nor can one long-term shared key represent all tasks. Independent, short-lived, revocable identities should be issued for each agent, each task, or even each sensitive call. The identities of humans, agents, and tools must be distinguishable to avoid “a human approved A, but the system did B in the human’s name.”
Resources: Access scope should be segmented by data classification and business domain. Read, write, delete, external send, payment, and permission changes should be different authorizations, not one “administrator token” that covers everything. Default deny, explicit allow.
Actions: Separate high-side-effect actions from low-side-effect actions. Queries, drafts, and sandbox drills can be automatic; submission, publishing, transfers, and production configuration changes must require elevated approval. The tool list itself should also be minimized, and unregistered tools must not be dynamically introduced at runtime.
Conditions: Authorization should be bound to time, source, environment, quota, and target constraints. For example, allow only during business hours, allow access only to a specified project, set limits on the amount or change size of a single call, and trigger a circuit breaker after repeated failures. If conditions are not written into policy, they depend only on the model’s “self-discipline.”
Evidence: Every plan, every tool call, every approval, and every result must be traceable. Logs should include caller identity, tool name, parameter summary, policy decision, human approver, and final status. Without evidence, it is impossible to distinguish model error, configuration error, and malicious exploitation.
4. An Executable Control Chain
In practice, an agent task can be organized into a fixed pipeline rather than “throw the goal to the model until it is done.”
Goal normalization. Convert natural language goals into structured intent: what should be achieved, which resources may be reached, which actions are prohibited, and what the completion criteria are. Goals that cannot be structured should not enter automatic execution.
Plan visibility. Generate steps and proposed tools first, without immediate execution. When a plan contains unauthorized tools, external sending, privilege escalation, or deletion, mark it as a high-risk step.
Policy decision. An independent policy engine, separate from the model, makes allow, deny, or escalate decisions. The model can suggest but cannot self-approve. The decision should be based on identity, resource labels, and action level, not on the model’s explanation of itself.
Tiered human-in-the-loop. Low-risk actions execute automatically; medium-risk actions receive sampled review; high-risk actions require human confirmation, and the confirmation interface must show the real parameters, not just a model summary. A summary may omit key fields.
Sandbox and idempotency. Write operations should preferably be rehearsed in an isolated environment; production actions should be designed to be retryable and compensable where possible. Actions that cannot be compensated should not be automatic by default.
Runtime protection. Limit loop counts, call frequency, outbound domains, and data egress volume. Detect typical symptoms of prompt injection: instructions requiring existing policies to be ignored, credentials to be requested, or hidden content to be forwarded externally. On a hit, immediately break the circuit and alert, rather than “letting the model judge again.”
Memory governance. Distinguish short-term working memory from long-term knowledge. External content should be untrusted by default; before writing to long-term memory, it should be filtered and its source labeled. Support one-click invalidation by session or by task. Sensitive data should not enter general memory stores.
Post-hoc review. Use the call chain, not the chat log, as the main line of review. Metrics include unauthorized-action interception rate, human escalation rate, rollback count for mistaken execution, and the proportion of high-risk tool usage. These metrics are closer to action safety than “answer satisfaction.”
A schematic policy decision can remain extremely simple. The point is to move the decision out of the model:
if action.side_effect == "high" and not approval.present:deny("need_human_approval")if resource not in identity.scope:deny("out_of_scope")if tool not in allowlist:deny("tool_not_registered")allow()
This is not an interface for any particular product. It only illustrates that the control point should sit before the call and be enforced by deterministic policy.
5. Rules That Must Change at the Organizational Level
If technical controls are not accompanied by institutional rules, they will still be bypassed for convenience. Agents should be brought into existing change, permission, and audit systems as a new class of execution subject, not treated as chat plugins.
Responsibility segmentation must be explicit: the business side defines goals and acceptable loss; the platform side provides identity, policy, and audit; the security side defines the high-risk action list and emergency circuit breaking; the user side is responsible for approved content. There must not be a situation where “the model did it, so no one is responsible.”
Permission requests should follow a least-privilege process similar to that for employees, but with shorter cycles and narrower scope. Long-lived universal keys should be treated as a defect. Keys, tokens, and session credentials must not enter prompts, memory, or ordinary logs.
Change management should treat “the tool set callable by an agent” as production configuration. Adding tools, relaxing scope, and disabling human confirmation should all require review and canary rollout, rather than an operator casually turning them on in a console.
Emergency plans should include immediately revoking identities, freezing tools, cutting external connections, replaying the recent call chain, and executing compensating operations. Drills should cover two scenarios: “continuous calls after the model is injected” and “repeated triggering by erroneous memory.”
Vendor and platform capabilities can be selected by general category: identity and access control, key management, policy engines, sandboxes, logging and audit, monitoring and alerting, isolated data in object storage, and asynchronous approval on message queues. The selection criterion is whether the capability can enforce least privilege and full traceability, not the model’s prose quality. If general cloud capabilities such as Baidu AI Cloud are used, they should also be designed as part of the control plane, rather than handing keys to the agent to manage itself.
6. How to Judge Whether the Rules Have Really Changed
Four questions can be used for self-assessment. Without humans, is the maximum loss an agent can reach acceptable? Can any piece of external text induce it to exceed its authority? Can a high-risk action be traced within minutes to the identity, policy, and approval record? Can a wrong action be compensated, and if compensation fails, can the system be stopped? If any one of the four answers is vague, security is still at output filtering and has not yet entered action governance.
The offense-defense rule in the agent era is therefore simple: do not trust the model’s self-restraint; trust verifiable permissions, interruptible execution, and accountable evidence. Saying something wrong can be corrected. Doing something wrong must be designed to be very unlikely to happen and stoppable after it happens. Spending effort on the permission structure is closer to real risk than repeatedly debating whether the model “understands security.”
