DOCS · PERSJAY AI AGENT FIREWALL 0.4.2

Persjay AI Agent Firewall Documentation

Guard your WordPress and WooCommerce site from AI agents. Set rules by risk, hold changes for approval with a before-and-after preview, and undo mistakes in one click.

View changelog →

ON THIS PAGEOverviewInstallation & setupConnecting & watching agentsApprovals & diff previewsPresets, rules & abilitiesActivity log & 1-click undoOne-tap phone approvals & alertsStore money rulesAgent limits & learning modeWhite-label, client approvals & templatesMonthly client reportsMultisite Network AdminTroubleshooting

Overview

Persjay AI Agent Firewall (Agent Firewall for short) sits between AI agents (Claude, ChatGPT, Cursor, WordPress MCP connectors, WP-CLI, and REST or Abilities API clients) and your WordPress site. Every agent call stops at the gate first: safe reads and low-risk drafts can pass, live changes and high-risk actions wait in an approval queue with a before-and-after diff preview, and dangerous actions are blocked outright.

If something ever looks wrong, one click on Stop all agents on the Overview screen — or in the WordPress admin bar from anywhere on your site — refuses every agent call, including reads, until you let agents back in.

What each plan includes

PlanSitesAdds
FreeAny60-second setup wizard, site-type and strictness presets, per-area and per-ability rule overrides, live approval queue with before/after diff previews and edit-conflict warnings, per-agent modes and pause/revoke, connection watching (Application passwords, WP-CLI, WordPress.com/Jetpack, WooCommerce keys, OAuth/JWT tokens, Basic Auth and XML-RPC), 1-click undo for posts and pages, 30-day activity log with CSV export, and a multisite network overview with a network-wide emergency stop
Pro1One-tap phone approval links (no login needed), Slack, Discord and multi-recipient email alerts, WooCommerce store money rules with two-person approval for large refunds, per-agent rate limits and auto-pause on error spikes, 7-day learning mode with rule suggestions, 1-click undo for site settings, users and WooCommerce orders, products and coupons, and up to 365 days of activity log history
Business5Everything in Pro on up to 5 sites
AgencyUnlimitedEverything in Pro on unlimited sites, plus white-label agency branding, client approval routing, monthly client activity reports (print/PDF and scheduled monthly email), portable JSON rule templates, and multisite network tools to copy shared rules across sites and review network-wide waiting actions and activity
The Overview screen shows your emergency stop switch, waiting approvals, active agents, 24-hour call counts, active preset rules, and the latest agent activity.

Installation & setup

Requirements: WordPress 6.9 or newer and PHP 7.4 or newer. WooCommerce is optional; when active, Agent Firewall automatically guards WooCommerce REST routes, store areas, and store money rules.

  1. Free version: In WordPress, go to Plugins → Add New Plugin, search for Persjay AI Agent Firewall, and click Install Now → Activate.
  2. Pro, Business or Agency: Download the paid plugin ZIP from your Freemius purchase email or account page. Go to Plugins → Add New Plugin → Upload Plugin, upload the ZIP, activate it, and enter your license key when prompted.

60-second setup wizard

Right after activation (or anytime via Run setup again on the Overview screen), Agent Firewall asks three quick questions to build your initial ruleset:

  • 1. What kind of site is this? Choose Blog or business site, Online store (WooCommerce) (treats orders and coupons as high risk), or Membership or community site (treats comments and custom endpoints with tighter defaults).
  • 2. Which agents will connect? Pick Claude, ChatGPT, Cursor, or Something else.
  • 3. How strict should the gate be? Choose Relaxed (only dangerous actions wait), Balanced (drafts and small changes pass; live changes and dangerous actions wait), or Strict (every change waits; dangerous actions are blocked outright).
Answer three questions after activation to configure your site preset in under a minute.
Running a WordPress multisite network? Network-activate Agent Firewall, then go to Network Admin → Agent Firewall. See Multisite Network Admin.

Connecting & watching agents

Open Agent Firewall → Agents to create dedicated credentials for each AI agent, choose which sign-in channels count as agents, and set per-agent permissions.

Connect an agent

Give each agent its own connection name (such as Claude on my laptop), pick a WordPress user you are allowed to edit for it to act as, and click Create connection. Agent Firewall generates a WordPress Application Password and displays it once so you can copy it into your MCP server or agent tool. Agents that already authenticate with an existing Application Password appear in your agents list automatically on their first call.

