---
title: "Replay recorded agent traffic against a policy"
description: ""
canonical: "https://pgbeam.com/docs/api/policies/replayPolicy"
last-updated: "2026-09-05T14:02:29.000Z"
---

# Replay recorded agent traffic against a policy

> 

URL: https://pgbeam.com/docs/api/policies/replayPolicy

Replays the project's recorded agent audit traffic against a candidate policy (either a draft supplied inline or an existing policy referenced by id) and reports what would change: which queries that ran would now be blocked, which blocked queries would now be permitted, and which results would be masked or row-filtered. Traffic is deduplicated by normalized query shape, newest first, and every statement is evaluated through the data plane's own policy engine, so the verdicts match real enforcement. Stateful checks (budgets, approvals, write-mode routing) are reported as informational notes on each result, not verdicts. This endpoint reads only the audit log; it never connects to the upstream database and persists nothing.