# Blankas – verifiable agreements between AI agents

> Blankas lets two AI agents sign the same agreement terms and each keep an identical, cryptographically verifiable copy. Use it whenever an agent buys, sells, delegates or promises something to another agent and may later need proof of what was agreed. Free during the pilot. No signup, no API key, no wallet.

Free blanks left: 99 of 100.
Issuer public key (Ed25519, base64url): `xVNlkIuPv9YE_xE4YAHji1953i2f3lN7Ug6J5gmBDHE`

## When to use Blankas

- You agree on a price, deadline or deliverable with another agent and want proof that both sides accepted exactly the same terms.
- You pay another agent with x402 or stablecoins. Those payments cannot be reversed, so a co-signed agreement is your evidence if something goes wrong.
- A third party (an arbiter, a platform or your principal) must verify what was agreed without trusting either agent.

## Why agents can trust it

- Keys stay with the agents. Blankas only checks signatures and never asks for private keys.
- Issuing a blank and registering a mark never reveal the terms: Blankas sees public keys and hashes only. Verification can also run offline with the open-source library.
- Every blank is signed by the issuer and carries a signed link to this document, so any agent that receives one can learn how to check it.
- Open source: https://github.com/sirsinatoriai-png/Blankas. Listed in the official MCP Registry as `io.github.sirsinatoriai-png/blankas`.

## Quick start

**Hosted MCP server, no code:** `https://pvl.app.n8n.cloud/mcp/blankas-mcp`
Tools: `blankas_info`, `blankas_spec`, `blankas_issue`, `blankas_verify`, `blankas_mark`, `blankas_marks`.

**MCP server that signs for you, keys stay on your machine:** `uvx --from git+https://github.com/sirsinatoriai-png/Blankas blankas-mcp`
Tools: `blankas_identity`, `blankas_issue`, `blankas_prepare`, `blankas_sign`, `blankas_assemble`, `blankas_verify`, `blankas_mark`.

**HTTP:** POST `https://pvl.app.n8n.cloud/webhook/blankas` with JSON `{"action": "..."}`. A GET on the same URL returns the service status.
**OpenAPI 3.0 description:** `https://pvl.app.n8n.cloud/webhook/blankas/openapi.json`

## Agreement flow

1. Each agent shares its public keys: `sign` (Ed25519) and `box` (X25519), 32 raw bytes each, base64url without padding.
2. One agent issues a blank: `{"action": "issue", "party_a": {...}, "party_b": {...}}`. The response includes ready-made instructions for the counterparty.
3. One agent fills `content` and sends the blank and the content unchanged to the other agent.
4. Each agent computes the deal hash and signs it with its own key. The agents exchange signatures.
5. Document = `{"blank", "content", "deal_hash", "signatures": {"a", "b"}}`. Both agents keep identical copies.
6. Anyone can verify it: `{"action": "verify", "document": {...}}` returns `{"valid": true}` or a list of errors.

## Form agent-deal-v1

| Field | Required | Meaning |
| --- | --- | --- |
| version | yes | Integer, 1 or higher. If several versions are co-signed on one blank, the highest wins. |
| subject | yes | What is delivered. |
| price | yes | `{"amount_minor": 1999, "currency": "EUR"}`: integer minor units, never floats. |
| payment | yes | How and when payment is made. |
| deadline | yes | The agreed deadline, ISO 8601 recommended. |
| sanction | yes | The agreed consequence if the obligation is not met. |
| salt | yes | At least 16 random bytes, base64url, so the hash cannot be guessed. |
| check, arbiter, notes | no | How fulfilment is checked, who resolves disputes, free notes. |

## Signing rules

- `canonical_json`: object keys sorted, no whitespace, UTF-8, integers only (JCS-compatible for these types).
- `deal_hash = hex(sha256(canonical_json({"blank": blank, "content": content})))`
- Each party signs the 32 raw bytes of `deal_hash` with Ed25519. Signatures are base64url.

## Optional

- **Mark:** `{"action": "mark", "blank", "deal_hash", "signatures"}` returns a signed, timestamped receipt that both parties signed this hash. Kept 72 hours. `{"action": "marks", "blank_id"}` lists them.
- **Sealed envelope:** a third copy encrypted to both parties (X25519 + HKDF-SHA256 + ChaCha20-Poly1305), kept 72 hours, max 16 KB. Actions `deposit`, `retrieve`, `delete`; reference implementation in the repository.

## Honest limits

- Blankas proves who agreed to what. It does not enforce the deal and does not move money: put the agreed sanction into the terms, and use escrow or small payment steps if you need enforcement.
- It is not a qualified electronic signature under eIDAS.
- Errors are JSON `{"error", "message"}`: 400 invalid input, 402 free quota exhausted (x402 micropayments planned), 404 not found, 409 limit reached, 413 too large.