Lab

KYE Protocol™ Lab

Run one governed agent action end to end, in your browser.

Purpose Permission API

Demo data

You learn: What the purpose-permission endpoints take and return. You can: Pick a request and send it.

Clinical lead · Issue the grant

Request
POST /purpose-permissions

{
  "grantee": "<grantee>",
  "purpose": "<purpose>",
  "scope": "<scope>",
  "ttl_days": 90
}
Response 201
{
  "grantee": "kye:ent:halden.example:agent:clin-03",
  "id": "kye:purpose:halden:clin-03:clinical-summarise-2026q4",
  "issued_by": "kye:ent:halden.example:officer:clinical-lead",
  "not_after": "2027-01-01T00:00:00Z",
  "not_before": "2026-10-01T00:00:00Z",
  "principal": "kye:ent:halden.example",
  "purpose": {
    "id": "kye:purpose-class:clinical.summarise",
    "label": "Summarise care records for the treating clinician"
  },
  "restrictions": {
    "dual_control": false,
    "jurisdiction": [
      "GB"
    ],
    "rate_cap": {
      "requests_per_minute": 20
    },
    "requires_evidence": true
  },
  "scope": {
    "actions": [
      "read",
      "summarise"
    ],
    "data_classes": [
      "health.record"
    ],
    "resources": [
      "kye:res:halden.example:ehr:ward-7"
    ]
  },
  "version": 1
}
How this widget is built
Demonstrates
App API
Components
  • /api/v1/purpose-permissions
  • OpenAPI contract (app.yaml)
Flow
Requests come from the app API contract; the issue response is the demo grant. Architecture diagram
Used on
  • /examples/: On the examples page, with the rest of its scenario.
  • /sandbox/demos/demo/: The sandbox demo: the same calls, answered from the contract.
  • /lab/: The lab: call the API in your browser.

The Authority Simulator™: pick a request, watch KYE™ decide

Demo data

You learn: Why an agent's request is allowed, held for approval or refused, and that the refusal lands before the side effect. You can: Pick a case and run it.

A rule-based execution agent places a small GBP 8,500 hedge adjustment on a permitted instrument — comfortably inside the desk's auto-approval limit. Nothing needs a human.

Action
trading.order_place
Purpose
place a small hedge adjustment within the desk mandate
Instrument
EQ:VOD.L
Side
buy
Amount
8,500

Allowed Passed every stage permission_granted

  1. The agent proposes the action

    KYE™ policy decision point

    Subject, action, purpose and context, as sent to KYE™.

  2. KYE™ resolves authority and purpose

    KYE™ policy decision point

    Delegation, scope, thresholds and approvals at decision time.

  3. KYE™ decides and seals

    KYE™ policy decision point

    Allow, require approval or deny, with a reason code, sealed into the Evidence Pack™.

  4. The side effect commits

    KYE™ policy decision point

    Only an allowed action reaches the rail; a held or refused one stops here.

How this widget is built
Demonstrates
KYE™ runtime decision (kye_decide)
Components
  • Demo scenario registry (kye.demo_scenario.v1)
  • Runtime evaluate engine
  • Reason Code Dictionary™
  • Evidence Pack™
Flow
Request → authority and purpose resolved → decision with reason code, sealed → the side effect commits only when allowed. Architecture diagram
Used on
  • /simulator/: The simulator itself: every case is runnable.
  • /: The simulator itself: every case is runnable.
  • /lab/: The simulator itself: every case is runnable.