Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk8 min

AI Agent Security in Production: How to Limit What an Agent Can Do

Production agent security depends on limiting tool authority and validating every consequential action outside the model—not on trusting a prompt to prevent mistakes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You do not make a production AI agent safe by asking it to be careful. You limit its authority, check every consequential action outside the model, and require human approval when a mistake would be hard to undo. That matters because an agent can turn a mistaken or manipulated plan into a real change in another system.

Why can an agent do the wrong thing?

An agent can read material and call tools: it might search email, query a database, create a ticket, change an account, or send a message. That combination creates a path from bad input or faulty reasoning to a real-world effect. OWASP’s LLM06:2025 Excessive Agency describes three common contributors: excessive functionality, excessive permissions, and excessive autonomy.

As an Amazon Associate I earn from qualifying purchases.

One threat is indirect prompt injection. Malicious instructions can be placed in content the agent is asked to process, such as a website, email, file, or API response. NIST’s Center for AI Standards and Innovation describes agent hijacking as an attack in which instructions embedded in ingested data cause an agent to take unintended, harmful actions. The agent may treat that text as relevant instructions even though it has no authority to change the task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The safe design assumption is that the model can misunderstand, be manipulated, or produce an unsafe proposal. Application code and downstream services—not the model’s promise to follow a prompt—must decide what actually runs. Neither a checklist nor a prompt eliminates failure.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

What should the agent be allowed to do?

Start by defining the job, then give the agent only the tools and access needed for that job. A support agent that summarizes account history may need read access to a particular customer’s records; it does not automatically need permission to issue refunds, change account ownership, or export the whole database.

  • Use task-specific tools. Expose narrow operations such as “look up this order” rather than a general-purpose database connection. Keep tools unavailable unless the task needs them.
  • Scope identity and resources. Use a distinct identity for the agent or task, with access restricted to the relevant user, tenant, records, and operations. Avoid wildcard access.
  • Prefer read-only access where it works. Separate reading from writing, and make write permissions explicit rather than an incidental consequence of a broad role.
  • Do not give an agent unrestricted shell, database, or network access. If a capability is essential, constrain the operation and its reachable resources in the surrounding system.
  • Separate trust levels. User requests, retrieved documents, tool results, and administrative policy are not interchangeable. Content the agent reads must not be able to grant itself new authority.

OWASP’s AI Agent Security Cheat Sheet and LLM06:2025 Excessive Agency both emphasize minimizing functionality and permissions. The practical test is simple: if the model is tricked into using every tool it can see, what could it change? Reduce that possible damage before relying on detection.

How do you stop an unsafe tool call from executing?

Put an authorization check in the execution path. When the model proposes a tool call, a trusted component should independently verify the caller, operation, target, arguments, current authorization, and risk class immediately before the tool runs. OWASP’s AI Agent Security Cheat Sheet states: “Enforce authorization in the execution component, outside the agent’s context.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify the request. Resolve the authenticated user, tenant, agent session, and task that produced the proposed call.
  2. Resolve the capability. Confirm that the requested tool and operation are on an allowlist for this agent and task. Unknown tools or operations should be rejected.
  3. Validate the target and arguments. Check the resource, ownership or tenant boundary, argument types, allowed values, and size limits. Do not accept a model-generated identifier as proof that the user may access that object.
  4. Recheck authorization at execution time. Ask the policy or downstream service whether this actor may perform this exact operation on this exact resource now. Do not rely on an earlier model decision or a permission inferred from conversation text.
  5. Apply the action gate. If the operation is high impact, require approval bound to the exact operation and parameters. Reject the call if approval is missing, expired, or does not match.
  6. Execute and record the outcome. Record the policy decision and tool result in an audit system the agent cannot edit.

Fail closed: if the policy service is unavailable, arguments cannot be validated, or an approval cannot be verified, do not execute the action. A model’s explanation that a call is necessary is not authorization.

Rank #2
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Which actions need a person to approve them?

Use stronger gates for actions that are irreversible, financially consequential, administrative, or externally visible. The exact boundary depends on the system and the possible harm; classify actions before launch rather than deciding ad hoc in the middle of a conversation.

Action class Typical treatment Examples
Low-impact, reversible Allow within narrow permissions; validate inputs and log the result. Search permitted records; draft an internal summary.
Meaningful change, recoverable Require policy checks and, where appropriate, a preview or confirmation. Update a record or create an internal ticket.
High-impact or difficult to reverse Require explicit human review before execution; apply the narrowest available scope. Issue a payment, change access rights, delete data, or send an external commitment.

Approval must cover the actual action, not a vague request to “continue.” Show the reviewer the actor, operation, target, and parameters, then bind the approval to those details. Expire approvals and prevent replay so an old authorization cannot be reused for a changed request. The agent must not approve its own consequential action.