WordPress capabilities still apply first. An agent that signs in as an Editor can never touch plugins, users, or site settings, regardless of your Agent Firewall rules.

How agents connect (watched channels)

Not every AI tool uses a dedicated Application Password — some connect through Jetpack, a WooCommerce consumer key, an OAuth/JWT token, Basic Auth, or XML-RPC. Without Agent Firewall watching those channels, requests look like the site owner at the keyboard and bypass every rule. In the How agents connect table, you can see activity for every channel and toggle which ones Agent Firewall watches:

  • Application password and WP-CLI (wp mcp-adapter serve) are always watched.
  • WordPress.com and Jetpack: Watches agents connected through WordPress.com (such as its MCP connector). Edits made from the WordPress.com dashboard or Jetpack mobile app use this same connection and follow your rules too.
  • WooCommerce REST API keys: Watches apps and agents signing in with a ck_… consumer key. If you use a trusted shipping or accounting integration, keep this channel watched and set that specific key’s agent row to Trusted.
  • Bearer tokens (OAuth and JWT plugins), Passwords sent over the REST API (Basic Auth), and XML-RPC logins are watched by default. If you switch any channel off, Agent Firewall still counts how many calls passed through it over the past 7 days so you can spot unexpected traffic.

Rules for individual agents

In the Your agents table, you can rename any agent, see when it was last active, Pause or Revoke its connection (revoking deletes its Application Password immediately), or override how Agent Firewall treats it:

  • Follow site rules: Uses the preset and area rules from the Rules screen.
  • Read only: Lets read requests pass and blocks every write from this agent.
  • Hold every change: Queues every write from this agent for your approval, even low-risk drafts.
  • Trusted: let changes through (still logged): Lets the agent’s writes pass without waiting (except permanently blocked areas — Agent Firewall itself, plugins, themes, users and roles — and site settings, which always wait for approval) while still recording every call and undo snapshot in the Activity log.
Create per-agent connections and control which authentication channels Agent Firewall watches.

Approvals & diff previews

When an agent attempts a change that requires your approval, Agent Firewall intercepts the call before WordPress executes it, saves the replayable request (including media uploads up to 25 MB), and returns HTTP 409 Conflict (error code pjaf_held) with the request ID. The response tells the agent that its request is queued for human review and instructs it not to retry.

Reviewing pending changes

Open Agent Firewall → Approvals to review waiting requests. The page polls automatically in the background — new requests appear on their own without refreshing, and you can click Notify me on this computer to get a browser notification whenever an agent is waiting.

Each request card shows the risk badge (Low, Medium, or High), the agent name, the channel and route, and a Field / Now / After approval diff table comparing the current value on your site against what the agent wants to write.

Review exact field-by-field changes before approving or rejecting an agent’s request.

Stale-edit conflict protection

When Agent Firewall holds a request, it records a fingerprint of the target post, product, order, user, or option. If a human or another process edits that item while the request is waiting, Agent Firewall refreshes the Now column and warns you: “This changed after the agent asked. ‘Now’ shows the current value.” Clicking Approve asks you to confirm before overwriting the newer content (Approve anyway).

How agents collect the result

When you click Approve, Agent Firewall replays the request as the agent’s user and saves the response (up to 256 KB). Agents can check the status of a held request (pending, approved, rejected, or expired after 7 days) and retrieve its output over the connection they already use by calling the persjay-ai-agent-firewall/get-request ability or GET /wp-json/persjay-ai-agent-firewall/v1/requests/<id>.

Presets, rules & abilities

Open Agent Firewall → Rules to change your site preset, override individual action areas, control WordPress Abilities, and configure rate limits.

How presets classify risk

Agent Firewall classifies every write into one of 18 areas and assigns a base risk to creating, updating, and deleting items. Your strictness preset maps that risk to a decision:

StrictnessLow risk (e.g. new draft, media upload)Medium risk (e.g. editing a live post or product)High risk (e.g. deleting content, users, settings, refunds)
RelaxedPassesPassesWaits for approval
BalancedPassesWaits for approvalWaits for approval
StrictWaits for approvalWaits for approvalBlocked outright

Overriding action areas & WordPress Abilities

In What agents can change, you can override any of the 18 areas (Posts and pages, Media library, Comments, Categories and tags, Menus, widgets and site design, Users and roles, Site settings, Plugins and themes, the six Store areas, Batched requests, Other MCP tools, Abilities, and Everything else) to Use preset, Always allow, Wait for my approval, or Always block.

