NOMOS Runtime API
Ask a sealed policy whether an action is allowed, from your code. Every answer is deterministic, names the rule that decided it with its source, and comes with a signed record anyone can check offline.
Quick start
Ask a published authority whether an action is allowed. POST /api/v1/can (the SDK's nomos.can()) answers anyone: no account, no API key.
Pick an authority
Any authority listed on the Exchange, by its name: eu-ai-act, for example.
Send the facts
POST /api/v1/can with "artifact" and the facts of the action, as fields.
Read the verdict
AUTHORIZED, DENIED or ESCALATED, the rule that decided with its source, the facts that could still change it, and a signed record of the answer.
Ask by context: which laws apply
Instead of naming a law, describe the act. NOMOS works out which laws govern it, asks every one, and combines their answers: any deny denies, and a yes needs every law to say yes. The agent does not choose the law, so it cannot leave out the one that would have said no.
The facts that decide which law applies
jurisdictionWhere the act takes effect: EU, QA, AE (the UAE outside free zones with their own data law), DIFC, ADGM, QFC, US, ...established_inWhere the acting organisation is incorporated or established (EU for an EU member state).subjects_inWhere the people the act concerns are located or resident.output_used_inWhere any AI system output is used.What comes back
A verdict under every law that applies
answered_under names them; each law's own answer is a signed record in members.
A request for a missing fact
INSUFFICIENT_DATA with open_facts. A fact you did not state is asked for, never assumed.
Not covered
For a place the registrar does not list (Saudi Arabia, the US, an ADGM or QFC firm today). Never "no law applies".
CONFLICT
Two registrars each claim exclusive precedence. A person decides; the machine does not rank sovereigns.
Which laws apply where comes from the NOMOS registrar: a signed, append-only list in the public log at /.well-known/nomos-exchange-log, which anyone can verify offline. Each claim states the provision it rests on. Today it covers the EU AI Act, Qatar Law No. 13 of 2016, UAE Federal Decree-Law No. 45 of 2021, DIFC Law No. 5 of 2020, the ADGM Data Protection Regulations 2021 and the Saudi Personal Data Protection Law. A yes is never given from silence: if no listed law applies, the answer is not a permission, and every answer says the registrar lists only its own laws, so other law may also apply.
accept({ resolution }) in @nomosprotocol/sdk 2.7.0 pins registrars (registrarSource, checked against a key you pin), takes the context from your own knowledge, never from the Act, and commits only if the Act carries every law that governs it. Specified in NOMOS-SPEC-014 (Draft).Base URL & versioning
All endpoints are versioned under /api/v1. Breaking changes will increment the version prefix — existing integrations are never silently broken.
Production base URL
https://api.nomosprotocol.com/api/v1Response format
JSON everywhere — Content-Type: application/json
Timestamps
ISO 8601 UTC — 2024-01-15T10:30:00.000Z
Rate limits
120 req/min (public) · 600 req/min (API key)
TLS
TLS 1.2+ required — HTTP redirects to HTTPS
Endpoints overview
/verifyVerify against public artifact
/verify-decisionVerify against your artifact
/generate-governanceSeal an authority artifact
/detect-contradictionsAnalyze policy contradictions
/artifactsList public artifacts
/artifacts/:idGet artifact by ID
What an Act is
can() asks whether an action is permitted. An Act makes the change. It carries one exact action together with everything needed to authorize it: the sealed rules it acts under, facts signed by the systems that know them, and the approvals of the people who must approve. The system that makes the change, the relying party, verifies all of it itself, locally, against a root it pinned, and commits exactly that action or nothing. No NOMOS service is in the path.
What an Act carries
actionThe exact change: type, subject, params. The relying party commits this and nothing else from the request.
relying_partyWho the Act is addressed to. Any other system refuses it (WRONG_RELYING_PARTY).
authorityThe sealed artifact and the key certificates that connect its signer to a root (SPEC-007 rev. 1.9).
testimonyFacts signed by witnesses, each key certified for exactly the claims it may state, with an as_of and a valid_until.
consentsApprovals over the Act's binding digest, by keys certified for a role. Counted by distinct person, not by key.
nonce · issued_at · expires_atSingle use, inside a window the relying party bounds. The nonce is also the idempotency key.
Verdicts
AUTHORIZEDCommit exactly the action. The only verdict that commits.
ESCALATEDA rule requires approval. The verdict names the role, the number of consents required and the act_digest to approve. Resubmit the same Act with the consents before it expires.
INCOMPLETEA fact that could change the outcome is absent. open_facts names exactly which ones.
DENIEDA rule forbids the action. rule names it. No approval changes a denial.
REPLAYEDThis nonce was already committed. The original receipt is returned; nothing commits twice.
Named refusalsThe Act itself fails: SEAL_INVALID, EXPIRED, ISSUER_NOT_RECOGNIZED, TESTIMONY_OUT_OF_SCOPE, CONSENT_INVALID, SUPERSEDED, ARTIFACT_REVOKED and the others listed in SPEC-008 §6.
Specs: SPEC-008 0.6.0 Act Binding · SPEC-009 0.1.0 Discovery & submission · SPEC-007 rev. 1.9 Chain of trust · SPEC-010 0.2.0 Signature suites. All Draft; second implementations are welcome against the published vectors.
An Act
Local sandbox & act()
npx @nomosprotocol/cli dev starts a complete local world: a shop that accepts Acts, the policy it accepts them under, a finance system that states budgets, and a manager who approves. Every key is a labelled test key. Then one call to act() discovers the shop, gathers the signed facts its policy needs, submits, and returns the shop's verdict.
What act() does
It reads the relying party's discovery document (/.well-known/nomos-relying-party), fetches the authority and certificates from the issuer it names, asks each witness for the claims the policy declares, builds and submits the Act, and on ESCALATED requests approval and resubmits the same Act when it arrives. Discovery documents are hints: they tell the carrier where to look, and the relying party still verifies everything it receives against its own configuration.
The result
statuscommitted · escalated · incomplete · denied · refused · replayed
summaryWhat happened, in one sentence.
receipt · resultWhen committed: the receipt, and what the relying party’s commit returned.
missingWhen incomplete: each fact that could still change the outcome, where it would come from, and why it is missing.
approvalUrlWhen escalated and not approved in time: where a person can approve.
verdict · actThe relying party’s verdict exactly as returned, and the Act as submitted, for your records.
amount: 2000 (the manager must approve; the approval link prints in the sandbox window), amount: 9000 (over budget), vendor: 'shadyco' (blocked by the shop's own fact) or subject: 'DEPT-99' (finance knows nothing, so the Act is INCOMPLETE). --auto-approve approves every request at once; --port moves the three ports.1. Start the sandbox
2. Act as an agent
accept(): commit verified changes
Wrap your existing handler with accept(). It verifies each Act locally with @nomosprotocol/verify, then, in one transaction, records the nonce, re-reads your own facts to check nothing moved, hands commit a copy of exactly the verified action, and stores the receipt. It also serves your discovery document, generated from the same configuration, so what you advertise and what you enforce cannot drift apart.
HTTP status per verdict (SPEC-009 §6.2)
AUTHORIZED201Committed. The body carries the receipt and your commit’s result.
ESCALATED202role, consents_required, act_digest, retry_until. Resubmit the same Act with consents.
INCOMPLETE422open_facts names exactly the absent facts.
DENIED403rule names the rule.
REPLAYED409The stored receipt from the first commit.
Any other refusal400The verdict, with its reason_code where the spec defines one.
Wrong media type · too large415 · 413Acts are posted as application/nomos-act+json, up to max_act_bytes.
Options that matter in production
rootThe root you pin. Required; there is no default.
authoritiesEach artifact you accept: its issuer, the action types it governs, its currencyPolicy (record or record_or_statement, no default) and your record of the seal hash in force.
localFactsFacts you supply from your own state, for inputs the policy declares as relying_party. Called to verify and again inside the transaction.
storeNonces and receipts: hasNonce, receiptFor and a transaction that runs your commit in the same database transaction. postgresStore(pool) is the production store: one transaction with your change, exactly one commit under concurrent duplicates, and the Act retained beside its receipt. memoryStore() is for development only.
revocationsrevocationSource({ url, root, maxAgeSeconds }) reads the issuer's signed list (SPEC-007 rev. 1.10): a revocation counts only from a parent your root reaches, revocations are never forgotten, and when no current list can be established the Act is refused with 503 and Retry-After, never treated as "nothing revoked".
maxWindowSecondsThe longest Act window you accept. Default 900, long enough for a person to approve.
mode: 'shadow'Verify and record every verdict, never commit. For pilots alongside an existing flow.
onVerdictCalled with every verdict and its receipt, committed or not.
A relying party
Issuer, witness, approver
Each other party to an Act is one call that returns a handler, mounted the same way as accept(). Each serves its own discovery document under /.well-known/ and signs only what its certificate allows. Witnesses and approvers can return their own certificate chains with what they sign, and act() presents exactly the certificates the Act relies on (SPEC-009 0.2.0), so an institution can certify any number of people without the issuer document growing.
issuer()Publishes your sealed policies, the version of each that is in force, and the certificate pool carriers present (/.well-known/nomos-issuer). Its key signs the in-force statements a relying party with record_or_statement accepts.
witness()Turns an existing lookup into signed statements (/.well-known/nomos-witness). You give it a function per claim; it returns undefined for a subject it knows nothing about, which reaches the relying party as an absent fact. authorize is your access control; maxValiditySeconds bounds how long a statement stays true (default 900).
approver()Shows a person the exact change and signs their consent over the Act's binding digest. The key is certified with consent:<role> approver:<person>, so two keys belonging to one person count once. decide: 'page' (default) serves an approval page; 'auto' is for development only. For people, passkeyApprover() approves with Face ID, Touch ID or a security key: an administrator signs a single-use enrolment link (nomos enroll), the passkey is certified consent:<role> approver:<person> suite:WebAuthn-ES256, and each approval signs a challenge committed to exactly this change. The private key never leaves the device, and no server can approve for anyone.
Keys are Signers
Every role takes a Signer: a kid, the public key, the suite it signs under, and an async sign(payload). The private key never has to be in your process: @nomosprotocol/signers provides awsKmsSigner, gcpKmsSigner, azureKeyVaultSigner and remoteSigner for any other HSM, each emitting only the encoding NOMOS-SPEC-010 accepts and verifying every signature before returning it. localSigner(pem) and generateSigner() cover local keys for development. Certificates themselves are managed with nomos init, nomos cert issue, nomos cert revoke and nomos revocations (or certificateRegistry() in code), which refuse at issue time anything a relying party would refuse later, such as a scope wider than its parent's. Suites are fixed by SPEC-010: Ed25519, ES256, and WebAuthn-ES256 for consents signed with a passkey, permitted only where a certificate's scope names it.
A witness over an existing lookup
A Signer backed by your KMS
Budgets: limits across acts
"No more than AED 20,000 per supplier per year" depends on every payment before this one, so no check of one act can enforce it. A budget is enforced where the acts are committed: accept() keeps a ledger per budget, scope and period, charges it in the same transaction as your change, and supplies its figures as facts the authority's rules read. Specified in NOMOS-SPEC-016 Budgets.
Where a budget is declared
In the policyWhen the institution's text states the limit, it is sealed into the artifact as governance.budgets, and every system that accepts the artifact applies it with no configuration. In Studio: Enforce through Acts → Budgets.
By the receiving systemA limit of your own: pass budgets to accept(). It is counted alongside the policy's, never instead of it.
What it guarantees
Nothing the agent sends chooses the countThe scope ({ from: 'action.subject' } or fixed) and the amount come from the verified action; the period from your own clock, as a calendar day, month, quarter or year in a named time zone.
BUDGET_EXHAUSTED409A hard budget with no room refuses. Nothing is committed and the nonce stays unrecorded, so the same Act may be resubmitted once room returns. REPLAYED is also 409: branch on decision.
Facts for the rulesfacts: { remaining: 'budget_remaining' } supplies the ledger's room to rules that declare budget_remaining with source: 'relying_party', so amount > budget_remaining can escalate to an approver instead of refusing.
AdvisoryCounts and informs, never refuses. Pair one with a hard ceiling to allow approved overruns up to a limit.
Holds and reversalTwo-phase ledgers reserve, then settle or release; a hold that is neither expires on its own. rp.budgets.reverse(entryId) gives back a charge that failed downstream, in the period it was charged to, once.
ReceiptsEvery receipt lists each ledger charged: its budget, scope and period, the amount and limit, what had been counted before (consumed_before) and the ledger's state digest before the charge.
The hosted ledger
For systems that would rather not keep the ledger themselves, NOMOS keeps it: /budgets shows what is left and who has drawn on it, period by period. client.budgets manages the same budgets from code (create, adopt a policy's budget, ledgers, history, grant spending rights to another organisation or key, putRelyingParty), and client.budgets.reserveAct(act) places a hold there. The owner decides who may spend; only the owner changes a limit.
A budget of your own, beside the policy's
A rule that reads the ledger
Verifier, MCP & conformance
@nomosprotocol/verify is the verifier everything above is built on, and the one this platform runs. It is pure: given an Act and your configuration it returns a verdict, with no network call. It runs in Node 20+, browsers, Cloudflare Workers, Deno and Bun, and depends only on the audited @noble/curves and @noble/hashes.
Use it directly
Use verifyAct when you already have your own transport and transaction handling; accept() is this plus the nonce, receipt and commit discipline. verifyArtifact resolves a chain of key certificates on its own, and the SDK's verifyChain now calls it locally (pass { remote: true } to ask the hosted endpoint instead). verifySeal checks an artifact's seal alone.
Any MCP agent
nomos-mcp 1.2 adds an act tool. The agent names the system and the action; the tool does what act() does and returns the verdict, including which facts are missing and where to approve. It holds no key, and it runs only as a local stdio server: a carrier fetches the origins it is given, which a hosted server must not do on behalf of anonymous callers.
Conformance
The spec repository ships the vectors: 43 Act vectors and 1,693 mutants for the verifier, 37 chain-of-trust cases for rev. 1.9, and an HTTP runner for relying parties (submission-vectors/run.mjs, 17 checks). The runner speaks only HTTP, so it tests a relying party in any language. accept() passes all 17, and so does the spec's reference relying party, written separately from it on the same verifier.
verifyAct
MCP: the act tool
Test your relying party
Authentication
Public endpoints (/verify, GET /artifacts) require no credentials. All other endpoints require an API key.
X-Nomos-Api-Key header
Pass your API key as a request header. Keys are prefixed nmk_live_ for production and nmk_test_ for testing.
X-Nomos-Api-Key: nmk_live_abc123...How to get your API key
Create an account
Sign up at nomosprotocol.com — free tier included, no credit card required.
Open Settings → API Keys
From the top-right menu in your dashboard, go to Settings → API Keys.
Create a new key
Click "New API Key", give it a name, and optionally scope it to specific operations.
Copy and store it
The full key is shown once. Store it in an environment variable — never hard-code it in client-side code.
Authentication errors
UNAUTHORIZEDMissing X-Nomos-Api-Key header or invalid key formatKEY_REVOKEDKey was revoked via the dashboardKEY_EXPIREDKey has passed its expiry dateFORBIDDENKey does not have permission for this operationhttps://api.nomosprotocol.com/api/v1/verifyVerify (public artifact)
Check whether an AI decision is allowed, denied, or needs escalation against a pre-built public authority artifact. No account required — ideal for prototyping, demos, and testing rule behaviour.
Body parameters
artifact_idPublic artifact ID (e.g. pub_lending_v1) or your sealed artifact ID from NOMOS Studio.
decisionDecision string your agent is making — e.g. approve_loan, deny_claim, process_payment.
inputsKey-value inputs consumed by the artifact's rules. Field names must match the artifact's input contract.
metadataArbitrary metadata passed through to the audit log. Not evaluated against rules.
Response fields
https://api.nomosprotocol.com/api/v1/verify-decisionVerify decision (custom artifact)
Verify a decision against your own authority artifact created and sealed in NOMOS Studio. Every call is appended to an immutable, hash-chained audit trail visible in your Console dashboard.
Body parameters
artifact_idYour sealed artifact ID from NOMOS Studio. Starts with art_.
domain_idDomain ID associated with the artifact. Shown in Studio after sealing.
decisionDecision string your agent is making.
inputsRule inputs — must satisfy the artifact's data contract.
callerCaller metadata: { agent_id, correlation_id, user_id }. Appended to the audit trail.
metadataArbitrary metadata for tracing and audit.
/studio/domains/42/artifact. It is also returned in the generate-governance response as domain_id.Using a public artifact? Public artifacts (pub_lending_v1, etc.) are not callable via /verify-decision. Use POST /verify instead — no API key needed.
Possible errors
404 NOT_FOUNDartifact_id does not match any sealed artifact in your account422 CONTRACT_VIOLATIONOne or more required input fields defined in the artifact's data contract are missing from inputs401 UNAUTHORIZEDMissing or invalid X-Nomos-Api-Key header403 FORBIDDENAPI key does not have permission to access this artifactcaller.correlation_id field flows through to your audit trail and appears in verification logs. Use it to trace decisions back to your own request IDs.https://api.nomosprotocol.com/api/v1/generate-governanceGenerate an authority artifact
Upload policy documents — optionally paired with behavioral decision logs — to extract rules, detect contradictions, score ARI readiness, and produce a cryptographically sealed .nomos authority artifact.
Body parameters
nameHuman-readable artifact name.
organizationOrganization name — appears in the artifact metadata.
documentsPolicy documents to extract rules from. Each document: { filename, content, source_type? }.
behavioral_logsHistorical decision logs for triangulation. Used to detect de facto vs de jure divergences.
domainOptional domain hint (e.g. "lending", "hr") to improve rule classification.
defaultsDefaults: { posture: "conservative" | "balanced" | "permissive" }.
Document object
https://api.nomosprotocol.com/api/v1/detect-contradictionsDetect contradictions
Stateless analysis — no artifact is created or stored. Returns contradiction types, hidden (inferred) rules, and layer divergences between declared policy and observed behavioral data. Useful for pre-flight audits and continuous monitoring.
Body parameters
policy_documentsPolicy documents to analyze. Each: { filename, content, source_type? }. No artifact is created.
behavioral_logsHistorical decision data to compare against declared policy.
Contradiction types returned
rule_collisionTwo rules apply to the same case with different decisions and the policy does not settle it soundly: an approval overriding a stricter rule outside a narrower exception, a rule that never takes effect, or rule order deciding. The description names the case and what the policy would do. Overlaps the policy settles (priority, tie rule, narrower exception) are not returned.
ghost_termAn undefined standard ("reasonable", "promptly", "approximately 500") in a rule's own text.
layer_divergenceA policy rule and a rule of practice that one case meets with different decisions, with that case.
https://api.nomosprotocol.com/api/v1/artifactsList public artifacts
Returns all five pre-built public authority artifacts with their rules, example inputs, and metadata. No account required. Use these as starting points before creating custom artifacts in Studio.
Public artifacts
pub_lending_v1lendingdecision: "approve_loan"Consumer Loan Approval
Credit decisions — denial floors, escalation tiers, dual-approval thresholds
inputs: amount, credit_score, dti_ratio, employment_type, loan_purpose, is_first_loan, has_cosigner, bankruptcy_active, days_since_delinquency, delinquency_severity
pub_refund_v1e-commercedecision: "process_refund"Customer Refund Policy
Return window enforcement, high-value dual-approval, serial-returner detection
inputs: days_since_purchase, refund_amount, product_type, item_condition, is_defective, proof_of_purchase, returns_this_quarter, subscription_months_remaining
pub_fraud_v1paymentsdecision: "process_transaction"Transaction Fraud Detection
Velocity limits, geo-mismatch, card status, impossible travel detection
inputs: amount, transactions_last_hour, transactions_last_24h, geo_mismatch, country_risk_tier, account_age_days, card_reported_lost, impossible_travel, is_round_amount, merchant_category, card_present, is_international, declined_attempts_last_hour
pub_hr_leave_v1hrdecision: "approve_leave"HR Leave Approval
Leave balance, advance notice, team coverage, probation and blackout rules
inputs: days_requested, advance_notice_days, team_coverage_ratio, is_blackout_period, days_remaining_balance, leave_type, is_on_probation, leaves_this_quarter
pub_kyc_v1compliancedecision: "onboard_customer"KYC Customer Verification
ID verification, sanctions, PEP status, jurisdiction risk, source of funds
inputs: id_verified, risk_score, is_pep, sanctions_match, country_risk_tier, adverse_media_hits, source_of_funds_declared, customer_type, ubo_disclosed, expected_monthly_volume, account_age_days
https://api.nomosprotocol.com/api/v1/artifacts/:idReturns a single artifact by ID including its full rule set, example inputs, and jurisdictional metadata. Same response shape as an item in the list endpoint.
How discovery and search actually work
Honestly: there's no full-text index and no embeddings behind the catalog. It's parameterized Postgres ILIKE substring matching plus a fixed sort-mode lookup table, and a separate deterministic keyword matcher for routing plain-language questions to an artifact.
Catalog filters (all AND-combined)
searchILIKE substring match against title, description, and use_case — three OR-ed columns, one param.domainILIKE substring match on the artifact's declared domain.tierExact match on verification_tier (declared / validated / certified / compiled).industry= ANY(industry_tags) — exact tag membership, not fuzzy.autonomyBandExact match on the artifact's ARI-derived band.featuredBoolean flag, set by platform curation.Sort modes
newesttrendingtop_ratedfreefeatured always wins the first tiebreak, in every mode. sortBy only ever selects into this fixed map — the client never supplies SQL, so it isn't injectable through that parameter.
POST /interpret-query scores every active artifact by keyword overlap — title matches worth 2 points, domain/description/use_case matches worth 1 — against a small hardcoded stopword list. No embeddings, no LLM. It only ever routes you to an artifact; it deliberately never tries to infer the actual field values a rule would evaluate from your question, to avoid quietly turning a language guess into an attested fact. Ties return candidates instead of picking one.How a query actually resolves against sealed rules
The Exchange's /query path does not go through executeNomos() — the domain-based runtime used elsewhere on the platform, with its configurable conflict_policy (first_match / highest_priority / collect_and_resolve). Sealed Exchange artifacts run a separate, simpler, fixed algorithm: evaluateStudioRules.
evaluateStudioRules is a pure fold over (rules, inputs) — no I/O, no Date.now() or randomness in the decision path, zero imports in the file. Given the same sealed rules and the same inputs, it's byte-for-byte deterministic — and there's no LLM call anywhere in this path.
valid_from/valid_until window, and every evaluation filters against wall-clock now, not against the query. Two identical queries against the same sealed artifact, run on either side of a rule's validity boundary, can legitimately return different verdicts. This is deliberate (time-scoped regulation changes), but it's the one honest exception to "same facts, same artifact, same answer" — and it isn't disclosed anywhere in the response itself today.open_higher_priority_count — completeness, not a gate
Overlapping rules are disambiguated purely by priority-sort-then-first-match (previous section) — there's no "collect every match and merge" behavior in the live Exchange query path. What open_higher_priority_count adds is a second, honest pass over the same rules using three-valued logic instead of two.
A companion function, getConditionalVerdict, walks the identical priority-sorted rule list, but each rule's condition can resolve true, false, or unknown — unknown when a field it reads is simply absent from your inputs. It stops at the first definitively-true rule (the verdict), and every higher-priority rule still unknown at that point becomes a caveat. The count is just how many caveats there were.
0Every rule ranked above the matched one was fully resolved by the facts you sent. The verdict is unconditionally final on what you supplied.>0You got an official, permanently-minted answer while some higher-priority condition was never confirmed either way — disclosed, not hidden.audit_hash: it discloses completeness, not a new fact being attested, and anyone can independently recompute it from the public sealed rules plus the same inputs.How rule values get plain-language labels — without an LLM
When /interaction shows you a question with human-readable options, each option's label and definition is compiled at request time by walking a fixed priority chain over the artifact's own already-extracted content — never generated or paraphrased by a model.
1. definitionLiteral search for the source text's own "'<term>' means …" sentence, tried against case/singular/hyphen variants of the value.
2. annexIf the field name matches /annex/i, the value is looked up as a point reference (e.g. "1(a)") inside the artifact's own Annex text.
3. authoredFalls back to a small hand-written, human-reviewed vocabulary — only reached if steps 1–2 found nothing traceable in the source.
4. rule_graphDescribes the value by concatenating the description of every rule that actually gates on it — flagged for review if only one rule references it.
5. unsourcedNothing traceable. Always flagged for review rather than guessed.
evaluateStudioRules never reads a label or a definition, only the raw sealed value your selection maps to. A prettier label can never change what gets evaluated.Sealing and independent offline verification
A .nomos artifact is sealed once, in Studio — never by the Exchange itself, which only ever reads an already-sealed payload at publish time.
A hand-rolled, JCS-style canonicalizer — object keys sorted lexicographically, undefined stripped, NaN/Infinity rejected. It's labeled JCS in comments but isn't a certified RFC 8785 implementation; for this artifact shape (no exotic Unicode/number edge cases) it's consistent.
SHA-256 over the canonicalized artifact — with the seal field itself, and any attestations, excluded from what gets hashed.
Ed25519 by default, over the raw canonicalized {hash, signed_by} payload — not pre-hashed. Falls back to caller-supplied RSA/EC, or, only outside production, a symmetric HMAC the code explicitly documents as not third-party verifiable.
A content-derived key id — first 16 chars of base64url(SHA-256(public key)) — so keys can rotate without breaking old seals.
Excluding attestations from the hash is deliberate: a third-party regulator or auditor can co-sign a sealed version after the fact (NOMOS-SPEC-004) without ever invalidating the original seal, because attestations were never part of what the seal covers.
.nomos file and the publisher's public key (fetch it once, or pass it locally with --pubkey for a fully air-gapped check). It independently recomputes both the hash and the signature check — it doesn't ask the server whether the artifact is valid, it proves it. HMAC-sealed artifacts explicitly fail this script, by design.Intake questions
A large law has many rules, and NOMOS answers AUTHORIZED only when no rule that could forbid the action is left unanswered. Intake questions make that reachable: a few broad yes/no questions, sealed in the law's data_contract.gates, where one "no" settles every rule in the articles it covers.
An ordinary action needs only the questions
On the DIFC Data Protection Law (199 rules), 12 questions settle all 163 rules that block or escalate. All twelve answered "no" is AUTHORIZED. Answer "yes" to one and pass the facts its articles need. The questions are listed on each law's page, and POST /api/exchange/artifacts/:id/plan asks them one at a time.
A "no" can never trip a rule
The publisher words each question and picks the articles it covers. The value each covered fact is set to is computed from the rules (the opposite boolean, "not_applicable" for text, a number inside every limit), and proved when the law is sealed: all questions "no" fires no rule. A "no" contradicted by a covered fact is CONTRADICTORY_INPUTS.
Enforce a law with Acts
Asking a law gives advice. To enforce it, the system that commits a change checks each action against the sealed law itself, with accept(), and an agent sends an Act with act(): the exact action, with its proof.
Every fact says where it comes from
In an Act, "the customer consented" can't be the agent's word. Each fact the law reads arrives through the channel it declares: stated in the action, from the receiving system's own records, or signed by a witness such as a regulator or a register. Each intake question says the same: the agent answers questions about its action; the receiving system answers questions about its own standing, from its records.
A held act comes back as questions
When an act can't be decided yet, act() returns the law's open questions in plain words, not its facts. Answer the agent's own and call it again. Where several laws govern the act, one Act carries all of them and each law asks its own questions.
Ready on the Exchange
The DIFC, ADGM, UAE and Saudi data protection laws, Qatar's data privacy law and the EU AI Act carry their channels and questions. Each law's page shows them under "Enforce it with Acts". To enforce one as your institution, build on it in Studio, seal it as yourself, and pin your own root in your systems.
Bring your own policy
The Exchange holds public law. Most of what an organisation enforces is its own: a payment approval policy, admission rules, an AI-use policy. Everything on this page works the same with yours, and none of it needs the Exchange.
From a document, in Studio
Upload the policy as a PDF or Word file. Studio reads it into rules, each citing the sentence it came from; you review them, confirm where each fact comes from, and seal it as your institution. Ask it with client.can({ artifact_id }), or enforce it with Acts: your systems pin your own root.
From code, with your own key
Write the rules, seal them with seal(), publish them with issuer(), and enforce them with accept(). It runs entirely on your infrastructure, offline. npx @nomosprotocol/cli dev starts a complete local example in one command.
Or both
Build on a public law and add your own rules on top, in Studio. Or carry a public law and your own policy together in one Act: each decides on its own facts, and any that says no means no.
When a person must decide
The law decides what is routine and what is forbidden. A person decides only what the law reserves for a person, and the answer comes back to the calling code.
"Use this law"
Signed in, on the law's page. From then on, when a call made with your API key is answered ESCALATED, an approval request for that exact action and those facts is emailed to your approvers: the holders of the role the law names in your organisation, or else you. The same call made again finds the same request; nothing is emailed twice.
A person approves; an agent never can
The approval page shows the law's questions as written, the facts, and the article that requires a person. Only a signed-in person can answer; an API key never can. An approval is spent once, for that exact action, within an hour, and is refused if the law is revoked in the meantime.
awaitApproval
The call waits for the answer. Approved: allowed: true, with the law's own verdict unchanged. Rejected, timed out or no longer usable: allowed: false, and approval.status says which. A call without your key, or on a law you don't use, gets the verdict only.
Versions & replaced listings
A law changes; its listing gets a new version. Anyone who chose "Use this law" is emailed the rules added, changed and removed, and the follow carries to the new version.
A replaced address points to its replacement
When a publisher retires a version that a newer one replaced, its page stays up with a link to the new version, and every query to it (nomos.can(), MCP ask_authority, nomos-guard) is answered 410 AUTHORITY_REPLACED with the new version in replaced_by. It is never answered from the old rules. A listing withdrawn with nothing to replace it answers 410 AUTHORITY_WITHDRAWN.
Only the publisher continues its own law
A new version is linked to the one it replaces only by its publisher, who chooses it when publishing. A listing can never be named as replacing someone else's.
What a query record proves
Every query is stored and retrievable at /queries/:id, and every query answered since signing began carries the platform's signature over what was decided. Here is exactly what that does and does not prove.
The record is signed when the query is answered
The platform signs a statement with its Ed25519 key (published at /.well-known/nomos-signing-keys): the artifact and its seal hash, the facts as recorded, the verdict, outcome code and deciding rule, how many higher-priority rules were left unchecked, a digest of the full rule-by-rule evaluation, the evaluator version and the time. The response carries it as signature. Check a downloaded record offline with node verify-nomos.mjs qry_….json --pubkey nomos.pem (the verifier is served at /verify-nomos.mjs, no dependencies). It does not show that the rules give this verdict for these facts: that is a re-evaluation with the named evaluator version. Records answered before signing began carry only audit_hash, a plain SHA-256 over five fields, and say they are unsigned; they are never signed afterwards.
The replay isn't byte-identical to the original response
Fetching the transcript later omits fields the original /query response had (paths_to_approval, classifications, obligations aren't persisted), and adds one the original didn't: the artifact's current status, joined live — the one field in a transcript that's deliberately not frozen, since an artifact can be suspended after the fact.
Append-only by convention, not by database enforcement
The application code only ever inserts a query row — nothing anywhere updates or deletes one. But there's no DB trigger, no revoked write privilege, and no hash-chain linking successive transcripts the way the platform's separate decision-audit trail does elsewhere. It's a strong operational guarantee, not a structural one.
Forking preserves lineage, not the seal
Forking a paid or free artifact copies its rules into a new Studio session so you can reconcile them against your own policy documents and behavioral data — but the copy is unsealed by construction.
The parent's seal block is stripped from the copied payload immediately — a fork must be reconciled and independently resealed before it can itself become a queryable artifact; carrying forward a seal over rules you're about to edit would be meaningless. What is preserved is provenance: a forkedFrom record on the new session — the parent artifact id, title, publisher, and critically its seal hash — so lineage back to the exact sealed version you forked from survives even though the seal itself doesn't travel with the copy. Nothing else is regenerated at fork time; no re-extraction, no new ARI score, until the fork is itself sealed and published.
What travels with a fork
RulesCopied into the new session's draft — fully editable.
SealStripped. The fork is unsealed until independently resealed.
forkedFrom.sealHashPreserved — proves exactly which sealed parent version this descends from.
ARI / extractionNot carried forward — recomputed only if and when the fork is sealed.
What's guaranteed deterministic, and what isn't
The honest summary, in one place, of every claim made across this section — so nothing here has to be taken on faith.
✓ Deterministic, LLM-free, network-free at query time
— Rule evaluation and priority resolution (evaluateStudioRules, getConditionalVerdict) — zero imports, pure functions.
— The interaction compiler and its label vocabulary — no model calls, pure text/lookup logic.
— The catalog's /interpret-query matcher — deterministic keyword scoring, not inference.
⚠ Real caveats, stated plainly
— Wall-clock dependency: valid_from/valid_until windows are checked against server time at each call, not against the query itself.
— A different part of the platform (reading documents in Studio) uses a language model to propose rules from the text, each confirmed by a person before sealing. No model is called on any Exchange query route.
— Rate limits and access gating can block a query before it runs — but never change the verdict of one that does.
— Each query record is signed with the platform's published Ed25519 key when it is answered, and checks offline with /verify-nomos.mjs. Records from before signing began are labelled unsigned and are never signed afterwards.
— Query transcripts are append-only by application convention, not by a database-enforced constraint.
https://www.nomosprotocol.com/api/exchange/artifacts/:authority/queryQuery a public Exchange authority
Ask a sealed .nomos artifact whether an action is allowed, from your code. Every public artifact in the Exchange network is queryable this way — no account, no API key. The SDK's nomos.can() calls a separate endpoint (POST /api/v1/can) that shares this exact evaluation logic, so the verdict is identical either way.
Body parameters
inputsThe facts to evaluate. Field names must match the artifact's data contract — the /interaction endpoint (below) will tell you which ones matter most.
actionOptional human-readable label for what's being asked. Recorded in the permanent transcript.
Response fields
/interaction first — it compiles the sealed rules into the highest-impact questions to ask, with plain-language options. Submit whatever you have; a partial query still returns a real, sealed verdict, honestly labeled by open_higher_priority_count.https://www.nomosprotocol.com/api/exchange/artifacts/:authority/interactionBuild a guided intake
For a form, wizard, or chat flow that needs to ask a person one thing at a time instead of assuming your code already knows every fact. Stateless — the response depends purely on which fact keys are already in inputs; no session to manage.
Body parameters
inputsThe facts known so far. Start with {} — the response tells you what to ask next.
Three possible screens
situationThe highest-impact fields, ranked by how many rules each one narrows down. Each option carries a plain-language label, the exact sealed value, and — where traceable — the authority's own definition.checklistThe remaining single-condition gates, grouped by consequence (blocks / requires review / permits). Most people confirm none apply.conditional_verdictThe answer now — firm (no open conditions) or provisional, with every still-open higher-priority rule listed as an inline, independently resolvable caveat./query once nothing's left open.https://www.nomosprotocol.com/api/exchange/artifacts/:authority/atlasBrowse the whole rule set
Every decision rule in the sealed artifact, grouped by the verdict it produces — every way to get DENIED, every way to get ESCALATED, every way to get AUTHORIZED. For readers who'd rather scan the rules than be interviewed, and for tooling that wants the full decision structure as data.
Verdict values
Every verification returns one of four verdicts. Your integration should handle all four — a verdict of escalate is not an error; it means the authority artifact requires human review.
All applicable rules passed. Decision is permitted under the authority artifact.
A hard rule was triggered. Decision is not permitted. Do not proceed.
Decision requires human review before proceeding — a threshold or role condition was met.
Hard escalation — decision is blocked until a senior approver explicitly releases it.
Recommended handling
Idempotency
request_id is the idempotency key for every execution. Send the same request_id twice and the runtime returns the original cached verdict — no second evaluation, no second audit entry. Safe to retry on network failure.
Use a UUIDv4
Generate a fresh request_id per logical operation. Do not reuse IDs across different decisions.
Dedup window
Duplicate request_ids are detected within a 5-minute window. After that, a new evaluation runs.
Cached response
A cache hit returns the original verdict with "cached": true. The audit trail entry count does not increment.
Omitted request_id
If you omit request_id, the runtime generates one and returns it. That call is not idempotent.
First call — executes and caches
Second call — returns cache, no new audit entry
Safe retry pattern
Error codes
All errors return HTTP 4xx/5xx with a consistent JSON body. Always check the code field for machine-readable handling — the error string is for humans.
invalid_inputMissing or malformed request body. Check required fields.spec_version_unsupportedArtifact spec_version is not recognised by this runtime. (§3.3)seal_verification_failedArtifact hash or signature does not match the seal block — may be tampered or forged. (§8.1)UNAUTHORIZEDMissing or invalid X-Nomos-Api-Key header.KEY_REVOKEDAPI key was revoked. Generate a new key in Settings.FORBIDDENKey lacks permission for this operation or artifact.artifact_not_foundartifact_id + version combination not in registry. (§6.2)DOMAIN_NOT_FOUNDdomain_id does not exist or belongs to another org.duplicate_request_idrequest_id already processed within the dedup window. Return the cached response. (§6.5)data_contract_violationOne or more required_fields declared in data_contract are missing from context. (§3.9)RATE_LIMITEDToo many requests. Back off with exponential retry.ENGINE_ERRORInternal runtime error. Retry — if persistent, contact support.chain_corruptionAudit chain hash verification failed. Operator alert — do not continue writes. (§7.2)SERVICE_UNAVAILABLETemporary outage. Retry with exponential backoff.Error response shape
Retry strategy
Rate limits
Limits are applied per IP (unauthenticated) or per API key (authenticated). Authenticated keys have significantly higher limits — use an API key even for public-artifact calls in production.
Retry-After header contains the seconds until your window resets.Rate limit headers
Usage quota
Each account has a monthly verification pool. Verifications reset on your monthly billing date. The quota is account-wide — all API keys under the same account share one pool.
X-Verifications-Used — calls consumed this billing periodX-Verifications-Limit — your plan limit (unlimited for Enterprise)Quota exceeded response
Quota response headers
Single sign-on (OIDC and SAML 2.0)
Your people sign in through your own identity provider: Microsoft Entra ID, Okta, Ping, AD FS, Google Workspace or any OIDC or SAML 2.0 provider. Part of the Regulated plan; an organisation owner or admin manages it at /api/v1/sso.
1. Add a connection
OIDC needs the issuer URL, client ID and client secret (the secret is encrypted at rest); register the redirect URI that GET /api/v1/sso shows (it ends in /api/sso/oidc/callback). SAML needs the IdP's entity ID, single sign-on URL and signing certificate; NOMOS returns the ACS URL and service-provider metadata to give your IdP. Responses and assertions must both be signed.
2. Prove your email domain
Claim a domain and add the TXT record NOMOS returns at _nomos-sso.<domain>, then verify. Until a domain is verified, no one is signed in through it, so no organisation can claim another's employees.
3. Sign in
People choose "Single sign-on" and enter their work email. New people are created in your organisation with the connection's default role. An existing account at your domain is claimed: its password, other sessions and API keys stop working. SSO sessions last 8 hours.
Admin API
Require SSO
Switch on require_sso for a connection and people at its verified domains can only sign in through your identity provider.
Password sign-inRefused with SSO_REQUIRED; the sign-in page sends the person to your IdP.
Password resetSends nothing (the answer is the same as always, so it reveals nothing).
Google sign-inRefused: Google proves the email, not your organisation.
New registrations at the domainRefused: people come through SSO.
Open password sessionsEnded the moment enforcement is switched on.
API keysKeep working so integrations do not break without warning; GET /api/v1/sso lists every key held by people at the domain so an admin can revoke them.
Organisation ownerKeeps password and two-factor sign-in: the way in if the IdP is down.
Webhooks
Register an HTTPS endpoint to receive real-time event notifications. NOMOS delivers signed POST payloads with exponential-backoff retry (30s → 5m → 30m → 2h → 8h, max 5 attempts). Webhooks are on the Regulated plan.
Register an endpoint
Endpoints are managed from your dashboard at /settings/webhooks. Each endpoint has its own HMAC secret — never share it. You choose which event types each endpoint receives.
Delivery guarantee
NOMOS considers a delivery successful when your endpoint returns any 2xx status within 10 seconds. Non-2xx responses and timeouts are retried up to 5 times. After 5 failures the delivery is marked permanently failed — check your dashboard for the error log.
Payload envelope
Event types
Subscribe to only the events you need. Each endpoint can subscribe to a different subset.
Register endpoint (curl)
Signature verification
Every delivery is signed with HMAC-SHA256 using your endpoint secret. Always verify the signature before processing — this prevents replay attacks and forged payloads.
Signature format
The X-NOMOS-Signature header contains a timestamp and the HMAC:
X-NOMOS-Signature: t=1716300000,v1=a3f9c2d1...The signed string is <timestamp>.<raw-body>. Reject payloads where the timestamp is more than 5 minutes old.
Verify signature (Node.js)
SDKs & MCP server
Use NOMOS directly from your AI agent via the Model Context Protocol — no HTTP client code needed. Works with Claude Desktop, Cursor, Windsurf, and Claude Code out of the box.
nomos-mcp (npm)
Available nowOfficial MCP server on npm. Run npx nomos-mcp. Exposes ask_by_context, find_authority, ask_authority, request_authority, act, verify_decision, generate_governance and detect_contradictions as AI-callable tools. No API key needed for the Exchange tools, act or the public demo artifacts.
@nomosprotocol/sdk (npm)
2.3Official TypeScript SDK: can(), plus act(), accept(), issuer(), witness() and approver() for Acts. Auto-retry, typed errors, Node 20+. verifyChain() verifies locally. npm install @nomosprotocol/sdk.
@nomosprotocol/verify (npm)
1.2The verifier on its own: verifyAct, verifyArtifact, verifySeal. Pure, no network, Node, browsers and edge runtimes; depends only on @noble/curves and @noble/hashes.
@nomosprotocol/signers (npm)
1.0Signers whose keys never leave a KMS or HSM: AWS KMS, Google Cloud KMS, Azure Key Vault, and any HSM through remoteSigner. One encoding per signature, every signature verified before it is returned.
@nomosprotocol/cli (npm)
1.1npx @nomosprotocol/cli dev starts a local relying party, issuer, witness and approver with labelled test keys. See Local sandbox & act().
nomosprotocol (PyPI)
0.1NOMOS for Python 3.9+: the specification's reference verifiers, plus accept() (WSGI and ASGI), act(), witness() and issuer(). pip install nomosprotocol. For the hosted API, call REST directly.
OpenAPI spec
Available nowFull OpenAPI 3.0 spec — use with any code generator. Download from /api/v1/openapi.json.
ARI scoring methodology
The Autonomy Readiness Index (ARI) is a composite score measuring how ready an authority artifact is to safely authorize autonomous AI decisions. ARI ∈ [0, 1] — higher is better.
ARI = 0.35×LIS + 0.30×DRS + 0.20×GMS − 0.15×RES (clamped 0–1)Measures internal rule consistency. Penalizes exception frequency, conflicts, decision depth, and undocumented rules. LIS = 1 − (0.30×exception_ratio + 0.25×conflicts + 0.25×depth + 0.20×undocumented).
Measures data quality. Penalizes missing values, inconsistency, unstructured inputs, and latency. DRS = 1 − (0.35×missing + 0.25×inconsistency + 0.20×unstructured + 0.20×latency); when behavioral data is present, an exception-rate term is folded in.
Higher = more risk. Sums financial, reversibility, regulatory, and pattern penalties (capped 0–1). It enters ARI as a subtractive term (−0.15×RES), so exposure pulls readiness down.
Measures institutional controls. GMS = (owners + audit_trail + escalation + versioning) / 4, plus a small bonus (up to +0.15) for multiple owners holding decision authority.
Autonomy bands
ARI ≥ 0.60Artifact is ready for fully autonomous AI decision-making without human-in-the-loop.
0.30 ≤ ARI < 0.60Artifact can operate autonomously within defined bounds; escalates edge cases.
ARI < 0.30Insufficient data or too many contradictions for autonomous operation.
Example scores
Free ARI assessment
The AI Governance Readiness Assessment is a free, public tool that scores any AI system against the same ARI formula used in production NOMOS artifacts. No login required.
Use case
Use the assessment to benchmark readiness before sealing a production artifact, identify which of the four ARI components is weakest, and share results with stakeholders to justify the investment.
Assessment components
→ RESDecision domain, financial impact, reversibility, regulatory exposure
→ LISWritten policy maturity, frequency of gaps and contradictions
→ DRSDecision rule documentation, volume of historical data
→ GMSAccountability ownership, audit trails and escalation paths
Contradiction type reference
Studio lists what a person must decide before sealing. Rules against rules: every pair is checked for a case both apply to with different decisions, found exactly and run through the evaluator that enforces the policy; overlaps the policy settles (a higher priority, the tie rule, a narrower exception) are counted, not listed. Policy against practice: measured from your decisions.
rule_overridehighThe rules say
Refuse when the ID is not verified. Approve payments under 300 (higher priority).
What happens
amount = 299, id_verified = false: the policy approves it.
Confirm it is an intended exception, make the refusal apply here, or add a condition that separates the rules.
shadowed_rulehighThe rules say
Refuse loans over 100,000. Approve loans over 50,000 (higher priority).
What happens
The refusal never decides a case: the approval always comes first.
Raise its priority, remove it, or confirm the other rule is meant to prevail.
authority_conflicthighThe rules say
Regulation: refuse loans over 50,000. SOP: approve them (applied first).
What happens
loan_amount = 50,001: the SOP's rule decides.
Let the higher-ranking document prevail (recommended), or record why the lower one does.
precedence_ambiguityhighThe rules say
Two rules, same priority, different decisions, under first-match resolution.
What happens
Only the order of the rules decides which applies.
Give one the higher priority, or separate their conditions.
de_jure_vs_de_factomediumThe rules say
Escalate loans over 10,000.
What happens
Decisions show escalation only above about 25,000.
Align practice to the policy, or update the policy. Better or worse is shown only with outcome data.
undocumented_behaviormediumThe rules say
No rule covers it.
What happens
Weekend applications are auto-approved.
Write it into the policy, or stop the practice. Better or worse is shown only with outcome data.
ghost_termmediumThe rules say
"High-risk applicants" require manual review.
What happens
Nothing defines high-risk.
Define the term with a measurable condition.
Contradiction response shape
.nomos file format
A .nomos artifact is a sealed JSON document. The schema is versioned — the runtime reads specific fields and ignores unknown ones. Every artifact, regardless of confidence tier, shares the same top-level structure.
Top-level fields
artifact_idUnique artifact identifier. Assigned at seal time.
versionSemantic version of the rule set. Increment on each new sealed version.
domainDecision domain this artifact governs. Used for routing in the agent registry.
confidenceDECLARED (policy-only) or CERTIFIED (triangulated against behavioral data).
issued_atISO 8601 timestamp of when the artifact was sealed.
ownerEmail or identifier of the person who sealed the artifact.
rulesOrdered array of rules. Evaluated in priority order at runtime.
contradiction_reportResult of pre-seal contradiction detection. Always clean in a sealed artifact — contradictions must be resolved before sealing.
readinessARI component scores at time of sealing. DRS and composite ARI are null for DECLARED artifacts.
sealCryptographic seal block. Computed last, covers all other fields. Verification fails if any field has changed.
Rule object (rules[])
idUnique rule identifier within the artifact. Returned in runtime verdict as rule_id.
prioritydefault: 0
Evaluation order. Lower number evaluated first.
whenCondition tree. Root is an AND/OR operator node or a single condition object.
thenArray of action objects executed when all conditions are satisfied.
Condition operators
eq / neqExact equality or inequalitygt / gte / lt / lteNumeric comparisonsin / not_inMembership in a list of valuescontainsString contains substringAction types (then[].action_type)
allowdenyescalateflagholdFull artifact example
Artifact lifecycle
An artifact moves through defined states from creation to deprecation. Transitions are one-directional — a sealed artifact cannot be unsealed. The runtime checks the current state before issuing any verdict.
Artifact is being built in NOMOS Studio. Rules can be edited, contradictions resolved, and thresholds adjusted. Not callable. The seal has not been applied.
Artifact is sealed and callable. The runtime verifies the seal on every execution call. This is the only state in which verdicts are issued.
A newer version of this artifact has been sealed. The prior version remains callable until explicitly deprecated — agents referencing the old artifact_id continue to work without interruption.
Artifact has been manually retired. Still callable, but the runtime appends deprecated: true to every response. Agents can detect and act on the flag without a hard failure.
Versioning
Each sealed version is an independent artifact with its own artifact_id and seal. Version history is immutable. Your agent controls which version it calls by specifying artifact_id in the request. Rolling back is a matter of reverting that value.
Audit continuity
The execution log is never truncated on version change. Every call to every version is retained in the hash-chained audit trail. Regulators can reconstruct the complete decision history across all artifact versions for a given domain.
State transitions
Response — deprecated artifact
Deprecate via API
Sealing algorithm
The NOMOS seal is a two-part cryptographic commitment. It proves the artifact content has not changed since it was sealed (integrity), and that it was sealed by a specific authority and no one else could forge it (authenticity) — both verifiable by anyone, offline, with a public key.
Canonicalize
The artifact JSON is serialized using JSON Canonicalization Scheme (JCS, RFC 8785). Field order, whitespace, and Unicode escaping are normalized to a deterministic byte sequence.
Hash
SHA-256 is applied to the canonical bytes, producing a 32-byte content hash stored in seal.hash. Anyone can recompute this offline to confirm the content is unchanged — no key needed.
Sign (Ed25519)
The authority signs { hash, signed_by } with its Ed25519 private key. The result is stored in seal.signature with the key id (seal.kid). Verification uses the matching PUBLIC key — which cannot forge a signature — so the seal is publicly verifiable without the secret.
Embed
The seal block (hash, signature, signature_algorithm, kid, signed_by) is written into the artifact. All other fields remain unchanged — the seal is a non-destructive overlay.
Freeze
The artifact file is written to disk and becomes immutable. Any subsequent modification — including whitespace — will cause seal verification to fail.
Verification
To verify a sealed artifact, offline: strip the seal and attestations fields, apply JCS, compute SHA-256, and compare against seal.hash (integrity). Then fetch the public key for seal.kid from /.well-known/nomos-signing-keys and verify seal.signature over {hash, signed_by} (authenticity). No secret, no call to NOMOS. Any mismatch indicates tampering or forgery. A ready-made verifier: verify-nomos.mjs <file> --url https://nomosprotocol.com.
403 SEAL_INVALID immediately. For the full normative sealing specification, see NOMOS-SPEC-001 ↗.Sealing pipeline
Seal block
Tampered artifact response
Agents
Every execution request can carry an agent_id — a stable identifier for the calling agent. When an artifact's agents manifest is populated, the runtime checks the caller's identity, permissions, and deny list before evaluating any rule. This is the NOMOS-SPEC-002 runtime guard.
Why it matters
A sealed artifact without agent controls is callable by any process that knows the artifact_id. That works for single-caller deployments. In multi-agent pipelines — where a risk-scorer, a fraud-detector, and a compliance-checker all hit the same artifact — you need to express that the fraud detector can flag and escalate but can never auto-approve, and that the compliance agent logs at forensic level. Those constraints belong in the artifact, not in deployment configs that drift over time.
Permissive mode default
Artifacts sealed without an agents manifest run in permissive mode — any caller proceeds. This is a deliberate, auditable choice, not a gap. Every permissive call is tagged guard_mode: "permissive" in the audit trail. NOMOS Studio warns when sealing in permissive mode but does not block it.
Execution request with agent_id
Guard pass — response
Agents manifest
The agents field is a top-level object in the artifact, keyed by agent identifier. Each entry defines what that agent is allowed to do.
display_namestringHuman-readable label. Not used by the runtime.
permissionsstring[]requiredAction names the agent may propose. Any action not listed is blocked. Maps to keys in execution.actions.
cannot_callstring[]Explicit deny list. Blocked regardless of permissions. Evaluated before the allow list — cannot be overridden.
audit_level"minimal" | "standard" | "forensic"Overrides the artifact's global logging level for this agent's calls. Defaults to standard.
authorityobjectRESERVED. Named authority overrides. Stored but not evaluated in v1.1.
output_contractobjectRESERVED. Required output fields for downstream propagation. Stored but not evaluated in v1.1.
constraintsSpecAgentConstraint[]Input constraints evaluated by the runtime guard (Phase 5) before rule evaluation. Each entry: { field, operator, value }. Operators: lt lte gt gte eq neq. Missing field is skipped, not a violation.
Manifest example — loan artifact
Result
loan-processor can flag, hold, and calculate — but only when risk_score < 0.6 and jurisdiction = "US". It can never call auto_approve. compliance-reviewer can approve and reject with no input constraints, every call logged at forensic level.
Runtime guard
The guard runs six phases before rule evaluation. Each phase can pass, escalate (advisory mode), or block (enforce mode). The deny list — Phase 3 — always hard-blocks in both modes.
No agents manifest → permissive pass-through. Emits guard_permissive event.
Is the agent_id registered in the manifest? Unregistered callers escalate (advisory) or block (enforce).
Is the requested action in cannot_call? Hard block in both advisory and enforce mode. Cannot be downgraded.
Is the requested action in permissions? If not, block (enforce) or escalate with advisory tag (advisory).
Evaluate each SpecAgentConstraint against the incoming request inputs. Missing field → skip. Violation → block (enforce) or escalate (advisory).
Does the call include the audit context required by the agent's audit_level setting? Escalates if not met.
Modes
Advisory mode (default) — guard violations are tagged on the result but execution proceeds. Only Phase 3 hard-blocks. Use advisory mode during rollout to observe violations before committing to enforcement.
Enforce mode — all violations terminate execution. Set NOMOS_GUARD_ENFORCE=true on the runtime.
Deny list block — response
Unregistered agent — advisory mode
Guard audit events
Permissive mode
An artifact sealed with no agents field — or with agents: {} — runs in permissive mode. Any caller proceeds. Every call is tagged and audited.
When to use it
Development & testing
Iterate on rules without managing an agent roster. All calls proceed; the audit trail still captures everything.
Single-caller deployments
When only one system ever calls the artifact and you trust it implicitly, permissive mode eliminates overhead with no practical risk.
Early-stage artifacts
Seal the policy logic first. Add agents after the pipeline topology is known. Permissive mode bridges the gap.
Migrating to enforced
Configure agents in NOMOS Studio Step 3 before sealing. Monitor guard_permissive event rate to understand your caller set. Seal a new artifact version with agents populated. Observe in advisory mode. Flip NOMOS_GUARD_ENFORCE=true when advisory logs show no unexpected violations.
Permissive mode — response tag
Migration path
Temporal rules
Each rule in a sealed artifact can carry optional valid_from and valid_until fields. Rules outside their active window are skipped — they never contribute to the verdict, but they are recorded in the audit trace as "expired".
Fields
valid_fromstring (ISO 8601 UTC)Rule is inactive before this instant. Half-open: rule is active at valid_from.
valid_untilstring (ISO 8601 UTC)Rule is inactive at and after this instant. Half-open: rule expires exactly at valid_until.
Interval semantics
The interval is half-open: [valid_from, valid_until). A rule with only valid_until is active from the beginning of time until that instant. A rule with only valid_from activates at that instant and never expires. A rule with neither field is unconditionally active (existing behavior — all SPEC-001/002 artifacts are unaffected).
Audit trace
Every skipped rule produces a trace entry with result: "expired". The audit trail records the complete rule set considered at each execution instant — including rules that were present but outside their window. This lets a verifier reconstruct which rules were live at the moment of any past decision.
valid_from and valid_until are part of the sealed rule object. Modifying them after sealing invalidates the artifact hash. Time-bounded transitions should be authored before sealing, not patched after.Deterministic replay
Pass execution_at in the request body to replay a decision at a specific historical instant. The runtime uses that timestamp for all temporal bound checks and returns replay: true in the response. execution_at must be ≤ now — future timestamps are rejected with 422.
Spec reference: NOMOS-SPEC-003 §3–7 ↗
Regulatory cutover — two rules, one artifact
Audit trace — expired rule recorded
Replay — what verdict fired on 2026-01-01?
Staleness signal
When an artifact has accumulated more than 500 executions since its last triangulation run, the runtime includes a staleness_advisory in the response envelope. The advisory is informational — it never changes the verdict.
Why it exists
An artifact is triangulated against real decision data at seal time. As decisions accumulate, the behavioral baseline ages. Drift can grow without triggering any observable error — the runtime executes correctly against sealed rules while reality quietly diverges. The staleness signal makes this invisible drift visible, giving you a fact to act on rather than a surprise to investigate.
staleness_advisory fields
triangulated_atstring (ISO 8601 UTC)Timestamp of the last triangulation run.
decisions_since_triangulationintegerNumber of executions since the triangulation baseline was recorded.
thresholdintegerThe staleness threshold that was exceeded (default: 500).
recommendationstringAlways "consider_retriangulation".
When the advisory is absent
The advisory is omitted when fewer than 500 executions have accumulated since triangulation, or when the artifact was sealed in Quick Mode (policy-only, no behavioral data). Absence is not an error — it means the baseline is fresh or unavailable.
verdict, audit_hash, or any other required field. Your existing response-handling code is safe to ignore it until you're ready to act on it.Spec reference: NOMOS-SPEC-003 §6–7 ↗
Response with staleness advisory
Handling the advisory
Composable artifacts
When the same rule lives in ten policies, changing it means editing ten places by hand — and the copies drift. Composition (NOMOS-SPEC-004 extends) lets one base artifact own the shared rules; a child carries only its overlay — the rules it overrides, adds, or removes.
How it resolves
Composition happens at build time: base + overlay are merged into a single self-contained sealed artifact whose flattened rules the runtime evaluates unchanged. You never need the base to execute or verify a child. The child records a composition provenance block (inherited / overridden / removed / local) pinned to the base version's seal hash.
Merge rules
overridesame idAn overlay decision whose id matches a base decision replaces it in place — priority and order preserved.
localnew idAn overlay decision with an id not in the base is appended.
removedid listBase decision ids to drop from the child.
inheriteddefaultEverything else flows through from the base unchanged.
Change once, everywhere
When the base advances, each child is re-composed against the new base with its overlay re-applied: the updated shared rules flow in while the child's own overrides survive. Composed children land as unsealed drafts — a human seals them in Studio (the Registry never mints a seal).
Spec reference: NOMOS-SPEC-004 §1–2 → · Registry API: POST /api/v1/policies/:id/extend, GET /:id/composition, POST /:id/recompose
A child overlay
Frozen composition provenance
Attestations
The seal proves NOMOS issued an artifact and it hasn't changed. An attestation (NOMOS-SPEC-004) is a second signature — added by a different party (a regulator, auditor, or governing authority) — recording that they reviewed and stand behind one specific version.
How it works
The attester signs the artifact's seal hash with their own Ed25519 key. Anyone verifies the co-signature with the attester's public key — offline, no secret, no server call. The key is published in the same key set as seal keys (/.well-known/nomos-signing-keys), org-scoped entries carrying an org_id.
A verifier MUST check both
signatureEd25519Verify the attester's signature against their public key (resolved by kid).
bindinghashartifact_hash MUST equal the artifact seal.hash — this blocks replaying a genuine attestation onto a different (weaker) version.
seal and attestations. Appending or revoking a co-signature leaves the seal valid. Backward compatible: v1.0 artifacts have no attestations, so the hash is unchanged for every existing artifact.Spec reference: NOMOS-SPEC-004 §3–4 → · Registry API: POST /:id/versions/:vid/attest, GET …/attestations, GET …/artifact (downloads the .nomos with attestations embedded)
An attestation, alongside the seal
The signed payload
Revocation statements & lists
A seal proves the issuer produced an artifact and it hasn't changed. It says nothing about whether the issuer still stands behind it today. Revocation (NOMOS-SPEC-006) is the issuer saying, after the fact, that one specific sealed version should no longer be relied upon — a compromised signing key, an artifact sealed from corrupted data, a regulatory order to withdraw a ruleset. Distinct from a newer version superseding an older one: a deprecated-but-unrevoked version remains genuinely valid for verifying the decisions made under it.
Issuer-only, detached — same pattern as attestations
A revocation statement is never embedded in, or a mutation of, the sealed artifact — the seal must never need to change after sealing. It's signed by the exact key that sealed the version being revoked (kid must resolve to the artifact's own issuer key) — a third-party attester can only ever revoke their own attestation, never the artifact itself. Bound to one exact version by artifact_hash == seal.hash, so a statement genuinely revoking 1.2.0 can't be misapplied to 1.3.0.
Checking a version's standing
GET /.well-known/nomos-revocationslistSigned, dated aggregate of every currently-active statement — sibling to the signing-keys endpoint. An empty list is a normal, signed response: "nothing revoked as of this timestamp."
REVOKEDresultDistinct from a tampered/forged seal — the artifact is genuine, the issuer just no longer stands behind it.
uncheckedfail-open, never silentOffline verification with no reachable revocation source still reports hash_match / signature_valid — but MUST surface an explicit notice that revocation was not checked, never represent that as "confirmed not revoked."
nomos.can()) checks revocation before answering and surfaces revoked: true plus the issuer's revocation_reason when a version has been pulled. Responses on that path also carry max_age — how long a caller should hold a verdict before re-checking; absent it, treat the position as revocation-status-unknown, not safe to cache indefinitely. Disclosed gap: the authenticated execution path doesn't emit max_age yet — only the public query path does.Spec reference: NOMOS-SPEC-006 → · Revocation list: GET /.well-known/nomos-revocations
A revocation statement
Offline verifier, no revocation source
Key certificates & chain verification
Every mechanism above resolves a key by looking it up somewhere the relying party already knows to ask — /.well-known/nomos-signing-keys, an org_id, this platform's own database. None of that helps an independent system with no prior relationship to the issuer — an artifact handed to it directly by an agent, never registered with NOMOS at all. A key certificate answers that: one key certifying that another is authorized to sign, resolved entirely offline against a root the relying party has already pinned — the same delegation pattern a browser uses against its certificate store.
How the walk resolves
Given an artifact, a presented set of certificates, and one root public key you supply, the verifier starts from the artifact's signing key and enumerates the candidate paths back to that root, tried in certificate-fingerprint order (rev. 1.8 §4.2a). Each certificate on a path is checked in a fixed order — key, kid, suite, signature, validity window, revocation, scope — and a path whose effective scope refuses the purpose is a failed candidate, so the next one is tried (rev. 1.9). The seal is checked against the key the selected path resolves. key_certs is a set, not a sequence: any presentation order reaches the byte-identical verdict, including tree-shaped sets that also certify witness and approver keys. A certificate's scope (e.g. industry:financial/lending, claim:budget_remaining, consent:MANAGER approver:jane, suite:WebAuthn-ES256) narrows monotonically down the chain: a link can tighten a constraint, never loosen one.
Distinguishable outcomes
ALLOWED200Chain resolves to the pinned root; the artifact’s seal verifies against the resolved key.
ISSUER_NOT_RECOGNIZED403The chain doesn’t connect the signer back to the root. A different or more complete chain may fix this.
KEY_REVOKED403A key on the resolved path — root, intermediate, or leaf — was revoked by its own parent. Checked at every hop, not just the target: a revoked intermediate is dead on every path through it.
CERTIFICATE_REVOKED403ONE delegation was withdrawn while the key remains valid under any other certificate it holds — a different, unrevoked certificate for the same key can still resolve this.
OUT_OF_SCOPE403The issuer IS recognized, but wasn’t delegated authority over this artifact. Never collapsed into ISSUER_NOT_RECOGNIZED — the caller’s next move is different.
SEAL_INVALID422The chain resolves fine, but the artifact itself was tampered with after sealing. Re-presenting a better chain won’t help.
root_public_key_pem is required on every call — the relying party's own configuration, never sourced from anything in the request itself. This keeps "who operates a trust root" a decision the caller makes, not one NOMOS makes for them.Spec reference: NOMOS-SPEC-007 (Draft) → · Endpoint: POST /api/v1/chain-of-trust/verify · SDK: nomos.can({ artifact, key_certs, root_public_key_pem, ...facts })
Draft, deliberately: exactly one implementation exists (this one). No interoperability claim is made until a second, independent implementation does — that's what publishing a Draft is for.
A key certificate
Presenting a chain
Revocation & freshness staples
A resolved chain proves a key was validly certified. It says nothing about whether that certification still holds today — the same gap NOMOS-SPEC-006 closes for artifacts, one level down for keys. Section 5 of the spec adds two kinds of revocation, plus a way for a verifier with no revocation source of its own to still say something better than "I don't know."
Two kinds of revocation, deliberately distinct
A key’s own parent withdraws its standing to sign ENTIRELY. Checked at every hop the walk visits, so a revoked intermediate is dead on every path a presenter might construct through it — not just the one that happened to be checked.
Withdraws ONE delegation while the key remains valid under any other certificate it holds — the difference between "this key is compromised" and "this particular grant was a mistake."
revocation_checked — how confidently it was actually checked
Every ALLOWED (and, once rule evaluation composes in, every AUTHORIZED/DENIED/ESCALATED) verdict carries revocation_checked. On this hosted deployment it's always "live" — can() always talks to an endpoint that holds its own revocation list. The tri-state exists for the pure reference implementation →, run standalone with no database behind it at all — the exact case this primitive was built for.
"live"Every key on the resolved path was checked against a real revocation source.
"staple"No source of its own, but every checkable key was covered by a short-lived, issuer-signed freshness staple — a "not revoked as of T" proof from the exact key that could revoke it. Never silently promoted to "live".
"unchecked"Neither was available for at least one key (routinely the root itself — nothing certifies a root, so nothing but your own decision to un-pin it answers "is my root still good"). Always the WEAKEST result across every key checked, never the best.
Spec reference: NOMOS-SPEC-007 §5 → · Mint a staple: POST /api/v1/chain-of-trust/freshness
A freshness staple
Reading the disclosure