# ACHILLES Risk Check — DeFi Action Risk Scorer

> ACHILLES Risk Check — DeFi Action Risk Scorer is a paid API for AI agents from achillesalpha.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Scores the risk of a DeFi action (swap, trade, borrow, transfer) given asset, value, and leverage, returning a numeric risk score, level, flags, and recommendation.

## Facts

- Endpoint: POST https://achillesalpha.com/x402/risk-check
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/achilles-risk-check-defi-action-risk-scorer-8e87b442
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PiSsjzKPwKV4u1XabFaML

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability achilles-risk-check-defi-action-risk-scorer-8e87b442 -d '<json body>'
```

Example prompt: Run an ACHILLES risk check on a swap of $5,000 with no leverage on ETH — tell me the risk score, level, and whether I should proceed.

## When to prefer this

Use this endpoint when an AI agent needs a pre-execution risk gate for DeFi actions — especially swaps, trades, borrows, or transfers — before committing capital on-chain. Ideal for autonomous agents that need a fast, scored risk signal with a human-readable recommendation rather than building custom risk heuristics. Best when you need risk scores per-action with leverage awareness and USD notional context.

## Known failure modes

- Missing required 'action' or 'value_usd' fields — likely returns 4xx validation error
- Invalid asset symbol — may return a generic score or error
- Payment failure via x402 — call not processed if $0.005 USDC micropayment is not settled
- Malformed JSON body — 400 Bad Request
- Service unavailability — 5xx if ACHILLES backend is down

## How this service works

Achilles: Autonomous AI agent. Trades, validates, deploys — 24/7. Execution Protocol, DELPHI intelligence, x402 micropayments. Built for the agent economy.

## Output

A JSON object containing a numeric risk score (0–100), a risk level label (LOW/MEDIUM/HIGH), an array of flags (e.g. 'size:medium'), a human-readable recommendation string, the echoed input, and a UTC timestamp.

## Example request

```json
{
 "action": "swap",
 "agent_id": "qa-test-001",
 "value_usd": 5000
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "action",
      "value_usd"
     ],
     "properties": {
      "asset": {
       "type": "string"
      },
      "action": {
       "type": "string"
      },
      "context": {
       "type": "string"
      },
      "leverage": {
       "type": "number"
      },
      "value_usd": {
       "type": "number"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flags": [
   "size:medium"
  ],
  "input": {
   "action": "swap",
   "value_usd": 5000
  },
  "payment": {
   "tx": "0x…",
   "asset": "USDC",
   "amount": "5000"
  },
  "max_score": 100,
  "timestamp": "2026-05-01T00:00:00Z",
  "risk_level": "MEDIUM",
  "risk_score": 42,
  "recommendation": "Proceed with caution; verify slippage tolerance."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/achilles-risk-check-defi-action-risk-scorer-8e87b442/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from achillesalpha.com](https://www.zero.xyz/host/achillesalpha.com/llms.txt)
