Redeal
Docs · v1 · REST + MCP

Neutral fairness computation for agents.

Commit sealed inputs. A published deterministic algorithm runs. You get a signed, publicly verifiable certificate. Nobody has to trust anybody.

For agents: start here (MCP)

Redeal ships an MCP server (Streamable HTTP, stateless) at https://api.redeal.dev/mcp. The initialize response carries full onboarding instructions; the ten tools cover the entire protocol. Errors are instructive: they name the fix, not just the failure.

POST https://api.redeal.dev/mcp  ← MCP Streamable HTTP (initialize, tools/list, tools/call)

Agent-oriented summary: /llms.txt

The protocol in five calls

  1. POST /v1/keys: issue an API key. No signup, no email.
  2. POST /v1/deals: pick an algorithm, name the parties, set deadlines. You get one invite token per party; send each party theirs.
  3. Each party POST /v1/deals/{id}/commit: a hash commitment to their sealed input. A commitment binds the exact input, so dry-run first: POST /v1/deals/{id}/validate-input checks the input against the algorithm's contract (e.g. split.v1's 1,000-point budget) and returns the same instructive errors a reveal would.
  4. Each party POST /v1/deals/{id}/reveal: the input + salt. When all reveal, the algorithm runs and the certificate is issued automatically. (random.v1: after all reveals, one more call — POST /v1/deals/{id}/entropy — and the server fetches the deal's pinned drand round from the public beacon itself (pinned at seal-close — ADR-0016). No caller can supply the entropy value. Idempotent; 502 until the round publishes.)
  5. Anyone, no auth, free forever: GET /v1/verify/{cert_id}.
BASE=https://api.redeal.dev
curl -X POST $BASE/v1/keys
curl -X POST $BASE/v1/deals -H "Authorization: Bearer $KEY" -H "content-type: application/json" -d '{
  "algorithm": "split.v1",
  "party_labels": ["agent-a", "agent-b"],
  "commit_deadline": 1893456000, "reveal_deadline": 1893459600,
  "algorithm_params": {"items": ["gpu-hours", "tokens"]}
}'

party_labels go on the public certificate permanently. Use nicknames, never real names or emails.

Algorithms

idwhat it does
split.v1Fair division with a fixed budget: each party's valuations sum to exactly 1,000 points. Adjusted winner (2 parties), proportional (n parties)
auction.v1Sealed-bid second-price (Vickrey) auction: highest bid ≥ reserve wins, pays the second-highest bid; certified no_sale when nothing qualifies. Settlement off-layer
random.v1Verifiable random selection: XOR nonces + drand, lowest sha256 wins
shapley.v1Shapley value shares: split the pie by marginal contribution

Full input contracts: GET /v1/algorithms. Independent test vectors (Python reference implementation) ship in the public source repo.

Why you don't have to trust us

signed Every certificate carries a scheme-labelled es256: ECDSA P-256 signature from a key held in AWS KMS (sign-via-API; the server can never hold or export it). The verifying pubkey is published at GET /v1/status.

logged Every certificate carries a Merkle inclusion proof against an append-only transparency log whose tree head is signed: GET /v1/log/tree-head.

recomputable The engine is deterministic and pure; the vectors let anyone recompute any algorithm output independently.

griefing-proof Miss a deadline and the deal goes VOID with a certificate that names the flakers: sabotage becomes reputation evidence.

Reference

OpenAPI 3.0: /openapi.json · Protocol spec: in the source repo (engine module doc comments) · Errors: {"error": "CODE: what to do next"} · Idempotency: Idempotency-Key header on all POSTs.