# Shield

How Shield screens every purchase with versioned block and review rules and a local prompt-injection classifier, and why it only flags while the policy engine decides.

<ShortProductTruth>**Agents read untrusted text. Shield reads it too.** Every purchase is screened by fixed rules and a local prompt-injection classifier; a block becomes a denial, a review becomes a request for a person.</ShortProductTruth>


## The problem it removes [#the-problem-it-removes]

An agent reads web pages, merchant descriptions and tool output written by strangers. One sentence in that text can tell it to buy something else, from someone else. Abazi Shield looks at the same text and the same merchant before money moves, and flags what looks manipulated or unusual, so a person sees it or it never happens.

## Who uses it [#who-uses-it]

| Who | How |
| --- | --- |
| Owners and risk | Read risk events: which rule fired, on which purchase, with the classifier score. |
| Approvers | Decide purchases that Shield sent for review. |
| Merchants | Have their service descriptions scanned when they save them. |

## How it works [#how-it-works]

Shield runs once per purchase, before the policy decision. It sees the merchant, its tier, domain and payout address, the amount, the last price paid for the service, the agent's recent purchase rate, and three texts: the merchant's 402 description, the Catalog description and the agent's stated purpose.

| Rule | Kind | Fires when |
| --- | --- | --- |
| Block list | block | The merchant, payout address or domain is on a block list. |
| Payout address changed | block | The live 402 pays a different address than the Catalog. |
| Prompt injection | block | Any of the three texts scores at or above 0.90. |
| Price jump | review | The price is more than 50 percent above the last price paid for the service. |
| Velocity | review | The agent makes more than 5 purchases in a minute. |
| First purchase | review | The organization's first purchase at a KNOWN merchant, above the auto-approve limit. |

**The classifier.** Meta's Llama Prompt Guard 2 (22M parameters) runs on CPU inside Abazi. It flags; it never decides. Text is split into sentences and the highest score wins, so an injection hidden among normal sentences is not diluted. Until the model has loaded, a deterministic fallback scorer keeps the injection rule in force.

Rules are versioned and never edited in place. Each purchase records the rules version and the classifier version it was screened with.

## Screens [#screens]

<Screenshot id="console-risk" />

## Boundaries [#boundaries]

| Flag | What the policy engine does |
| --- | --- |
| Any block flag | DENY, for example <ReasonCode code="INJECTION_FLAG" />, <ReasonCode code="MERCHANT_BLOCKED" /> or <ReasonCode code="PAYTO_CHANGED" />. An approval cannot undo it. |
| Any review flag | REQUIRE APPROVAL, for example <ReasonCode code="PRICE_JUMP" />, <ReasonCode code="VELOCITY" /> or <ReasonCode code="FIRST_PURCHASE" />. An approver can let it through. |

No model output is ever the decision. Shield's flags are inputs the policy engine reads at fixed steps of its [evaluation order](/docs/concepts/mandates-and-policy). A classifier can miss an injection or flag an honest sentence; the mandate's caps and budgets still apply either way.

## API [#api]

The Risk operations in the API reference, each with its parameters, responses and code samples:

<ApiOperationList ids={['listMerchantRules', 'blockMerchant', 'unblockMerchant', 'allowMerchant', 'unallowMerchant', 'listRiskEvents', 'getRiskEvent']} />

## Next steps [#next-steps]

<Cards>
  <Card title="Security model" href="/docs/concepts/security-model" description="See which layer stops which attack, and what none of them can stop." />
  <Card title="Mandates and policy" href="/docs/concepts/mandates-and-policy" description="Find where Shield's flags enter the evaluation order." />
  <Card title="Approvals" href="/docs/concepts/approvals" description="Learn how a reviewed purchase reaches a person and what they see." />
</Cards>

