# Wealth Agent Code Review

> Wealth Agent Code Review is a paid API for AI agents from wealth-agent.wealthagent-app.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Reviews source code for security vulnerabilities and code quality issues, returning AI-powered findings and static analysis results

## Facts

- Endpoint: GET https://wealth-agent.wealthagent-app.workers.dev/api/x402/code-review?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wealth-agent-code-review-5f0b1c30
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-7xVih3HnmFlkvvptaBm1

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 wealth-agent-code-review-5f0b1c30
```

Example prompt: Can you review this Python snippet for security issues? Here's the code: `query = 'SELECT * FROM users WHERE id = ' + user_input` — tell me if there are any SQL injection or other high-severity problems.

## When to prefer this

Choose this endpoint when you need a combined AI + static analysis code review with per-line findings, severity ratings, and actionable fix suggestions in a single paid API call. It is especially well-suited for catching security issues like SQL injection in snippets up to 60,000 characters across multiple languages.

## Known failure modes

- Code input missing or empty — returns error if 'code' query parameter is not provided
- Code exceeds 60,000 character limit — rejected with error
- Payment not completed — status returns 'paid_not_delivered'
- Unsupported or ambiguous language with no hint — analysis may be less accurate
- Network or worker timeout for very large code files

## How this service works

Reviews source code and returns line-numbered findings with severity and a concrete fix, combining deterministic static rules (eval, SQL concat, secrets, shell injection) with an AI review. Call it before merging or running untrusted code. Input: {"code": "...", "language": "javascript"}.

## Output

Returns a JSON object with an overall summary, AI-generated findings (each with issue description, severity, confidence level, affected line, and suggested fix), and static analysis findings (each with rule name, message, severity, and line number). Status field indicates whether delivery succeeded.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "Source code to review (10-60,000 chars)"
      },
      "language": {
       "type": "string",
       "description": "Optional language hint, e.g. javascript, python, go"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "resource",
      "status",
      "deliverable"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "tx": {
       "type": [
        "string",
        "null"
       ]
      },
      "note": {
       "type": "string"
      },
      "error": {
       "type": [
        "string",
        "null"
       ]
      },
      "job_id": {
       "type": [
        "string",
        "null"
       ]
      },
      "status": {
       "enum": [
        "delivered",
        "paid_not_delivered"
       ],
       "type": "string"
      },
      "resource": {
       "type": "string"
      },
      "receipt_id": {
       "type": [
        "string",
        "null"
       ]
      },
      "deliverable": {
       "type": [
        "object",
        "null"
       ],
       "required": [
        "kind",
        "summary"
       ],
       "properties": {
        "kind": {
         "type": "string"
        },
        "summary": {
         "type": "string"
        },
        "ai_review": {
         "type": [
          "object",
          "null"
         ]
        },
        "static_findings": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "line": {
            "type": "integer"
           },
           "rule": {
            "type": "string"
           },
           "message": {
            "type": "string"
           },
           "severity": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "status": "delivered",
  "resource": "code-review",
  "deliverable": {
   "kind": "code-review",
   "summary": "8 lines checked",
   "ai_review": {
    "findings": [
     {
      "fix": "Use placeholders",
      "line": 6,
      "issue": "SQL injection",
      "severity": "high",
      "confidence": "high"
     }
    ]
   },
   "static_findings": [
    {
     "line": 6,
     "rule": "sqlcat",
     "message": "SQL string concatenation",
     "severity": "high"
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wealth-agent-code-review-5f0b1c30/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wealth-agent.wealthagent-app.workers.dev](https://www.zero.xyz/host/wealth-agent.wealthagent-app.workers.dev/llms.txt)