Below that, the Abilities table lists every ability registered with the WordPress Abilities API (core, WooCommerce, and third-party plugins) so you can set a rule for any specific ability. Read-only abilities always pass.

Combine a site-wide preset with per-area and per-ability overrides on the Rules screen.
Built-in self-protection & locked areas: Agents can never change Agent Firewall’s own settings or database tables, install, update or remove plugins and themes, create or change user accounts and roles, set passwords, or create application passwords — even if an area rule or agent mode says otherwise. Changes to Site settings (including WooCommerce store settings, payment gateways, and webhooks) always wait for your approval, even for Trusted agents and during Learning mode.

Activity log & 1-click undo

Open Agent Firewall → Activity log to inspect every action agents have attempted on your site. Filter by agent, outcome (Allowed, Waiting, Approved, Rejected, Blocked, Rate-limited, Stopped, Paused, Learned, Undone), or tick Changes only to hide read calls. Click Export CSV to download the filtered log for auditing.

1-click Undo

Before an allowed or approved write runs, Agent Firewall saves a snapshot of the item being changed. If an agent makes an unwanted change, click Undo on that row in the Activity log:

  • Free: Reverts created, updated, or deleted posts, pages, and custom post types (trashing newly created items and restoring previous titles, content, statuses, and post meta). If someone edited the post after the agent, Agent Firewall warns you before reverting (Undo anyway).
  • Pro, Business & Agency Pro: Extends 1-click Undo to site options (Site settings), user profile fields, and WooCommerce orders, products, variations, and coupons, and lets you keep activity logs for up to 365 days (compared to 30 days in Free).
Filter every agent call, export to CSV, or revert an allowed change in one click.

One-tap phone approvals & alerts Pro

With Pro, Business, or Agency, you can review and decide on held agent requests straight from your phone or team chat without signing in to wp-admin.

  • One-tap approval links: Every approval email includes a signed link that opens a clean mobile review page showing the agent name, action summary, before/after diff table, and Approve / Reject buttons. Each recipient gets their own personal link, and links stop working as soon as the request is decided or expires.
  • Team emails, Slack & Discord: Under Rules → Alerts and one-tap approvals, add additional recipient emails, paste a Slack incoming webhook URL or Discord webhook URL, and optionally tick Alert me when an agent is blocked. Click Send a test alert to verify your setup right away.
Configure global rate limits, email notifications, one-tap approval recipients, and Slack or Discord webhooks.

Store money rules Pro

On WooCommerce stores, Rules → Store money rules checks the actual dollar and percentage amounts inside an agent’s request — catching expensive changes even if store actions would otherwise pass:

  • Refund limit per order ($) and Refund limit per day, all agents ($): Hold or block refunds that exceed your per-order cap (default: $50) or your combined daily refund cap across all agents (default: $200). A refund request with no amount specified always waits for your approval.
  • Two people must approve refunds from ($): Refunds at or above this threshold (default: $200) require two distinct people to approve before Agent Firewall runs the refund (for example, two site admins, an admin in wp-admin plus a colleague via a Slack/email one-tap link, or your agency and the client).
  • Order, price & coupon caps: Set thresholds for New orders worth more than ($) (default: $500), Price changes bigger than (%) on existing products and variations (default: 20%), Percentage coupons over (%) (default: 20%), and Fixed coupons over ($) (default: $20).
  • Fast-track small store actions: Optionally tick Let refunds, new orders, price changes and coupons under these limits pass without asking to let routine small adjustments through while keeping your preset’s protection for everything above the cap.
Set dollar and percentage caps on WooCommerce refunds, orders, price edits, and coupons.

Agent limits & learning mode Pro

Per-agent rate limits & automatic pause

Every site has default per-agent rate limits under Rules → Limits and alerts (30 changes/minute, 300 changes/hour, and 120 reads/minute). With Pro, you can also:

  • Set custom per-minute write, per-hour write, and per-minute read limits for each individual agent in the Limits per agent card on the Agents screen (leave a field blank to use the site-wide limit).
  • Automatically pause an agent that hits repeated errors or blocks (default: 10 blocked or rate-limited calls within 10 minutes). Agent Firewall switches the agent to Paused and emails you so a misconfigured prompt or loop cannot keep hammering your site.

7-day learning mode & rule suggestions

If you are setting up a new workflow and want Agent Firewall to recommend rules based on real usage, click Start learning mode on the Overview screen or open Agent Firewall → Suggestions. While learning mode runs (default: 7 days), low- and medium-risk actions pass and are recorded as Learned, while high-risk actions still wait for your approval.

