TL;DR
- Expose agent autonomy as a product and policy decision per action, resource, tenant, and context. A single “autonomous” switch is too broad for systems that can both read data and change it.
- In Suggest mode, the agent proposes an action. In Draft mode, it prepares an exact mutation for an authorized person to review. In Auto mode, a separate policy service permits a narrowly bounded action.
- Keep model planning separate from execution. The tool handler must independently authorize the actor, validate arguments, check approvals, and enforce idempotency before it creates a side effect.
- Use explicit approval records, short-lived permissions, audit events, reversible operations, and a human recovery path. Confidence scores and prompt instructions do not grant authority.
Why autonomy needs more than one setting
An agent that summarizes an invoice and an agent that pays it may use the same model, but the consequences of a wrong action are different. “Autonomous” and “manual” describe the runtime too coarsely. Product teams need a way to let an assistant retrieve and explain information, prepare a change for review, or execute a limited class of low-impact operations without granting every tool the same authority.
A useful autonomy dial defines three interaction modes for each capability. Suggest means the system can read within its authorized scope and produce a recommendation, but it cannot mutate the system of record. Draft means it can prepare a typed, inspectable mutation that stays pending until an eligible human approves that exact action. Auto means the application may execute an action if its policy checks pass at execution time and the action is inside a declared risk envelope.
The dial controls which path is available. It should not be a prompt setting that asks the model how much freedom it wants. The model can propose. Application code determines what the user, tenant, and action are allowed to do. OWASP recommends least-privilege tool access and explicit human confirmation for high-consequence actions, while NIST's Generative AI Risk Management Profile describes oversight roles and monitoring as governance controls that should match context and risk. OWASP AI Agent Security Cheat Sheet · NIST Generative AI Profile
Classify actions before assigning an autonomy mode
Build an action registry that describes each operation independently from the model prompt. Include a stable action name, schema version, target resource types, required permissions, data sensitivity, reversibility, impact, idempotency requirements, and whether the operation can run automatically. This registry becomes the inventory for product settings, security reviews, approval screens, and runtime enforcement.
Classify by possible effect, not by how simple the tool call looks. Reading a customer's public profile may be low impact. Exporting all support records can expose sensitive data even though it is technically a read. Changing an email address, issuing a refund, suspending a user, and deleting a workspace have different blast radii and reversibility. Assign the mode based on the operation plus its target, amount, scope, and caller authority.
| Mode | Agent may do | Application must enforce |
|---|---|---|
| Suggest | Read permitted context and return a recommendation or explanation. | No mutation endpoint is available to the model. Reads still use the caller's data scope and are logged. |
| Draft | Prepare a typed proposal with target, arguments, rationale, and expected effect. | Persist it as pending. Show the exact action to a qualified reviewer. Execute only after a valid approval for that proposal. |
| Auto | Request a registered action without a human step. | Evaluate current policy, tenant setting, user grant, resource state, bounds, and idempotency outside the model before execution. |
Do not expose a generic “run SQL,” arbitrary shell, or unrestricted API request tool and try to constrain it later with a prompt. Make each tool correspond to a narrow business operation. If a tool's scope cannot be described in a small permission contract, it is probably too broad for an agent-facing action.
Represent an action as a proposal before execution
A Draft should be a durable record, not a transient chat bubble. Persist the tenant, requesting user, action identifier and version, canonical target, validated arguments, source context references, policy version, expiry, and current state. Store a digest of the canonical action body so the approval can be bound to exactly what the reviewer saw. Keep model-generated explanation separate from the executable fields so prose cannot be smuggled into a tool argument.
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Literal
Mode = Literal["suggest", "draft", "auto"]
@dataclass(frozen=True)
class ActionDefinition:
name: str
version: int
required_permission: str
allowed_modes: frozenset[Mode]
reversible: bool
idempotent: bool
@dataclass(frozen=True)
class PendingAction:
action_id: str
tenant_id: str
requested_by: str
definition: ActionDefinition
target: dict[str, str]
arguments: dict[str, Any]
payload_digest: str
policy_version: str
expires_at: datetime
async def propose_change(actor, tool_call) -> PendingAction:
definition = registry.require(tool_call.name)
arguments = definition.input_schema.model_validate(tool_call.arguments)
await policy.authorize_read_scope(actor, arguments)
payload = canonicalize(definition, arguments)
return await pending_actions.insert(
tenant_id=actor.tenant_id,
requested_by=actor.user_id,
definition=definition,
arguments=payload.arguments,
payload_digest=sha256(payload.bytes),
policy_version=policy.version,
expires_at=clock.now() + approval_ttl,
state="pending",
)
This is an implementation outline, not a complete permission system. The proposal endpoint must obtain tenant identity from the authenticated request context, never from a model-controlled field. Validate each target through application-owned queries, and validate business invariants again when the action is executed. A valid schema only proves that data has the expected shape.
Make approval specific, attributable, and temporary
An approval should apply to one proposal and one immutable action payload. The review screen should show the target, fields changing, old and proposed values where appropriate, external recipients, likely effects, and any data the agent relied on. “Approve this agent” or “approve all future changes” creates an authority grant that can outlive the policy or intent that motivated it.
At execution time, verify the reviewer is authenticated, is permitted to approve that operation, is not disallowed by separation-of-duties policy, and approved the current payload digest before expiry. Recheck that the target still exists and that the actor and tenant still have authority. If the underlying record changed after review, invalidate the proposal and ask for a new decision rather than applying stale intent. A second factor or independent reviewer may be appropriate for high-impact operations.
Record approval as an append-only decision event with proposal identifier, reviewer, timestamp, action digest, policy version, outcome, and reason category. Do not allow editing the proposal after approval. If parameters change, create a new proposal with a new digest. Keep separate events for approval, denial, cancellation, expiry, and execution result so an operator can reconstruct the sequence.
Enforce Auto mode at the tool boundary
Auto mode is a limited application permission, not a trust decision about the model. At the final mutation handler, verify the authenticated user, tenant, action registry entry, current autonomy policy, resource scope, numeric or count bounds, rate limits, and idempotency key. The handler should return a typed result with an audit reference. An agent must not be able to bypass this handler by calling a broader internal API.
async def execute_auto(actor, action_name, target, raw_args, request_id):
definition = registry.require(action_name)
args = definition.input_schema.model_validate(raw_args)
decision = await policy.evaluate(
actor=actor,
action=definition,
target=target,
arguments=args,
)
if not decision.allowed or decision.mode != "auto":
raise PermissionError("action is not enabled for automatic execution")
await policy.validate_resource_scope(actor, target)
await policy.validate_effect_bounds(definition, args)
key = stable_operation_key(request_id, definition, target, args)
return await action_store.run_once(key, lambda: definition.execute(target, args))
The authorization decision is repeated near the side effect because access can change between planning and execution. Use short-lived credentials scoped to the specific integration and operation. Never put provider credentials in the model context. OWASP's prompt injection guidance likewise emphasizes enforcing permissions and argument validation at the tool boundary rather than trusting model instructions. OWASP prompt injection prevention
Use idempotency keys derived from the logical operation, not a retry attempt. Persist action status transitions and external provider references. A network timeout after a provider accepted a mutation is ambiguous. Query the provider or reconcile before retrying with a new operation. For workflows that cross multiple systems, model compensation as a separate operation and give it the same authorization and audit treatment as the original action. Payment idempotency keys and timeout recovery
Use policy-driven downgrades without trusting a score alone
A mode can be restricted at several levels: global product policy, organization or tenant configuration, user permission, action class, and an individual resource. The effective mode should be the most restrictive applicable rule. A workspace administrator may disable all automatic writes while allowing Suggest and Draft. A specific action can remain Draft even when another low-risk action is enabled in Auto mode.
Risk signals can trigger a restriction, but they should not grant a higher mode. A temporary provider outage can turn Auto into Draft so that people can review a queued operation. Repeated authorization denials can pause the agent. A model confidence score may help order human review, but it cannot make an unsafe operation safe or decide that the user owns the target. Define thresholds from labeled evidence, monitor false positives and false negatives, and fall back to the lower-privilege behavior when the signal is missing.
Changes to the dial should be versioned and observable. Record the prior value, new value, actor, scope, reason, and effective time. If a tenant switches a capability from Auto to Draft, queued actions must not execute merely because they were created under the old setting. Re-evaluate policy when they are claimed. Maintain a kill switch that blocks mutations at the executor and can be activated without relying on the agent runtime.
Threat model prompt injection and delegated authority
Agent context can contain untrusted instructions from users, support tickets, retrieved documents, webpages, and tool outputs. A prompt injection can try to make the agent invoke an allowed tool for an unauthorized purpose. Distinguishing instructions from data in the prompt is useful, but not a reliable security boundary by itself. Keep untrusted content away from broad credentials, enforce server-side authorization, and require action-specific approval for consequential changes.
Delegation between agents can widen authority unexpectedly. If a low-privilege agent asks a helper with administrator tools to act, the helper must not inherit the first agent's request as proof of authorization. Pass a signed, scoped delegation token with the permitted action, resource, audience, and expiry, or require the downstream service to authenticate the original user and evaluate policy again. Log both the initiating identity and the executing service identity.
Separate read tools from write tools. Give each agent run access only to the capabilities required for the selected task. Do not provide access to email, payments, cloud administration, or production data simply because another workflow might need them. Test direct and indirect prompt injection using harmless tool substitutes, including payloads that request exfiltration, privilege escalation, cross-tenant access, and policy changes. OWASP describes least privilege and approval as impact-reduction controls; no prompt hardening technique removes the need for independent enforcement. OWASP LLM01: Prompt Injection
Measure whether the dial is behaving as intended
Track how often actions are suggested, drafted, approved, denied, expired, executed automatically, retried, or sent for manual recovery. Slice by action, tenant, policy version, impact class, and model or prompt release. Measure reviewer delay and proposal-edit rates to find poor drafts. Sample completed actions to compare proposed intent with the actual side effect. Keep failures distinct from denials, since a denied permission is not the same as a provider outage.
Monitor safety and product value together. Useful measures include the fraction of proposals that need material correction, the rate of expired approvals, duplicate side effects prevented by idempotency, and recovery time for ambiguous provider responses. These are operational indicators for a specific system, not universal thresholds. Establish a baseline and test the impact of policy changes before raising autonomy.
Retain enough information to explain a decision while limiting sensitive data. Store reference identifiers and scoped snapshots where feasible rather than copying full documents and credentials into traces. Define deletion and retention rules for prompts, retrieved content, action proposals, reviewer notes, and audit records. If you use personal data, assess applicable privacy requirements and purpose limitations separately from the agent's product settings.
Frequently asked questions
Can an LLM choose whether to run in Auto mode?
No. The model may propose an action, but application policy must decide whether the current user, tenant, resource, and action are allowed to run automatically. Evaluate the rule in trusted code at the execution boundary. A confidence value or prompt instruction can help shape the interaction, but it is not authorization.
What should a human see before approving a draft action?
Show the exact action name, target, changed values, relevant scope, likely effect, and an identifier for the proposal being approved. Bind approval to a digest of the validated arguments, expire it, and recheck current authorization and resource state before execution. If the proposal changes or the record is stale, require a new approval.
Should every agent action require human approval?
No single approval policy fits every action. Read-only suggestions can often proceed under the caller's existing access, while irreversible or high-impact writes may need approval or may be disallowed. Classify each action by impact, scope, reversibility, and applicable policy. Start with narrower permissions and expand only after evaluated evidence supports the change.
Can a confidence threshold safely enable more autonomy?
A confidence score alone cannot authorize a side effect. It may be useful for prioritizing review if it is calibrated for the task and measured against representative cases. Keep permissions, bounds, identity checks, and approval rules independent from the score. When confidence is missing or outside its validated range, use a lower-autonomy path.
Make the authority boundary visible
A Suggest, Draft, and Auto model gives users a comprehensible way to interact with agent capabilities, but the safety guarantee comes from the action registry, policy checks, and execution boundary. Persist proposals, bind approvals to exact payloads, reauthorize at the moment of execution, and make every state change inspectable.
If you are adding actions to a customer-facing agent, talk to our engineering team about tool scopes, approval flows, audit records, and failure recovery. For a deeper evaluation approach, see our guide to production RAG evaluation and deterministic code generation.
