Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Agent Guard's Approach to Limiting AI Agent Capabilities

Agent Guard restricts what an AI agent can do when tricked by acting as an intermediary, registering tools, creating tasks, and approving actions to ensure only authorized operations are executed.

Share
AI-generated conceptual illustration accompanying: Agent Guard's Approach to Limiting AI Agent Capabilities
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Overview of Agent Guard's Approach

Agent Guard takes the other approach: assume the agent can be misled, and limit what a misled agent is able to do. This method focuses on restricting the agent's capabilities when it is tricked, rather than relying on the agent's ability to distinguish between legitimate and deceptive inputs. Risks and which package handles them shows what Agent Guard covers for each one, and what stays with you. How it works involves the agent (a model) and your application (the host), with Agent Guard acting as an intermediary. It registers tools, creates tasks, and approves tools and actions, ensuring that only authorized operations are executed. This approach provides a structured way to manage risks associated with AI agents being manipulated or tricked into performing unintended actions.

Key Security Controls and Limitations

Agent Guard implements several key security controls to limit what an AI agent can do when it gets tricked. It stops a call routed through the guard when the tool is unknown, changed since approval, or not granted to the task; when the resource, tenant, or recipient is outside the task’s scope; when the task reads sensitive data and attempts to send it outside; when an action requires approval but lacks it or has expired; or when the task exceeds its budget, deadline, or has been revoked. According to Hacker News Show, these controls help prevent unauthorized actions but do not cover all risks. For example, Hacker News Show notes that Agent Guard does not fully address OWASP risk ASI01, Agent Goal Hijack, though it limits tasks to what was granted. Similarly, Hacker News Show explains that ASI02, Tool Misuse and Exploitation, is mitigated by ensuring calls only proceed if the task was explicitly granted the tool on the exact resource, within its tenant, and to an allowed recipient.

Implementation and Usage Details

The implementation of Agent Guard involves installing the package via npm and defining tools with specific permissions and constraints. For example, the delete-ticket tool is registered with a requiresApproval flag, ensuring that its use is controlled. Once registered, the tool must be explicitly approved using the approveTool method. Tasks are then created with defined grants, budgets, and deadlines, ensuring that agents operate within predefined limits. This approach allows developers to enforce strict access controls and prevent unintended actions by AI agents, even when they are tricked or misdirected. The package supports Node.js 22+ and uses ESM, making it compatible with modern JavaScript environments. Developers can test this setup quickly by following the provided example, which demonstrates how to register, approve, and execute a task with limited permissions.

Handling of Unauthorized or Expired Actions

Agent Guard handles unauthorized or expired actions by ensuring that any call the guard refuses never executes. The model receives a denial as an ordinary tool result, complete with a message guiding it on the next steps. The dispatch function checks if an action requires approval, and if so, stores the prepared action in a waiting map. A review screen then displays the action for human approval. If the action is not approved or the digest does not match, an error is thrown. The system also includes a reviewInHostUI function, which sets an expiration time of 30 seconds for the approval request. Approval is only granted if the reviewer's digest matches the prepared action's digest, ensuring security and integrity. The system emphasizes that tenant and resource owner information should be taken from internal records, not from the model's input.

OWASP Risk Mapping and Standards Alignment

Agent Guard aligns with the OWASP Top 10 for Agentic Applications 2026, mapping risks to specific package controls. According to Hacker News Show, the tool addresses risks such as ASI05 – Unexpected Code Execution (RCE) – by enforcing optional Docker profiles that restrict network access, prevent host credential usage, and ensure files only exit the container after review. These measures are detailed in Hacker News Show, which outlines how Agent Guard handles each risk. Further alignment with standards such as the OWASP LLM Top 10, MITRE ATLAS, and NIST is provided in Hacker News Show, offering a comprehensive view of how the tool integrates with broader security frameworks. This approach ensures that developers can apply consistent, industry-recognized controls to mitigate agentic application risks without overstepping defined boundaries.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more