# Integrating Cheetah Agent Security

Three ways to call the services, from lowest to highest effort. All of them hit
the same endpoints under `https://x402.cheetahsecurity.de` and the same free
tier (10 calls/day/IP, then HTTP 402).

## 1. MCP tools (recommended for tool-using agents)

```
uvx cheetah-firewall-mcp
```

You get four tools in your catalog — `scan_prompt`, `check_url`,
`check_agent_trust`, `screen_counterparty`. No wallet needed for the free tier.
For autonomous payment past the quota, set `X402_PRIVATE_KEY` (an EVM key funded
with a little Base USDC) and the server pays per call via x402.

PyPI: https://pypi.org/project/cheetah-firewall-mcp/

## 2. Raw HTTP

`/scan` and `/url-check` have a **free tier** (10 calls/day/IP) — just call them,
no wallet needed, and you get `200` until the quota is spent:

```
# scan untrusted text before you act on it
curl -s -X POST https://x402.cheetahsecurity.de/scan \
  -H 'content-type: application/json' \
  -d '{"text":"<the untrusted content>"}'

# reputation of a link before you open it
curl -s -X POST https://x402.cheetahsecurity.de/url-check \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com"}'
```

The trust/compliance endpoints are **paid per call** (HTTP 402 on the first call —
see section 3). The parameter for both is `agent`:

```
# trust score of another agent wallet before you transact
curl -s 'https://x402.cheetahsecurity.de/trust?agent=0xABC...'

# AML/KYA screen of a counterparty before you pay it
curl -s 'https://x402.cheetahsecurity.de/screen?agent=0xABC...'
```

## 3. Paid calls (x402)

Once the free quota is spent the endpoint answers **HTTP 402** with an x402
challenge:

```json
{
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x0CEb89C3aDD0eB15Ad3ECdB09C8fEa3D5C96dCF5",
    "maxAmountRequired": "20000",
    "resource": { "url": "https://x402.cheetahsecurity.de/scan" }
  }]
}
```

Pay it with any x402 client (the pattern is: read `accepts[0]`, sign an EIP-3009
transfer authorization for the amount, resend the request with the
`PAYMENT-SIGNATURE` header). Settlement runs through the Coinbase CDP facilitator
on Base mainnet. On success you get `200` + the result.

Python sketch with the x402 SDK:

```python
from x402.clients import x402_client   # pip install x402[evm]
import httpx

client = x402_client(account=my_base_account)      # signs 402 challenges
r = client.post("https://x402.cheetahsecurity.de/scan",
                json={"text": "<untrusted content>"})
print(r.json())   # pays automatically, returns the verdict
```

## Reading the results

- `/scan`, `/url-check`, `/v1/reputation` → `verdict` + `risk_score` (0–1) + `reasons[]`.
- `/trust` → `trust_score` + band `PROCEED / CAUTION / BLOCK` + `signals[]`.
- `/screen` → `risk_score` + verdict `CLEAR / REVIEW / BLOCK` + `signals[]`
  (OFAC hit, on-chain exposure, scam/dispute list).

Every trust/screen response carries the signals that produced the score. Use
them — don't treat the verdict as ground truth, and don't publicly accuse
another agent on the strength of a probabilistic score.

## Facts

- Network: Base mainnet `eip155:8453`, asset USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.
- Pay to: `0x0CEb89C3aDD0eB15Ad3ECdB09C8fEa3D5C96dCF5` (ERC-8004 `agentId 59098`).
- Discovery: `/.well-known/x402.json`, `/openapi.json`, and
  `https://cheetahsecurity.de/fleet-registry.json`.

Experimental research project by Blackfort Technology — provided "as is", no
warranty, outputs are heuristics not advice, escrow custodies no funds. See
https://cheetahsecurity.de/#hinweise
