Guards
Policy enforcement for AI agent payments — budget limits, rate limiting, approval flows, and more.
Available Guards
Budget Guard
Cap total spending over a time window (e.g., $100/day).
Single-Tx Guard
Limit the maximum amount per individual transaction.
Recipient Guard
Restrict payments to an allowlist of approved addresses.
Rate-Limit Guard
Throttle transaction frequency (e.g., max 10/hour).
Justification Guard
Require a purpose/reason string on every payment.
Confirmation Guard
Route high-value transactions through human approval.
Usage (Python)
from algopay import AlgoPay
from algopay.guards import BudgetGuard, SingleTxGuard
ap = AlgoPay(guards=[
BudgetGuard(max_usdc=100, window_hours=24),
SingleTxGuard(max_usdc=25),
])
# This payment will be checked against both guards
result = ap.pay(wallet_id="w1", to="ADDR", amount=10.00)Usage (TypeScript)
import { AlgoPay, BudgetGuard, SingleTxGuard } from "@algodev-studio/algopay";
const ap = new AlgoPay({
guards: [
new BudgetGuard({ maxUsdc: 100, windowHours: 24 }),
new SingleTxGuard({ maxUsdc: 25 }),
],
});
const result = await ap.pay({
walletId: "w1",
to: "ADDR",
amount: 10.0,
});Dashboard Controls
Guards can also be configured through the AlgoPay dashboard under Settings → Spending Controls. Dashboard policies are enforced server-side on all API key authenticated calls.