How should untrusted content and sensitive data be handled?

Treat retrieved documents, emails, websites, and API responses as data to analyze—not as instructions that can override the user’s task or the application’s policy. A prompt can tell the model to ignore instructions embedded in source material, but the enforcement boundary belongs outside the model: content cannot add tools, expand access, waive approval, or change authorization rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Keep policy separate from content. Make trusted task instructions and untrusted source material distinguishable, and ensure the execution layer applies policy independently of what the agent reads.
  • Minimize context. Provide only the sensitive information needed for the task. Avoid placing secrets or unrelated user records in the model’s context.
  • Protect session boundaries. Do not let one user’s conversation, retrieved data, or memory leak into another user’s session.
  • Guard persistent memory. Validate what can be written to memory, who can read it, and how it is tied to a user or tenant. Treat remembered content as potentially stale or poisoned rather than as a source of authority.
  • Redact secrets from logs. Keep useful security evidence without copying credentials or unnecessary sensitive content into broadly accessible monitoring systems.

These measures address different failure paths: limiting context reduces exposure, isolation limits cross-user leakage, and external authorization prevents untrusted text from acquiring privileges. No one measure substitutes for the others.

Rank #3
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

What should you monitor and limit in production?

Capture enough evidence to reconstruct what happened without allowing the agent to rewrite its history. For each action, record the actor and session, proposed tool call, validated target and arguments, policy result, approval reference if applicable, execution outcome, and relevant timestamps. Restrict access to the logs and keep the audit trail outside the agent’s control.

Bound the system’s ability to loop or consume resources. Set limits appropriate to the task for tool calls, retries, runtime, tokens, and cost. Add alerts for unusual tool sequences, repeated authorization denials, bursts of actions, unexpected access to sensitive resources, and repeated attempts to bypass an approval gate. A limit should stop or pause work safely, not silently turn a denied action into a less visible one.

CISA and its partner agencies’ May 1, 2026 release, CISA and Partners Release Guidance on Adopting Agentic AI Services, summarizes risk-management alignment, constrained autonomy, identity, layered defenses, threat modeling, monitoring, and assessment. These are operating responsibilities, not merely model settings: someone needs to review alerts, investigate incidents, and be able to disable or restrict an agent’s access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do you test the controls before launch and after changes?

Test the complete system—including the model, prompts, retrieval, memory, tools, policy checks, approval flow, and downstream services. A safe answer in a chat window does not prove that the execution path will reject an unsafe action.

Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
  • Place adversarial instructions in a document, email, web page, or tool response and check that they cannot change the task or authorize an action.
  • Try to make the agent access another user’s or tenant’s data, use a tool outside its task, or pass arguments that target a resource it cannot access.
  • Attempt a high-impact action with no approval, an expired approval, an approval for different parameters, and a replayed approval.
  • Test whether secrets appear in model context, tool output, persistent memory, or logs when they are not needed.
  • Exercise retry limits, tool-chain limits, policy-service failures, and attempts to alter or erase audit evidence.
  • Run repeated attempts, not only a single hand-picked example, and measure attack success for the specific tasks and controls that matter to the deployment.

NIST CAISI’s January 17, 2025 article, Technical Blog: Strengthening AI Agent Hijacking Evaluations, discusses adaptive, task-specific, multi-attempt evaluation. Treat test results as evidence about the scenarios exercised, not proof that the agent is secure in every situation. Keep adversarial cases as regression tests and rerun them whenever the model provider, prompts, tools, retrieval, memory, or policy changes.

How do you choose controls without making the system unusable?

Match controls to the agent’s tools, downstream privileges, data sensitivity, and consequences of action. A read-only research assistant and an agent that can change account access should not have the same autonomy or approval burden.

  • Check permission granularity: can access be scoped to the needed operation and resource, or only granted broadly?
  • Check enforcement: is authorization independently enforced immediately before execution, including by the downstream service where possible?
  • Check approval quality: does approval show and bind the exact target and parameters, with expiry and replay protection?
  • Check containment: are untrusted content, memory, user sessions, and sensitive context separated appropriately?
  • Check operability: can staff see decisions and outcomes, respond to alerts, and disable access during an incident?
  • Check test coverage: are security cases repeatable and rerun after meaningful changes?

More checks can add latency and interrupt low-risk work; fewer checks can leave consequential actions exposed. Make the distinction through action risk and consequence, then verify that the chosen controls work under adversarial conditions. OWASP’s Securing Agentic Applications Guide 1.0 provides practical recommendations for designing, developing, and deploying secure LLM-based agentic applications; none of these sources establishes a universal control that eliminates failure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.