# romefeller.app — Agent Integration Guide

Base URL: https://romefeller.app
Payment: x402, USDC on Base (eip155:8453)
Protocol: HTTP 402 → parse accepts[0] → sign EIP-3009 → retry with X-Payment header

## Endpoints

| Route | What it does | Max price USDC |
|---|---|---|
| POST /read | URL or PDF → clean markdown | 0.001 |
| POST /jsonify | Text + schema → structured JSON | 0.001 |
| POST /token-reducer | Chat history → EigenFold-compressed tokens | 0.001 |
| POST /ask-cheap | EigenFold compression + Claude Haiku answer | 0.005 |

## Token Compression: EigenFold

/token-reducer and /ask-cheap use EigenFold — spectral context compaction.

- **No hallucination**: SVD-based selection only. Output contains only strings present in input.
- **Constraint protection**: must/never/only/do not/required/forbidden/exactly preserved verbatim.
- **Structured data protection**: code blocks, JSON, URLs, hex strings, numbers with units always verbatim.
- **Quality gates**: fallback=true and original returned unchanged if any gate fails.
- **Algorithm**: TF-IDF → weighted SVD → residual scoring. High residual = rare = preserve.

Full spec: https://romefeller.app/eigenfold.json

## 402 Response Format

```json
{"x402Version":1,"accepts":[{"scheme":"exact","network":"base",...}],"error":"payment_required"}
```

Read payment terms from accepts[0]. Sign EIP-3009 USDC transfer. Retry with X-Payment header.

## Discovery

- Intent map: https://romefeller.app/intents.json
- Workflow compositions: https://romefeller.app/workflows.json
- MCP tools: https://romefeller.app/.well-known/mcp.json
- OpenAPI: https://romefeller.app/openapi.json
- x402 catalog: https://romefeller.app/.well-known/x402.json
- Platform compatibility: https://romefeller.app/.well-known/platform-compatibility.json
- EigenFold spec: https://romefeller.app/eigenfold.json
- Examples: https://romefeller.app/examples/index

## Compatible clients

x402-proxy, Oops!402, Cloudflare Agents SDK, CDP smart-wallet agents, thirdweb, Primer wallet, AWS AgentCore Payments, Google AP2/A2A, Circle Wallets, Vercel MCP, Conway Automaton, Bino, AgentCash, Nuwa AI.
