Chapter 1 • Overview

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.

Key Architectural Principle

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

Without AgentGuard
  • 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.
With AgentGuard
  • 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

ScopeAgentGuard Implementation
Prompt Threat ScanningScans inputs using 60+ regex heuristics, Unicode normalization & zero-width filtering.
Financial AuthorityServer computes total amounts from DB catalog; completely rejects client-submitted prices.
Payment RailOfficial PayPal Sandbox Orders v2 API. Live financial capture is strictly disabled by default.
What It Does Not DoIt 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.