# Agent402 UK Tool Scaffolder

> Agent402 UK Tool Scaffolder is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Generates JS or Python pure-function boilerplate code plus an OpenAPI fragment and x402 call pattern from a natural-language description, using deterministic templates with no LLM.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/scaffold/tool
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-uk-tool-scaffolder-944fb308
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kCwoQn_oKZmwkh2qKIGfg

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 agent402-uk-tool-scaffolder-944fb308 -d '<json body>'
```

Example prompt: Scaffold a pure JavaScript function that checks a credit card number using the Luhn algorithm — give me the code, a matching OpenAPI fragment, and the x402 call pattern.

## When to prefer this

Choose this endpoint when you need a deterministic, reproducible code scaffold for a pure function (validators, codecs, math) and want to guarantee no LLM non-determinism, no network calls, and no side effects in the generated code. Prefer it over LLM-based code generators when auditability, reproducibility, and strict purity constraints matter, or when you need an OpenAPI fragment and x402 payment pattern baked in from the start.

## Known failure modes

- Description does not match any known deterministic template — returns unmatched template or error
- Unsupported language value (not 'js' or 'python') — likely 400 or validation error
- Description is too vague or ambiguous to map to a pure function — may return generic or empty scaffold
- Payment failure via x402 — call not executed if $0.001 USDC charge fails

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

Returns a JSON object containing: the generated JS or Python code for the requested pure function, a boolean validity flag, a constraints object confirming pure/no-LLM/no-network properties, and the name of the matched deterministic template used to produce the code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "language": {
   "type": "string",
   "description": "js | python"
  },
  "description": {
   "type": "string",
   "description": "What pure function to scaffold (validators/codecs only)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": "export function luhnCheck...",
  "valid": true,
  "constraints": {
   "pure": true,
   "no_llm": true,
   "no_network": true
  },
  "matched_template": "luhn"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-uk-tool-scaffolder-944fb308/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
