1. Introduction to AgentGuard
High-assurance, deterministic security gateway designed to protect autonomous AI agents executing payments via PayPal Sandbox.
What is AgentGuard?
AgentGuard is an infrastructure-level security proxy and deterministic policy engine. When autonomous AI agents (such as tool-using LLMs, autonomous shopping agents, or workflow bots) are granted the power to initiate actions, AgentGuard intercepts, scans, evaluates, and verifies every operation before it reaches downstream APIs.
LLMs cannot be trusted to strictly enforce security or financial constraints through prompt instructions alone. Deterministic code, mathematical invariants, and authoritative server lookups must guard the boundary.
The Problem It Solves
- Agents can be jailbroken via prompt injection.
- Client can spoof item prices or execution amounts.
- Runaway agent loops drain payment balances.
- Zero tamper-evident forensics or operator visibility.
- Deterministic hard limits enforced in Fastify middleware.
- Authoritative catalog prices looked up from PostgreSQL.
- 60+ prompt injection heuristic patterns scanned.
- Cryptographically signed reviewer audit ledger.
What It Does & Does Not Do
| Scope | AgentGuard Implementation |
|---|---|
| Prompt Threat Scanning | Scans inputs using 60+ regex heuristics, Unicode normalization & zero-width filtering. |
| Financial Authority | Server computes total amounts from DB catalog; completely rejects client-submitted prices. |
| Payment Rail | Official PayPal Sandbox Orders v2 API. Live financial capture is strictly disabled by default. |
| What It Does Not Do | It is not an LLM replacement, does not execute unverified binary code, and does not connect to unconfigured production banks. |
Intended Users & Use Cases
Engineers building tool-using autonomous agents, FinTech teams implementing AI commerce, security analysts evaluating agent boundaries, and platform teams self-hosting tamper-evident infrastructure.