As agents work, Agent Firewall builds a list of Suggested rules — recommending Always block for sensitive areas no agent needed and Always allow for low-risk areas your agents used cleanly without rejections or undos. Tick the suggestions you want and click Apply selected.

Learning mode watches what your agents actually use and recommends tighter rules you can apply in one click.

White-label, client approvals & templates Agency

The Agency plan adds white-label branding, client approval routing, and portable rule templates so you can roll out consistent AI agent governance across every client site.

  • Your brand: Under Rules → Your brand, set your agency name, square logo URL, brand colour, agency website, email footer, and custom wp-admin menu name. Clients see your brand instead of Agent Firewall on one-tap approval pages, alert emails, and monthly reports.
  • Client approvals: Under Rules → Client approvals, enter your client’s email addresses and choose Who decides (The client and us — first answer counts, Only the client, or Both the client and us — two approvals) and Which actions (Everything that waits for approval or Store actions only).
  • Rule templates: Under Rules → Rule templates, export your preset and rules, rate limits, watched connections, email/log preferences, and white-label brand as a JSON template file, and import it on any other client site.
White-label Agent Firewall with your agency’s brand and move your standard ruleset between client sites with JSON templates.
Rule templates never export connected agents, activity logs, webhook URLs, or recipient email addresses, so you can safely share templates across different client sites.

Monthly client reports Agency

Open Agent Firewall → Reports to generate a client-ready summary for any month — showing total agent calls, changes made, actions sent for approval, actions stopped, and actions undone, plus a per-agent breakdown table and an itemised list of what changed and what was stopped.

Click Print or save as PDF to save a clean copy with your agency branding, or enter recipient addresses under Monthly email to send the branded report automatically on the 1st of every month.

Print or save monthly activity reports as PDF, or schedule them to go out to clients on the 1st of each month.

Multisite Network Admin Free Agency

When Agent Firewall is network-activated on a WordPress Multisite network, go to Network Admin → Agent Firewall (paid licenses also activate once at the network level for all subsites). Every plan includes the network-wide Sites overview table and a single Network emergency stop button that refuses agent calls across every site in the network (site admins cannot re-enable agents until a network admin turns the network stop off).

With an Agency license, the network screen also unlocks:

  • Shared rules: Copy rules from any site to all or selected sites in the network, and optionally apply them automatically whenever a new site is created.
  • Waiting across the network: Review held requests across every site from one central table.
  • Agent activity across the network: Inspect recent agent changes across all subsites in one place.
Monitor every site in a multisite network, trigger a network-wide emergency stop, and push shared rules from one screen.

Troubleshooting

An agent keeps retrying a held action

When Agent Firewall holds an action for approval, it returns HTTP 409 (pjaf_held) with instructions to wait and check persjay-ai-agent-firewall/get-request rather than retrying. If a custom script or agent loop ignores the 409 response and keeps resending the write, lower its per-minute write limit on the Agents screen or enable automatic pause under Rules → Limits and alerts.

Approving or undoing warns that the item changed

Agent Firewall compares a fingerprint of the target post, order, product, user, or option before replaying a held action or running an undo. If someone edited that item in the meantime, Agent Firewall pauses and shows the current value so you don’t overwrite newer work by accident. Click Approve anyway or Undo anyway only if you want to replace the newer version.

An agent signed in without being stopped by my rules

Check two places: first, make sure the agent is not signing in with your own logged-in browser session (cookie + nonce requests are treated as the human at the keyboard — give browser-driving agents their own WordPress user account with a lower role). Second, open Agent Firewall → Agents → How agents connect and confirm that the authentication method the agent used (such as WooCommerce REST keys, OAuth/JWT tokens, or Basic Auth) is switched on.

What happens when I deactivate or delete Agent Firewall?

Deactivating Agent Firewall pauses protection but keeps all of your agents, rules, approval history, and activity logs intact. Deleting the plugin also keeps your data by default so you can reinstall or upgrade from Free to Pro without losing your setup. To erase all Agent Firewall tables and options upon uninstall, tick Remove all Agent Firewall data when the plugin is deleted under Rules → When Agent Firewall is deleted before deleting the plugin (or define PJTG_REMOVE_ALL_DATA as true in wp-config.php).

Still stuck? Email [email protected] or use the contact form, with your WordPress, PHP and Agent Firewall versions.