Overview
This guide walks through implementing basic AARM patterns. By the end, you’ll have:- A policy that blocks sensitive actions
- Action interception and evaluation
- Basic receipt generation
Prerequisites
- An AI agent that invokes tools (LangChain, OpenAI Agents, custom)
- Python 3.10+ or Node.js 18+
- 30 minutes
Step 1: Define Your First Policy
Create a policy file that blocks external email with sensitive data:Step 2: Create the Policy Engine
A minimal policy engine that evaluates actions against rules:Step 3: Create the AARM Hook
Wrap tool calls with AARM enforcement:Step 4: Protect Your Tools
Apply the decorator to your tool functions:Step 5: Test It
Next Steps
Write Your First Policy
Deep dive into policy syntax and patterns
MCP Gateway Pattern
Network-level enforcement for MCP tools