api.nsr.stateset.com directly over HTTP or through the stateset-nsr-mcp MCP server.
NSR returns one of exactly three accountable outcomes — approved, denied, or refused — with
cited rules, a replayable derivation, and a sha256 policy pin. There is no path from an ungrounded
model answer to a confident approval.
Connect
Base URL:https://api.nsr.stateset.com. On every call send X-API-Key: nsr_… and
X-Org-ID: <your org> (a Authorization: Bearer nsr_… header is accepted in place of the API-key
header). Get a key in the console: nsr.stateset.com → API setup → Organization API keys; the
secret is shown once.
Prefer MCP if your harness speaks it — 36 typed tools, retry-safe, with client-side validation:
nsr_decide is the flagship tool; nsr_verify_proof, nsr_record_outcome and nsr_calibration
close the proof and outcome loops.
Make a verified decision
POST /v1/decisions
decision—approved|denied|refused. Treatrefusedas “stop and verify”, never as a soft yes.proof.cited_rules,proof.derivation— the rules and replayed steps the verdict stands on.proof.request_policy_hashpins the exact policy inputs.refusal.missing_facts— unsatisfied premises[{predicate, args, needed_by_rule}]. Look each one up with your tools, assert it, and retry. Absent on safety-gated refusals; those need a human, not a retry.verifiable_bundle— present only on approvals that declared anauthorization_goal; see below.
Verify the proof independently
An approval’sverifiable_bundle ({facts, rules, proof, org_id}) is self-contained. POST it
verbatim to POST /v1/proofs/verify — a stateless kernel that reads no tenant state — and require
{"verified": true} before acting on a high-stakes approval. A failure returns the located reason
and step.
Report what actually happened
Sendexternal_ref (your order or ticket id) on the decide, then close the loop:
honored | reversed | overridden | escalated. This feeds
GET /v1/decisions/calibration — ECE and reliability bins — which tells you whether NSR’s stated
confidence can be trusted at each level.
Teach durable policy
POST /api/v1/rules— store an org rule. Shape:head_predicate,head_args,body: [{predicate, args, negated?}]. Intent comes from head naming (may_*permits,*_blockeddenies,*_requires_review) or an expliciteffect.POST /api/v1/rules/lintbefore install;POST /api/v1/rules/batchto load a book. Decide withhydrate_org_context: trueto use stored policy.POST /api/v1/factsand entities for org knowledge;POST /api/v1/backward-chainproves against the stored org KB only.
Two encodings that trip agents up
- Facts are an envelope:
{"predicate": {"name": "…", "args": […]}}— not a flat atom. - Request-scoped rules use
if/thenatoms keyed byname; stored rules usehead_predicate/head_args/bodyatoms keyed bypredicate. The error messages do not always say which one was expected.
Guardrail
Before any consequential action — refund, access grant, data change — decide first, act only onapproved, and log decision_id and proof.request_policy_hash with the action. On refused,
gather the named missing facts and retry. On requires_human_review, escalate.
Further reading
- Verified Decisions API — the contract in depth
- NSR API reference — all 259 endpoints
- NSR MCP server — the 36 tools
- Endpoint map for agents:
https://nsr.stateset.com/llms.txt