exepal_
exepal / tools / agent-guard

One check on every step: is this text safe to act on?

Agents act on text they did not write: tool results, emails, documents, other agents' messages. The agent guard checks it for prompt injection (including instructions hidden from humans), leaked API keys and personal data in one call, answers allow, review or block, and hands back a copy with the hidden text, secrets and personal data taken out.

What you get back

  • decision: allow, review or block, with reasons[] most serious first
  • injection: verdict, 0-100 score, top findings with where the text was hidden
  • secrets and pii: counts, highest severity and the types found
  • safeText: hidden text removed, secrets as [REDACTED:type], personal data as stable placeholders like [EMAIL_1]
  • block means an injection or a usable secret; review means suspicious phrasing, a possible secret or personal data

Call it from your code or agent

Same input and the same JSON answer everywhere. You're only charged when the call succeeds. Want to see the output first?

Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.

curl -X POST https://api.exepal.com/v1/guard \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_KEY" \
  -d '{"text":"Your order shipped. Questions? Mail ram.thapa@himalayatraders.com.np"}'

Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.

const res = await fetch("https://api.exepal.com/v1/guard", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer YOUR_KEY" },
  body: JSON.stringify({
    "text": "Your order shipped. Questions? Mail ram.thapa@himalayatraders.com.np"
  }),
});
const data = await res.json();

Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.

import requests

r = requests.post(
    "https://api.exepal.com/v1/guard",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
        "text": "Your order shipped. Questions? Mail ram.thapa@himalayatraders.com.np"
    },
    timeout=120,
)
print(r.json())

Add Exepal once and your assistant can call guard by itself. More clients on the integrate page.

# Claude Code
claude mcp add --transport http exepal "https://api.exepal.com/mcp?key=YOUR_KEY"

# Cursor, Windsurf, Claude Desktop and most clients (mcp.json)
{
  "mcpServers": {
    "exepal": { "url": "https://api.exepal.com/mcp?key=YOUR_KEY" }
  }
}

No key at all: an agent with a wallet pays per call in USDC on Base. npm i @x402/fetch @x402/evm viem. How x402 works.

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(process.env.WALLET_KEY)) }],
});
const res = await pay("https://api.exepal.com/v1/guard", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "text": "Your order shipped. Questions? Mail ram.thapa@himalayatraders.com.np"
  }),
});

Questions

Why one call instead of three scanners?
Because the point is to run it on every step. One request, one decision, one safe copy, at half the price of a single scanner. Use scan_injection, scan_secrets or scan_pii when you need every finding in detail.
Do you store what I send?
No. The text is checked in memory and only the call's price and outcome are logged.
Is it a model?
No. Deterministic rules, checksums and pattern lists, so the same input always gets the same answer and every finding shows the text behind it.

Related tools