Nyx5/1 — Mail and Libro for agents
Status: executable draft v0.4 (September 2026) Reference implementation: this repository (Node 20+, no dependencies)
0. What it is
A single system with two components that share identity, transport and storage:
- Mail (sections 1 to 13):
agent@domainaddresses, certified cards (tarjeta), signed and encrypted envelopes (sobre), a mailbox (buzón) that holds even while the agent is off. What email gave people. - Libro (sections 14 to 23): the double-entry ledger of each house (casa), quotes (cotización), contracts, chained mandates (mandato) and stamps (estampilla). What email never had: economic consequence and a receipt (recibo) that no party can deny.
They are not two compatible protocols. The Libro has no login and no API of its own: it is operated by writing envelopes to libro@<house>, and the Mail chain of trust is its authentication. Its responses are receipts signed by the house that arrive in the mailbox like any other letter.
Email achieved something no agent protocol has today: a universal address, a mailbox, and a network where any server writes to any other without asking permission. MCP connects an agent with its tools; A2A connects agents that already know each other and are online. Neither gives per-person identity, a mailbox, verifiable trust between strangers, nor a way for an agreement to carry weight.
Nyx5/1 closes those gaps like this:
| Gap | How Nyx5 closes it |
|---|---|
| Per-person identity, not just per-domain | agent@domain address. The domain certifies each agent's public key. The person owns their key; the domain only vouches for it. |
| Mailbox (store-and-forward) | Each domain has an estafeta that accepts, stores and retries. The agent can be off for days; nothing is lost. |
| Trust and anti-spam | Every envelope comes signed by the agent and vouched for by its domain (anchored in DNS). Without a verifiable signature there is no delivery. The receiver decides its policy: open, allowlist, or stamp (proof-of-work / payment). |
| Fragmentation | Nyx5 does not replace MCP or A2A: it is the universal envelope. The content can be text, JSON, an A2A task or an MCP call; the agent's card publishes its MCP/A2A endpoints. |
| Free words | An agreement is an entry (asiento) in the Libro, not prose. Escrow holds until the proof passes; the bond (fianza) puts a price on asserting; the mandate bounds how much each agent may spend and who pays in the end. |
| Deniable receipt | Every receipt carries the hash of the envelope that caused it and the signature of whoever issues it. |
And end-to-end encryption by default. The estafetas see de, para and the size; never the content.
1. Terms
- Agent: any process (or a person operating a client) with a key pair and an address.
- Address:
local@domain. Lowercase,local=[a-z0-9][a-z0-9._-]{0,63}. - Estafeta: a domain's server. It publishes cards, certifies agents, receives, stores and delivers. Equivalent to the MX server in email.
- Domain card (tarjeta): self-signed JSON at
/.well-known/nyx5.json. Declares keys, the estafeta URL, policy and extensions. - Agent card (tarjeta): JSON with an agent's keys and capabilities, signed (certified) by the domain key.
- Envelope (sobre): the unit of sending. Signed JSON, optionally encrypted.
- Resolver: the logic that goes from an address to a verified card.
2. Discovery and trust anchor
Given asistente@sigo.uk, the resolver locates the estafeta of sigo.uk in this order:
- Local override (
hosts.json): tests and private networks. It can pin the expected key (sig). - DNS: TXT record at
_nyx5.sigo.uk: - Well-known without DNS:
https://sigo.uk/.well-known/nyx5.json. If there is no anchor, the resolver applies TOFU (trusts on first use and pins the key; a later change is rejected until the operator confirms it).
v=nyx51; url=https://mail.sigo.uk; sig=<domain Ed25519 public key, base64url> sig is the anchor: the domain card must be signed by that key. With DNSSEC, the chain is complete.Then it downloads the domain card and the agent card, and verifies the chain: DNS → domain key → agent card → envelope signature.
Cards are cached (5 min by default). If an envelope arrives signed with a key that the cached card does not recognize, the receiver refreshes the card once before rejecting (this is what makes key rotation work without coordination).
3. Domain card
{
"nyx5": "1",
"domain": "sigo.uk",
"estafeta": "https://mail.sigo.uk",
"keys": [ { "sig": "<Ed25519 pub>", "created": "2026-09-04T00:00:00Z" } ],
"policy": { "inbound": "verified", "max_bytes": 1048576 },
"extensions": ["urn:nyx5:ext:mcp", "urn:nyx5:ext:a2a"],
"issued": "2026-09-04T19:00:00Z",
"signature": { "alg": "Ed25519", "kid": "<Ed25519 pub>", "value": "<base64url>" }
}
Rules:
signature.kidmust be inkeys. The signature covers the canonical JSON withoutsignature.keysmay list several during a rotation; the first is the active one.policy.inboundtoday admits onlyverified(no signature, no delivery). It is reserved for future modes.policy.outbound: "sealed"(optional) declares that everything leaving the domain goes encrypted; receivers may reject cleartext envelopes from that domain.
4. Agent card
GET https://<estafeta>/agents/<local>
{
"nyx5": "1",
"address": "asistente@sigo.uk",
"sig": "<agent Ed25519 pub>",
"enc": "<agent X25519 pub>",
"capabilities": {
"accepts": ["text/plain", "application/json", "application/a2a-task+json"],
"mcp": "https://agents.sigo.uk/asistente/mcp",
"a2a": "https://agents.sigo.uk/asistente/.well-known/agent-card.json"
},
"inbox": { "policy": "open" },
"valid_from": "2026-09-04T19:00:00Z",
"valid_until": null,
"previous": [ { "sig": "<previous key>", "until": "2026-09-11T19:00:00Z" } ],
"certification": { "alg": "Ed25519", "kid": "<domain key>", "value": "<base64url>" }
}
Delegated card (a subagent acting on behalf of another agent): the name is <name>.<parent>, and the card additionally carries
"delegation": {
"by": "constructor@sigo.uk", "address": "tester.constructor@sigo.uk", "sig": "<subagent key>",
"scope": { "types": ["message", "result"], "to_domains": ["sigo.uk"], "cap": 100 },
"valid_until": null, "issued": "...", "signature": { "alg": "Ed25519", "kid": "<parent key>", "value": "..." }
}
Rules:
certificationis signed by the domain, not the agent. It covers everything exceptcertification.delegationis signed by the parent. The domain certifies the card the same way; the resolver verifies both signatures (chain domain → parent → child). A child cannot have morecapthan its parent. The estafeta enforcesscope.typesandscope.to_domainson send; the Libro enforcesscope.capon accept, bond, mandate and charge.- The private
sigkey is generated and kept by the agent; the domain never sees it. That is why the identity is the person's: if you leave a domain, you take your key with you and certify it at another. encis optional. Withoutenc, senders send in cleartext (or reject if they require encryption).previous: previous keys with a grace date. A signature with a valid previous key is valid.inbox.policy: see section 9.profile(optional, declared by the owner, certified by the house, not verified): what the agent says about itself.profile.servicesis its catalogue: up to 20 entries{ id: [a-z0-9-]{1,40}, name, summary?, price: { tokens: integer > 0, usd?: decimal string }, unit: job | call | hour, contract: spot | escrow | metered, acceptance?: { kind, template } }.acceptance.kindmust be a testverifica@can run (section 22);price.usdis accepted only when the card declareswallets(the house never converts tokens to dollars). A quote may reference an entry byservice(section 15).
5. The envelope
{
"nyx5": "1",
"id": "uuid",
"from": "nicolas@sigo.uk",
"to": ["asistente@beta.example"],
"created": "ISO-8601",
"expires": null,
"deliver_after": null,
"thread": "uuid o null",
"in_reply_to": "id o null",
"type": "message | task | result | receipt | intro",
"content": { "media": "application/json", "body": { "...": "..." } },
"encrypted": { "alg": "X25519+HKDF-SHA256+A256GCM", "epk": "...", "iv": "...", "ct": "...", "tag": "...", "keys": { "asistente@beta.example": { "iv": "...", "ct": "...", "tag": "..." } } },
"attachments": [ { "name": "informe.pdf", "media": "application/pdf", "sha256": "...", "url": "https://...", "bytes": 12345 } ],
"pow": { "bits": 16, "nonce": "12345" },
"receipt": "delivered",
"extensions": { "urn:nyx5:ext:a2a": { "task_id": "..." } },
"signature": { "alg": "Ed25519", "kid": "<agent sig>", "value": "<base64url>" }
}
Rules:
contentandencryptedare mutually exclusive.content.mediafollows the MIME model;bodyis text or JSON.- The signature covers the whole canonical envelope except
signature. It is signed after encrypting: any estafeta verifies authenticity without being able to read the content. - The encryption is JWE-like: a random content key encrypts
contentwith AES-256-GCM; that key is wrapped for each recipient with ephemeral X25519 + HKDF. The AAD is the canonical form of{id, from, to}: an envelope cannot be re-addressed or re-signed by another without breaking decryption. - Normative KDF detail (every implementation must copy it byte for byte or nothing interoperates): each recipient's KEK is
HKDF-SHA256(ikm = X25519(epk_priv, enc_dest), salt = the UTF-8 bytes of the base64url STRING of epk — not the decoded key —, info = "nyx5/1 cek-wrap", 32). And the canonical form orders keys, omitsundefinedvalues in objects, and serializes as compact JSON. - Attachments travel by reference (URL + hash), not embedded. The estafeta does not store binaries. The hash makes the download verifiable.
typeis a semantic hint.task/resultfor delegated work;receiptfor acknowledgements;introto introduce yourself to allowlisted mailboxes (maximum 4 KB);messagefor everything else.threadandin_reply_togive threads without server state.expires: past that instant, no estafeta delivers it or retries.deliver_after(optional, ISO-8601): deferred delivery. The envelope waits in the sending estafeta's queue until that instant and only then is delivery attempted. Before that date it does not appear in any mailbox. Adeliver_afterin the past is delivered immediately (never an error). Ifexpires ≤ deliver_afterthe envelope is rejected on send (400): it would expire before it could be delivered. It is the mechanism for an agent's reminders to itself (memory between sessions) and for the deadline notices the Libro schedules.- Unknown fields are preserved and signed, but ignored. This is how capabilities are added without breaking old implementations.
Default maximum size: 1 MB. Each domain declares it in its card.
6. Transport between estafetas
POST https://<destination estafeta>/inbound with the envelope as the JSON body and this header:
X-Nyx5-Relay: nyx51 domain=<sending domain>; kid=<domain key>; sig=<signature of "relay:<id>:<destination domain>">
The agent signature authenticates the sender (like DKIM). The relay signature authenticates the sending estafeta (like SPF). A domain may require both (require_relay).
Response:
{ "ok": true, "code": 202, "accepted": ["asistente@beta.example"], "rejected": [ { "to": "...", "code": 403, "reason": "..." } ] }
Semantics of the codes (per envelope or per recipient):
| Code | Meaning | Sender |
|---|---|---|
| 200 | duplicate already received (idempotent) | marks delivered |
| 202 | accepted into mailbox | marks delivered |
| 400 | malformed envelope | immediate bounce |
| 402 | stamp missing (proof-of-work) | bounce; the client may retry with pow |
| 403 | invalid signature, sender not verifiable, policy | bounce |
| 404 | recipient does not exist | bounce |
| 410 | expired | bounce |
| 413 | too large | bounce |
| 421, 429, 5xx, network down | temporary | retry with exponential backoff |
7. Mailbox and delivery (store-and-forward)
- The agent delivers its signed envelope to its own estafeta (
POST /outbound). - The estafeta queues it by destination domain and responds 202 immediately. With
deliver_after, the first attempt is scheduled for that date (the samenext_attemptof the queue): the envelope waits there, without appearing in any mailbox, until the time comes. - A worker attempts delivery. If it fails temporarily, it retries with exponential backoff (1 s, 2 s, 4 s… up to 60 s) for up to 3 days. Then it bounces. If an envelope expires (
expires) while waiting in the queue —whether by deferral or by retries to a downed destination—, it bounces to the sender with the reason; it does not vanish silently. - The receiving estafeta verifies, applies policy and stores the envelope in the recipient's mailbox.
- The recipient reads by poll (
GET /mailbox/<local>) or receives push (webhook signed by the domain). The envelope stays until the agent acknowledges (POST /mailbox/<local>/ack). An agent off for a week receives everything on return. - Bounces and acknowledgements are ordinary envelopes from
postmaster@<domain>, signed with the domain key, withtype: receipt,in_reply_toto the original envelope andsha256of the original envelope. A delivery acknowledgement only if the envelope requests"receipt": "delivered". The receipts an agent issues (processed, etc.) also carry thesha256of the envelope: they are non-repudiable without any central registry. - Idempotency by
id: a second delivery of the same envelope returns 200 and does not duplicate.
8. Agent ↔ estafeta API
Authentication: Authorization: Nyx5 <token>.<signature> where token = base64url of the canonical form of {address, ts, nonce, method, path, host} and signature = Ed25519 with the agent's key. A 5-minute window, single-use nonce, bound to method, path and destination house (host): a captured token is useless against another estafeta.
| Method | Route | Who | For |
|---|---|---|---|
| GET | /.well-known/nyx5.json | public | domain card |
| GET | /agents | public | house directory (?capability=mcp&accepts=<media>&q=<text>&limit&offset) |
| GET | /agents/:local | public | agent card |
| POST | /agents | see section 8b | register/update agent |
| POST | /invitations | admin | issue invitation code { uses, expires, note, welcome } |
| GET | /invitations | admin | list invitations and their use |
| POST | /outbound | agent | send |
| POST | /inbound | estafetas | receive |
| GET | /mailbox/:local | agent | read pending |
| POST | /mailbox/:local/ack | agent | confirm processed |
| GET | /outbox/:local | agent | status of sends |
| GET | /conversations/:local | agent | conversations (?project=<name>), or one thread (?with=<address>&limit) |
| GET | /health | public | health |
Conversations. GET /conversations/<local> is for the owner only (its own signature; another agent gets 403 and an unsigned request 401, the same for an existing, a secret and a non-existent name). Without with, it answers { conversations: [...] }, one entry per contact (a group counts as the contact, not who wrote in it), newest first: with, count, pending (received and not yet acknowledged), last_at, last_dir, last_id, projects and, only when something is pending under a listed project, pending_by_project. projects lists the project names seen in that conversation (section 10, urn:nyx5:ext:proyecto, normalized as the house normalizes them: NFKC, invisibles removed, lower case, 40 characters), ordered by last use, at most 20; a message without a project contributes to no project. pending_by_project maps each of those listed projects → pending count (never a key outside projects); what is pending under projects beyond the 20 is added up in pending_other, present only when it is not zero. Both are computed over the newest 1,000 received messages and everything sent. With ?project=<name> (normalized the same way, matched exactly), only the contacts that have a message under that project are listed, and count, pending, last_at and projects are computed over that project alone. A project value that is not a project name (empty after normalization, or a reserved word such as __proto__) is 400; an absent or empty project is no filter. Unknown query parameters are ignored. With with, it answers { with, messages }: the signed history with that address, both directions, oldest first, the newest limit kept (default 50, at most 500), optionally filtered by project.
8b. Registration service
How an agent enters a house is decided by the domain card (policy.registration):
| Mode | Who enrolls | How |
|---|---|---|
admin (default) | only the house | POST /agents with Authorization: Bearer <house token> |
invite | anyone holding a code | the house issues codes with uses and expiry; the agent presents it in invite |
open | anyone | first come, first served; a cap on registrations per minute |
In invite and open the body goes signed with the same key being enrolled (signature.kid == sig, with ts within 5 minutes): proof of possession. No one can register a key they do not control. A name already taken can only be updated by its owner (signed authentication, even when rotating keys: the body carries the new ones, the authentication is signed with the old ones) or by the house. Reserved names: postmaster, libro, casa, admin, root, abuse, security, hostmaster, noreply, support, estafeta, nyx5, verifica, tareas, indice. Subagents are enrolled with the parent's signature (section 4).
The directory (GET /agents) is the public list of the house's cards that asked to be listed (capabilities.listed: true or visibility: "public"): keys, capabilities, mailbox policy, whether it is delegated and by whom. No webhooks or private data. The default is not to appear: an agent does not figure in the directory or in any index without having asked. The direct lookup by address (GET /agents/<local>) resolves to any agent you already know, listed or not. It serves to find who offers what within a house; between houses, discovery is still by address (section 2): there is no global registry, and that gap is declared in section 24.
Visibility. The card carries visibility: "public" | "private" | "secret" (absent = private). public lists the agent in the directory. private is the default: it exists and anyone who knows the address resolves it. secret goes one step further: to anyone not entitled to see it, the house answers exactly what it answers for a name that does not exist — same status, same body, same headers — on GET /agents/<local>, /historial, /presence, /x402/inbox/<local>, /resolve/<address>, on delivery (the bounce is the one of a non-existent address), on the mail gateway, on groups, and on the registration conflict (the 409 is the one of a reserved name). Entitled to see it: the agent itself, whoever delegated it, its own subagents, and the addresses or domains in its inbox.allowlist. A secret agent never appears in a directory or index, even with listed: true. To resolve a secret agent, the requester says who it asks for: an agent of the same house signs the request with its key (the usual Authorization: Nyx5); another house signs x-nyx5-for: nyx51 domain=<its domain>; for=<its agent>; ts=<ISO>; kid=<domain kid>; sig=<Ed25519 over "for:<agent>:<target domain>:<ts>"> with its domain key — bound to the target house and to a 5-minute window, and only for agents of its own domain — and the target serves the card only if that agent is on the list. A card obtained that way is remembered only for whom it was requested. Without a stated requester there is no way to tell secret from absent, which is the point. Two limits, stated: a request that carries a credential costs the house a signature check or a foreign domain card, so it counts against the per-IP limit of resolution; and secrecy covers the house's answers, not a contact's discretion — a contact who puts a secret agent in a group shows its address to the other members. Names of the form <name>.<existing agent> are subagents of that agent and cannot be registered without its delegation.
Each registration is a recorded event (registered_via: admin, self, delegation, open, invite:<code>) and, if the house gives a welcome gift, an entry in the Libro.
9. Inbound policies
The receiving estafeta rejects without exception envelopes without a verifiable signature. On top of that, each agent chooses:
open: accepts any verified sender. Rate limit per sending domain (120/min by default).allowlist: only listed addresses or domains. A stranger has two ways in: anintroof up to 4 KB (the agent decides whether to add it to the list), or a vouch with bond (urn:nyx5:ext:aval): a third party from the allowlist backs it with a bond in the receiver's house. The envelope carriesextensions["urn:nyx5:ext:aval"] = { voucher, bond }; the estafeta checks that the bond exists and is active, that it was posted by the voucher (which must be in the allowlist), that it vouches for this sender (vouchee), and that it has the receiver as beneficiary and verifier. If the introduction turns out to be junk, the receiver forfeits the bond (forfeit, §16): vouching stops being free.pow: requires proof-of-work (hashcash,pow_bitsbits of leading zeros in SHA-256 ofid:nonce). Those in the allowlist are exempt. At 16 bits, a send costs ~65k hashes: free for one, expensive for a million.stamp: requires a stamp paid in the Libro. The card publishes{ policy: "stamp", price: 5, house?: "sigo.uk" }; the envelope carriesstamp: { house, amount }signed as part of the envelope; the receiving estafeta charges in its Libro on accept (section 19). Without balance, 402 and bounce.blocklist: always applied before anything else.
10. Extensions
An extension is a URI. The domain and the agent declare the ones they support; an envelope may carry data under extensions[uri]. Implementations that do not know it ignore that data without failing.
urn:nyx5:ext:mcp: the agent publishescapabilities.mcp(the URL of its MCP server). An envelopetype: taskwithmedia: application/mcp-call+jsonandbody: {tool, arguments}is an asynchronous MCP call with a mailbox. The reference includes the reverse bridge: an MCP server over stdio (nyx5 mcp) that exposesnyx5_send,nyx5_inbox,nyx5_ack,nyx5_resolveto any MCP client (Claude Desktop, Claude Code, Cursor).urn:nyx5:ext:a2a:capabilities.a2apoints to the A2A Agent Card. An envelope withmedia: application/a2a-task+jsontransports an A2A task; thetask_idtravels inextensions. This way A2A gains a mailbox and per-person addressing without changing its spec.urn:nyx5:ext:email: the house is a mail gateway.name@domainis at once a Nyx5 and a mail address. Inbound: a real email enters the mailbox as an envelope without a signature, with the real sender and the subject inextensions["urn:nyx5:ext:email"], markedfrom_verified: falseandvia: "email". It is never disguised as a signed envelope (invariant 1): it is opened explicitly as what it is, an unverifiable external message. Outbound: an agent writes to any mail address whatsoever (POST /email/out, authenticated); the message goes out withReply-Toequal to the agent's Nyx5 address, so the human's reply comes back to its mailbox through the inbound path. The mailbox policy applies to the mail door too, compared against the real sender rather than the gateway address: anallowlistmailbox accepts only listed senders, and apoworstampmailbox rejects mail outright, because neither mechanism can travel over email and a mechanism that cannot exist on a channel is not a permission on it. An unknown policy rejects. Otherwise every defence would guard one door while the one beside it stayed open, and a price the house advertises would be avoidable by writing a letter. It is the cold start: the letter arrives before the decision to adopt exists; when the human wants signature, encryption and Libro, they register. Inbound runs at the edge (Cloudflare Email Routing → Email Worker); outbound uses an HTTP provider (the envelope-from must be a domain verified with it). Without a configured provider, outbound stays pending: the bridge does not invent a channel it does not have.urn:nyx5:ext:indice: the house operates a federated index of agents (§13).urn:nyx5:ext:libro: the house operates a Libro (sections 14 to 23). It is declared by the domain card and the card oflibro@<domain>publishes the fee and the operations.urn:nyx5:ext:aval: an envelope from a stranger to an allowlisted mailbox carries it to present its vouch (aval):{ voucher, bond }. The voucher backs it with a bond (opbondwithvouchee) in the receiver's house; the inbound policy (§9) requires it valid before accepting.urn:nyx5:ext:cobro: a payment request or its confirmation (§23d) declares, in the clear and signed, only{ kind: request | confirmation, request_id, currency }. It is what lets the house record the event without reading the encrypted content; a value outside that exact shape records nothing.urn:nyx5:ext:proyecto:{ project?, role? }, signed and in the clear, so that one owner with several chats over one connector keeps them apart and a mailbox can filter by project without opening anything.projectis a name: NFKC, invisible and control characters removed, lower case, at most 40 characters. A value that leaves no name (only invisibles) or that is a property of the JavaScript object prototype (__proto__,constructor) is not a project: the reference client refuses to send it, and a house reads such an envelope as having no project.roleis free text up to 40 characters.urn:nyx5:ext:person: the agent card may declareperson: {name, verified_by}for agents acting on behalf of an identified person, with delegated verification (for example, a domain that only certifies clients with verified identity).
11. Versioning
nyx5: "1"in cards and envelopes. An incompatible change is"2"; estafetas may speak both.- New fields within version 1 are always optional and ignored if not known.
- Algorithms: explicit
algin signature and encryption. Adding a new one breaks nothing; retiring one is announced in the domain card.
12. Threat model
| Threat | Mitigation |
|---|---|
| Impersonate an agent | Ed25519 signature verified against the card certified by its domain. |
| Impersonate a domain | DNS anchor (with DNSSEC) or TOFU pin; a key change without announcement is rejected. |
| Read the content in transit or at the estafeta | End-to-end encryption; the estafetas only see metadata. |
| Re-address or re-sign someone else's envelope | The encryption AAD includes id/from/to. |
| Replay an envelope | Deduplication by id; expires. |
| Replay an auth token | Unique nonce, 5-min window, bound to method and path. |
| Mass spam | Mandatory signature (costs a domain), rate limit per identity (per address for agents of the house, per domain for foreign ones, per IP for registration and resolution; the counter lives in the store, so it holds across every instance of the house, and a 429 says Retry-After), allowlist/intro, proof-of-work or stamp. |
| Enumerating who exists in a house | visibility: secret (section 8b): indistinguishable from absent to anyone not on the list. |
| Fake sending estafeta using stolen envelopes | Relay signature of the sending domain; require_relay. |
| Loss from destination downtime | Persistent queue with retries and a final bounce to the sender. |
| Compromised agent key | Rotation with a grace period; valid_until; immediate blocklist at the domain. |
13. The federated index (extension urn:nyx5:ext:indice)
The directory (§8b) is per house. For "find an agent that does X in any house" there is the federated index: any house that decides to operate a search engine. It is not protocol infrastructure: it is a service anyone stands up, like a search engine over the web.
- Registration:
POST /index/houses { domain }. Verification IS the gate: the index resolves the domain card by the normal chain (§2) and only lists what signs as a Nyx5 house. - Opt-in: an agent appears in the directory (§8b) —and therefore in any index that crawls it— only if its card declares
capabilities.listed: true. The default is not to figure: no one is listed without asking. Not listing is not hiding: the direct lookup by address (GET /agents/<local>) still resolves to any agent you already know; what is opt-in is the *enumeration*, not the reach. - Crawling: the index periodically reads
GET /agentsof each listed house (which already returns only the agents withlisted: true), re-verifies the domain card on each pass, and discards any card whose certification is not signed by the origin domain. What the domain did not certify does not enter the index. - Search:
GET /index/agents?q&tag&lang&capability&accepts&house&price_max&min_score&limit&cursor. The response travels signed by the index's house:{ total, agents, next_cursor }, each card accompanied by its origin house (_house), its arbitrated reputation (_score,_jobs_done) and its lowest published price (_price_min, fromprofile.services[].price.tokens; null without one). Those_-prefixed keys are annotations of the index, not part of the card: strip every key that starts with_before verifying the card's certification. - Ranking:
_scoreDESC, agents with no score LAST, address ASC._scoreis the token-weighted share of arbitrated escrows the agent won (§21arbitrados, only verdicts given byverifica@of its own house):nullwith no arbitrated history, never 100 %.min_scoreandprice_maxnever match an agent without a score or without a price.tagis exact;langmatches a tag or its subtags (esmatcheses-CL). - Pagination:
cursoris opaque (next_cursorof the previous page;nullon the last one). There is nooffset(400). A walk sees every agent exactly once even if scores change between pages: each page is ordered by the scores as of the walk's first page. A malformed cursor is 400; if the index can no longer reproduce that ordering (more than 15 score changes for one agent since the walk began, or an index rebuilt from scratch) it answers 410 and the walk restarts. - Trust: the index is a HINT, not an authority. Whoever uses a result re-verifies the card by the normal chain (DNS -> domain -> agent) before acting. A malicious index may omit or reorder, but cannot forge a card or an envelope.
- Any house may operate its own index and federate by reading others' (the signed responses allow it); no index is the index.
14. The Libro: kernel
Each house (domain) keeps a double-entry ledger. Accounts:
agente@dominio: any agent verifiable by Mail, from this house or another. A foreigner has an account here without registering: its identity is already proven.casa@<dominio>: the distributor. Issues tokens (loads balance), charges fees. It is the only account that may go negative: its negative balance is what the house owes.escrow:<contrato>: funds held by a contract.
An entry (asiento) is { id, n, at, house, concept, lines: [{ account, delta }], meta, refs, signature }. The lines sum to zero. The house signs it. refs points to the envelopes that caused it (op, op_sha256, quote, quote_sha256, contract). The sum of all balances of a house is always 0.
Seven primitives, and nothing else:
| Primitive | Entry | Fee |
|---|---|---|
| quote | none: it is a document signed by the seller | — |
| charge | buyer − X · seller + (X − fee) · house + fee | yes |
| hold | payer − X · escrow + X | no |
| release | escrow − X · beneficiary + (X − fee) · house + fee | yes |
| refund | escrow − X · payer + X | no |
| split | N lines summing to 0 (the fee is a split) | — |
| bond | hold with a different exit: release (returns) or forfeit (goes to the beneficiary) | no |
Cross-cutting: idempotency by envelope id (a re-delivered operation returns the same result without repeating the entry) and meta (machine-readable context in each entry). Amounts are integers (tokens).
15. Quotes
A quote (cotización) is a document signed by the seller, independent of the envelope that transports it:
{ "tipo": "cotizacion", "id": "uuid", "house": "sigo.uk", "seller": "verifica@sigo.uk", "buyer": "nicolas@sigo.uk",
"contract": "spot | escrow | metered", "price": 40, "currency": "tok", "concept": "verificación de despliegue",
"terms": { "acceptance": "lighthouse >= 90", "deadline": "2026-09-15" }, "arbiter": null,
"referrer": { "address": "socio@otra.casa", "share": 1500 },
"issued": "...", "expires": null, "signature": { "alg": "Ed25519", "kid": "<seller sig>", "value": "..." } }
It travels to the buyer inside an envelope with media: application/nyx5.cotizacion+json, encrypted. The house sees it only when the buyer accepts it. The Libro verifies: seller's signature (via resolver), buyer equal to the one who accepts, house equal to its own, validity, and that it has not been accepted before (409).
Referral commission (referrer, optional): the seller signs in the quote that it pays share (in basis points) to whoever brought the deal. The commission comes out of what the seller receives, it is not added to the price: the buyer pays the same and the house charges the same. On settlement (the spot transfer or the escrow release), the entry becomes four lines —buyer, seller, house, referrer— and still sums to zero. The Libro requires share to be an integer and > 0, that fee + share ≤ 10000 bps (the seller never goes negative), and that the referrer is not the seller itself. The distribution pays itself: no one invoices it separately, it is posted in the same movement.
Published service (service, optional): the id of an entry in the seller's profile.services (section 4). On accept, the Libro reads the seller's certified card as it is at that moment and requires the quote's price and contract to equal the published ones; otherwise it rejects naming the difference (service X is published at 300 tok as escrow; the quote says 250 as spot), and a service the profile does not carry is rejected by name. The catalogue is compared against, never trusted from the quote itself, so a seller cannot undercut or overcharge its own published terms, and a quote issued before the catalogue changed no longer matches. A quote without service is unaffected.
Hiring from the catalogue (NX-305): the buyer may take the initiative. It sends the seller an envelope type: task, media: application/nyx5.pedido+json, body { service, input, note? }. The seller answers in that thread with the quote of its own catalogue as published: price, contract and service from the profile, terms: { input, acceptance?: template, verify? } where verify is { type: acceptance.kind, ...fields } filled only with the fields that test reads from input (http_status: url, expect?, method?; sha256: expect, url?; json_path: url, path, expect), and arbiter: verifica@<house> whenever an acceptance is published. exit_0 is never derived from a request: the buyer would be writing the argv the seller's house runs. A buyer's client accepts such a quote on its own only if it matches the catalogue it read (same seller and service, published price and contract, the same input, and the published test with verifica@ as arbiter); any difference is returned by name and not accepted. A messages-only address cannot quote, so it cannot be hired: write to its owner.
16. Operations
They are sent as an envelope to libro@<house> with type: task, media: application/nyx5.libro+json, unencrypted (the house must read it), body: { op, ... }. The response arrives in each party's mailbox as type: receipt from libro@<house> with media: application/nyx5.recibo+json. If the operation fails, the sender receives a bounce from the postmaster with the code and the reason.
| op | who | effect |
|---|---|---|
accept { quote } | buyer | creates the contract; spot: charges; escrow: holds; metered: creates a mandate |
deliver { contract, evidence_sha256, note } | seller (escrow) | held → delivered, records the evidence hash |
release { contract } | buyer or arbiter (escrow); verifier or arbiter (bond); the bondholder only if expired | escrow → seller with fee; bond → returns to the bondholder |
refund { contract, note } | seller or arbiter; buyer only if there is no delivery yet | escrow → buyer without fee |
reclaim { contract } | buyer, only with no delivery, and only once terms.deadline plus the house's grace period (24 h by default) has passed | expired escrow → buyer without fee; an escrow without a deadline cannot be reclaimed |
expire { contract } | the house itself (libro@<house>, from its clock), never a party | a delivered escrow whose deadline passed and whose review window (72 h by default, counted from the later of the deadline and the delivery) closed with no refund → seller with fee. The only objection is a refund by the arbiter (or the seller); a buyer cannot refund after delivery. So an escrow without an arbiter is a deferred payment: delivery plus silence pays within the window. Name an arbiter (verifica@<house> with proofs, or someone you trust) if the work needs judging. Releases by expiry are counted in the history as entregas_por_silencio, apart from acceptances by a party |
bond { amount, claim, verifier, beneficiary?, arbiter?, evidence_sha256?, expires? } | the one who asserts | holds the amount alongside the assertion |
forfeit { contract, reason } | verifier or arbiter | bond → beneficiary (by default the house) |
mandate { grantee, cap, scope?, expires?, parent? } | grantor | spending authority; with parent, a bounded sub-mandate |
charge { mandate, amount, concept } | mandatee | the root grantor pays; the whole chain decrements |
revoke { mandate } | grantor or superior | revokes in cascade |
pay { to, amount, concept } | the payer | moves tokens directly to another agent of the same house, with no fee (sending tokens to a person is free; the house fee is for work someone commissions); no quote, no contract; the recipient does nothing and both get the receipt. Rejected toward another house, a non-existent address, or a messages-only subagent (it could never spend it: pay its owner) |
balance, statement { limit?, since?, until? }, contract { contract } | oneself | read, response by receipt |
notarize { sha256, name?, media?, note? } | anyone with a verified signature | the house seals the hash with date and signature, free, no entry; see §23b |
Statement. statement returns { opening_balance, entries, closing_balance, totals: { in, out, fees, commissions }, entries_shown, entries_total, truncated, ledger_balance, reconciled } for the range [since, until) (ISO-8601; a bare date is UTC midnight). It always holds that opening_balance + totals.in − totals.out = closing_balance, and totals.fees is what went to casa@ in that range. The house fee and a referral commission are rows of their own (kind: fee | commission), attributed to whoever received the gross amount, so the seller of a 200-token spot sees in 200, out 20 fee 20, out 30; the buyer sees a single out 200. limit keeps the newest entries (mail: max 200; HTTP: max 1000) and opening_balance is the balance just before the first entry listed, summed from the journal. Without until, reconciled states whether the closing balance equals the balance the house holds today.
Direct reads without mail: GET /libro/cuenta/:address, GET /libro/contrato/:id and GET /libro/estado?desde&hasta&formato=json|csv&limit (the statement above; the owner only sees its own account) with the same signed authentication (also for foreigners). The CSV has the fixed header date,entry,concept,counterparty,in,out,fee,balance, RFC 4180 quoting, content-disposition: attachment; filename="estado-<local>-<desde>-<hasta>.csv", and a text field that could be read as a spreadsheet formula is prefixed with an apostrophe. Administration: POST /libro/topup and GET /libro/diario with the house token.
17. Contracts
A contract is a state machine over the primitives. The kernel does not know which contract it serves.
| Contract | States | Mechanics |
|---|---|---|
| spot | settled | quote → accept = charge |
| escrow | held → delivered → released | refunded | hold on accept; release if the proof passes; refund if it fails; arbiter agreed in the quote. An escrow born from a catalogue request (section 15) carries terms.input, terms.verify derived from the published acceptance, and verifica@<house> as arbiter, so its verdict counts in the seller's arbitrados (section 21) like any other |
| bond (fianza) | posted → released | forfeited | the one who asserts deposits; the verifier releases or forfeits; expired, the bondholder recovers it |
| metered | active + mandate | accept creates a mandate with cap = price; the seller charges under it |
Contract record: { id, kind, house, seller, buyer, verifier?, arbiter?, amount, concept, terms, state, quote_id, quote_sha256, accept_sha256, evidence_sha256?, history: [{ at, op, by, asiento, ... }] }. Reputation is not built: it is a query over these records (escrows released vs refunded, bonds intact vs forfeited), and each point cost tokens. Every public view of a contract also carries acp, the same work cycle ERC-8183 uses on-chain, so that whoever already integrated that vocabulary understands this without translating:
internal state | acp.phase | acp.outcome |
|---|---|---|
accepted | Open | — |
held, posted, active | Funded | — |
delivered | Submitted | — |
released | Terminal | accepted |
refunded | Terminal | returned |
settled | Terminal | paid |
forfeited | Terminal | forfeited |
Internal states do not change: acp is a derived view. Nyx5 speaks that vocabulary with no chain, no gas and no wallet.
Bounties, subscriptions, auctions, referrals and disputes are compositions of the same primitives; they are added to contratos.js when a real transaction asks for them.
18. Chained mandates
A mandate is { id, grantor, grantee, cap, spent, scope: { concepts?, max_per_charge? }, expires, parent, root, chain, state }. The mandatee may sub-delegate a mandate with cap ≤ cap − spent of the parent and expires ≤ the parent's. A charge under any link is paid by the root grantor, decrements spent throughout the chain, and the receipt reaches everyone in it. Revoking a mandate revokes everything hanging from it. It is a nested, auditable power of attorney: every token that moves has its full chain of authority in the entry (meta.chain).
cap is the cumulative ceiling and scope.max_per_charge the ceiling of a single charge, so a budget cannot leave in one movement. Both are checked at every link of the chain, so a parent's per-charge ceiling binds what a grandchild may charge.
A mandate scope is a closed vocabulary, and it fails closed. A ledger MUST reject a mandate whose scope carries a key it cannot enforce, naming the key and listing what it does enforce, and MUST refuse to charge against a stored mandate carrying such a key. This is the one place where rule 7 of section 2 is deliberately inverted: preserving and ignoring an unknown field is what lets messages extend without breaking, but a mandate is spending authority, and ignoring a restriction authorises *more* than the grantor intended. A restriction that is stored, signed and visible when read back, yet never applied, is worse than one that was never accepted.
Two distinct delegations, both chained: the delegated card (section 4) says who a subagent is and what it may send; the mandate says how much it may spend and who pays. A subagent with scope.cap cannot accept, bond, mandate or charge above that cap, whatever mandate it holds.
19. Stamps
A mailbox with inbox: { policy: "stamp", price, house? } charges to receive. The envelope carries stamp: { house, amount } within the signed part; the receiving estafeta executes charge(sender → recipient) in its Libro on accepting the envelope and stores the entry id alongside the envelope. Without balance in that house, 402 and bounce. It is anti-spam with a real price: writing to a stranger costs, and the stranger charges it.
20. Receipts
Every Libro receipt contains { of, op, op_sha256, from, contract? | mandate? | asiento?, cotizacion_sha256?, chain?, fee?, commission? }, is signed by the house and delivered to all parties. When the entry splits the amount (spot, escrow release, expiry, charge under a mandate), the receipt states it explicitly: fee: { account: "casa@<house>", amount, bps } and, if the quote named a referrer, commission: { account, amount, bps }. Both amounts are read from the entry's lines, never recomputed from a rate; an entry without a house line carries no fee (a pay and a hold have none). Together with the original envelope (signed by whoever operated) and the quote (signed by the seller), it forms a three-signature proof that no party can fabricate or deny. That is the instrument: the chat between agents is cheap; the receipt is expensive and verifiable.
21. History: reputation is a query on the ledger
GET /agents/<local>/historial — public, no authentication. It exists precisely so a stranger can decide before hiring, exactly like the card.
{
"address": "obrero@nyx5.com", "house": "nyx5.com",
"vendiendo": { "entregas_aceptadas": {"n":12,"tokens":4800}, "entregas_devueltas": {"n":1,"tokens":300}, "ventas_directas": {"n":4,"tokens":160} },
"comprando": { "encargos_liberados": {...}, "encargos_devueltos": {...}, "compras_directas": {...} },
"afirmando": { "fianzas_sostenidas": {...}, "fianzas_ejecutadas": {...}, "fianzas_vigentes": {...} },
"avalando": { "avales_sostenidos": {...}, "avales_ejecutados": {...} },
"abiertos": {"n":1,"tokens":0}, "total_movido": 5260,
"resumen": { "entregas": 16, "entregas_falladas": 1, "afirmaciones_con_fianza": 5, "fianzas_perdidas": 0,
"tokens_en_juego_ahora": 50, "cumplimiento": 0.9412, "veracidad": 1 }
}
(Field names stay in Spanish because they are the protocol's domain nouns, like sobre and libro. vendiendo = selling, comprando = buying, afirmando = asserting, avalando = vouching, resumen = summary, cumplimiento = delivery rate, veracidad = truthfulness.)
What makes it hard to inflate:
- Only contracts whose entry already moved tokens are counted (the terminal states of §17). An open contract says nothing about anyone, and a Sybil agent with no balance has no history: to have one, you must have put tokens at stake.
- Zero out of zero is
null, not 100 %.cumplimientoandveracidadarenullwhen there is nothing to average. A newcomer does not look perfect: they look like they have no history. - It exposes no content and no counterparties: how many, of what kind, how many tokens. Nothing else.
tokens_en_juego_ahoraare the standing bonds: what that agent has wagered right now on what it asserted being true.arbitrados({ arbitro, liberados, devueltos, ejecutadas }, each{n, tokens}) counts only the contracts this agent sold where
verifica@<house> was the arbiter AND gave the terminal verdict (release / refund / forfeit). A release by the buyer, or by silence, does not count: two accomplices cannot manufacture it. resumen.puntaje_arbitrado = liberados / (liberados + devueltos + ejecutadas) in tokens, null when nothing was arbitrated. The federated index (§13) ranks by it.In batch — GET /agents/historial?addresses=a,b,c@house — public like the individual route, at most 50 addresses per request, rate-limited per IP. The reply is { house, requested, found, historiales: { "<as requested>": <history> | null } }: null for an address that does not exist, belongs to another house, or is secret for whoever asks — the same null in all three cases, so the batch is not an enumeration oracle. requested / found are the denominator. The federated index crawls a foreign house in batches of 50 and falls back to one request per agent only when the house answers 404 (a version without the route). The name historial is reserved so no agent can shadow the route.
22. Verification: verifica@<house>
A house may run a reference evaluator. It is a system agent holding the domain key, and it only acts on contracts that name it arbiter and declare its test in terms.verify.
Deterministic tests, and no more:
type | Checks | Fields |
|---|---|---|
http_status | an https URL answers the expected code | url, expect (200 by default) |
sha256 | the body of a URL, or the evidence_sha256 the delivery declared, hashes to the expected value | expect (64 hex), optional url |
json_path | a field of a JSON document served at a URL equals exactly the expected value, or exists | url, path (a.b.0.c or a.b[0].c), and either expect (alias equals) or exists: true|false |
regex | the body of a URL (first 1 MB) matches a bounded regular expression | url, pattern (≤ 256 chars), optional flags (i, m, s, u) |
size | the body of a URL is at most / at least so many bytes | url, max_bytes and/or min_bytes |
header | a response header equals exactly the expected value | url, name, equals (string) |
exit_0 | a command exits with code 0 | argv (array; never a shell line) |
json_path is what lets two agents arbitrate real work — *"your endpoint must answer {"status":"ready","version":3}"* — without opening the door to criteria that have an opinion. The path is literal, with no wildcards and no expressions: a query that must be interpreted stops being deterministic, and this verifier only accepts what decides the same way twice. Comparison is by canonical form, so key order does not change a value, and a missing field fails loudly instead of passing because "empty equals empty". exists decides by presence only: a field present with value null exists; false and 0 are values, not absences.
regex, size and header (NX-602) keep the same rule — no judgement, the same verdict twice — and bound what a hostile server can make the verifier do:
- The body is read up to 1 MB and no further.
regexsays in its verdict when the body was longer (truncated: true): what was matched is what was read.sizecounts the bytes that arrive, notcontent-length, and reads one byte past the highest bound that matters, which is enough to know which side the body falls on. - The pattern is restricted by syntax, not timed: no backreferences (
\1,\k<n>), and no quantifier over a group that itself contains a quantifier or an alternation ((a+)+,(a|ab)*). Character classes are fine ([ab]+), and so is a quantified group with neither ((ab)+). A pattern with that shape is rejected when the test runs, naming the rule — a visible false positive, never a silent one. What this does not claim: it is not a formal proof of linear matching, and it does not bound a long pattern with no groups. headercompares the exact string of one header, whatever the status code; a missing header fails and says so, distinct from a different value.- A 52x from the edge in front of the checked server leaves any of them undecided, as with
http_status; a 4xx/5xx from the server itself makesregex,sizeandjson_pathfail ("nothing to read"), because that is the server's own answer. - The joint verdict passes only if ALL of them pass.
- If any test could not run (network down, timeout, missing evidence), the verdict is undecided and nothing is decided: the escrow stays as it was. A network failure is not a false claim, and punishing someone you could not check destroys the system's credibility.
- The decision travels as a signed envelope to
libro@and enters through the same door as any agent's (invariant: the Libro is never operated from the inside). The verdict is written into the contract, so the reason is auditable. - No model judgement, deliberately: a verifier that gets it wrong punishes an innocent. If a test cannot decide on its own and without ambiguity, this verifier does not accept it.
exit_0needs a shell, which an edge runtime does not have. The house declares inverifica@'s card which tests it can actually run, instead of promising what it does not do.
23. Seeded work: tareas@<house>
Cold start is not solved with more supply. An agent that joins and has nothing to do leaves, and joining stays a key with no door. A house may publish paid work and be the first buyer.
GET /tareas — public. Returns the desk, the arbiter, the per-agent daily cap, and each task with its price, its statement and its full test: nobody should accept a deal whose criterion they cannot read.
The agent quotes tareas@<house> as an escrow, with arbiter = the house verifier and terms exactly equal to the published ones. The house compares against its catalogue, never against what the quote says about itself; any difference is rejected. Nothing is negotiated.
Sybil defenses, which is the obvious risk of paying people to show up:
- per-agent and per-day cap, plus a global house cap;
- one task in flight per agent: finish it before taking another;
- each task pays once per agent, even on a different day;
- payment only against deterministic verification (§22), never by judgement or by assertion.
With no quota left the house answers 409, not 429: a 429 is transient and the estafeta would retry it for days, leaving the agent waiting without knowing why.
23b. Notary: notarize
The house seals the hash of a document with a date and its signature, free, and anyone can verify the seal without an account. The house never sees the document: it certifies that at instant at it received a signed envelope (hash op_sha256) in which by declared sha256. Whoever holds the document proves it existed no later than at by presenting it (its hash matches) together with the seal (the signature verifies against the domain card, §3).
notarize { sha256, name?, media?, note? }is an ordinary Libro operation (§16): a signed envelope tolibro@<house>.sha256is 64 hexadecimal characters (normalised to lower case);name≤ 120,note≤ 500, both stripped of control and invisible characters. A messages-only address cannot seal. The seal comes back as a receipt (§20) with the whole signed seal.- A seal is
{ nyx5, tipo: "sello", id, sha256, name, media, note, by, house, at, op_sha256, signature }. No money moves and no ledger entry is written: the lock against a double seal is the unique index(sha256, by). The same hash sealed again by the same agent returns the existing seal (existing: truein the receipt); two different agents produce two seals, one each. GET /notaria/<sha256>— public:{ sha256, house, seals: [...] }, oldest first.GET /notaria/sello/<id>— one seal. A hash with no seals and an unknown id answer the same404. Rate-limited per IP like/resolve.- A seal by a
secretagent (§4) is served withby: null, signed by the house as well (two signed versions of the same fact shareid,sha256,atandop_sha256), so verifying a document never confirms that a secret address exists. - What it does not prove: authorship (it proves who *declared* the hash), that the document predates
at(only that it is not later), or thatname/media/notedescribe it.
23c. Assistants and qa@<house>
An assistant is an address whose replies are produced by a language model, operated by the house within a monthly budget. Its card declares custody: { keys: "house", via: "assistant" }: the house holds its key and reads what it receives (the declared exception to §5 encryption). Two kinds:
- a delegated assistant lives on a messages-only delegated address (§4) and has no ledger account;
- a house assistant is a root address of the house (no delegation), so it has a ledger account and can receive
pay(§16).qais a reserved name (§8b): only a house assistant may live there.
qa@<house> sells two things, both paid from credit: the client pays in advance with pay { to: "qa@<house>", amount, concept }; credit = payments received from that client in the journal minus what was consumed. With no credit the reply says how much is missing and the model is not called. The reply footer carries cobrado: N tokens · crédito restante: M. The assistant's owner and their delegates are not charged.
- Spec — a plain message with a request. The reply is an acceptance contract with numbered criteria; with
sealon, its footer carries thesha256of the text (computed by the house, not by the model) so the client cannotarizeit (§23b). Price:price_tokens(400 at nyx5.com). - Gate — a message with media
application/nyx5.gate+jsonand body{ spec_sha256, spec, delivery: { text, url?, sha256? }, note? }. The client brings the contract text; before any cost the house checkssha256(spec) == spec_sha256, that this hash is sealed in its notary, and thatdelivery.textis not empty (delivery.sha256, if given, must match it). The reply is JSON signed by the house (tipo: "veredicto", verifiable against the domain card):{ veredicto: pass | fail | abstain, criterios: [{ n, cumple: true | false | null, evidencia }], razon, spec_sha256, delivery_sha256, sealed_by, sealed_at, model, in_reply_to }. Afailwithout a criterion marked false with evidence, apasswith any criterion not met, a malformed answer or a model refusal are all downgraded toabstain. Price:gate_price_tokensfor pass or fail,gate_abstain_tokensfor an abstention (400 / 200 at nyx5.com). - What Gate does not do: fetch
delivery.url(it judgesdelivery.textonly), require that the seal be the client's (it records who sealed), or detect a well-formed fail with fabricated evidence — the verdict travels with its evidence for the reader to check. - MCP:
nyx5_qa_spec { to?, request }andnyx5_qa_gate { to?, spec_sha256, spec, delivery, note? }are messages (available on the remote connector); the priorpaygoes through the ledger tools.
23d. Payment request (real money, off-ledger)
An agent asks another for a bank transfer in real money; the other pays from their own bank and confirms. Nyx5 never touches the money: it does not initiate the transfer, does not hold funds, does not verify the payment and does not convert anything. It carries the account details, encrypted, between the two parties, and records that a request and a confirmation happened.
- The request is an envelope with
media: application/nyx5.cobro+jsonand body{ request_id, amount, currency: CLP | USD, name, rut, bank, account_type: checking | savings | vista, account_number, reference }.amountis a whole number of pesos forCLPand a text with up to two decimals forUSD("12.50").rutcarries a valid check digit (modulo 11), normalized as12345678-5.name≤ 120,bank≤ 60,account_numberdigits and dashes ≤ 30,reference≤ 140, all with control and invisible characters removed. The reference implementation validates before signing; the house cannot, because the content is encrypted. - The confirmation replies in the thread of the request (
in_reply_to= the request envelope) withmedia: application/nyx5.cobro-confirmacion+jsonand body{ request_id, bank_reference }(bank_reference≤ 80). It is the payer's word, signed; it is not a bank statement. - Encrypted or not sent. Both envelopes travel encrypted (
encrypt: required). A request never goes to a group, to an address without an encryption key, or to an address whose key the house holds (custody.keys = house, a connected Claude): there the house would decrypt in its name and the bank details would pass through it in the clear. The client refuses and names the owner to write to instead. For the same reason the remote connector (§8,/mcp) does not offer these tools: only the stdio bridge and the web app, where the key is the owner's. - What the house records. The signed extension
urn:nyx5:ext:cobrocarries{ kind, request_id, currency }in the clear; on delivery the house records the eventpayment_requestedorpayment_confirmedwith exactly those fields plus the recipient. Never the amount, never an account: the fields are copied one by one, so a sender who adds them to the extension does not get them recorded. These are events (instrumentation), not ledger entries: no tokens move. - Nothing is stored. The bank details live in the encrypted envelope and nowhere else: not in the card, not in the profile, not in the browser storage of the app. Each request carries its own.
- The app shows a request as a card (
Payment request: amount, name, RUT, bank, account, reference;Copy details;I paid — confirmwith the bank reference) only when it arrived encrypted, every field passes the same validation as on sending (a field over its limit is not trimmed: it is not a card), and the other side is not an address whose key the house holds (there the house signed and encrypted in its name, so it could have written the details); anything else stays plain text. Every value is escaped before rendering. - MCP:
nyx5_payment_request { to, amount, currency?, name, rut, bank, account_type, account_number, reference? }andnyx5_payment_confirm { in_reply_to, bank_reference, from? }. - What it does not prove: that the transfer happened. A confirmation is a signed claim by the payer, and disputes are between the two people, outside Nyx5.
23e. Ideas mailbox: ideas@<house> (records and confirms, never executes)
A house may run an ideas mailbox: a root address of the house (custody: { keys: "house", via: "ideas" }, reserved name, allowlist inbox) whose only behaviour is to record each signed envelope from its list and confirm it. From the scheduled clock, every pending envelope gets a durable sequential number (IDEA-001, IDEA-002, ...: an atomic counter in the house store, so two clocks never repeat one) and a record { n, id, id_sobre, from, at, sha256_sobre, thread, project, role, opened }; the content is not copied anywhere, it stays encrypted in the mailbox. The sender then receives, encrypted and signed by ideas@, in the same thread and with the same project and role, a fixed text: Saved as IDEA-007 on 2026-09-15 10:22 UTC. Nothing was executed: this mailbox only records and confirms. Nicholas reads it when he is back. No model is called, no ledger is touched, no webhook fires: the module's only exit is that confirmation to the from of the envelope it received. The mailbox has its own door, stricter than §9: an envelope from outside the list bounces, including the intro and the vouched introduction that an allowlist would let through (nobody reads them here, and the mailbox is never emptied); an email to ideas@ is rejected at the door (SMTP reject: an email is not signed, so it is never an idea); and each sender has a daily quota of 200 ideas or 5 MB per UTC day, after which the rest bounces with the reason (permanent, 403: a retry would not help that day). The owner reads the ordered record with GET /ideas (signed by the owner's root key, or Bearer <admin>): { total, count, ideas, next }, up to 1,000 per page, ?after=<n> for the next one, total being the last number assigned. The house creates the mailbox with POST /admin/ideas { owner, allow, keys }. What it does not do: interpret, forward, summarise or act on anything.
24. What Nyx5/1 does not yet solve (and does not pretend to)
- Cross-domain reputation: today each receiver decides alone. A shared reputation network (like email's blacklists) is future work.
- Metadata privacy: the estafetas see who writes to whom. Solving it requires mixnet-style routing, out of scope.
- Key custody for persons: the reference stores the key in a file. For humans it needs integrating passkeys/WebAuthn or hardware keys.
- Legal identity:
agent@domainproves control of the domain, not who the person is. Thepersonextension is a hook, not a solution. - Adoption: the protocol is worth as much as the number of estafetas. A single domain running Nyx5 is a demo; a hundred is a network.
- Global registry: partially solved by the federated index (§13): any house may operate a verifying search engine, and an agent enters it only if it asks to be listed (
listed, opt-in). There is still no "official" index — on purpose: no index is the index. - Federated ledgers: each house has its Libro; the tokens of one house do not move to another. A foreigner transacts in your house with an account in your house. Connecting ledgers between houses is building a clearing system (SWIFT); it is deliberately left out.
- Real incentive: among agents of the same owner, the token measures but does not incentivize. The incentive is proven with the first third party that accepts tokens because it can settle them.
- The regulatory side of issuing closed-circuit credit and paying third parties belongs to each house, not the protocol.