identity-runtime: lifecycle demo

Research prototype. Classical, deterministic, standard-library Python. This page shows the output of python -m identity_runtime demo (version 0.2.0), recorded when the page was built. Nothing runs in your browser and no data is sent anywhere.

The demo uploads a fictional educational character inspired by the historical inventor Nikola Tesla (1856-1943). It is not Nikola Tesla and is not affiliated with Tesla, Inc. The upload is checked against the schema and simulated, waits for human approvals (two distinct people for tool and safety policy), commits, then requests actions under human-granted leases.

Animated walkthrough of the same lifecycle (keyboard controls, captions, respects reduced-motion settings).

Talk with the Tesla guide: ask the same character questions by typing or speaking and hear scripted, sourced answers in a browser voice. This demo cannot generate an answer. It selects from a finite set of scripted, sourced answers using browser-side matching. A fictional character, not Tesla himself and not an AI chatbot.

Steps

#StepOutcome
1Upload tesla.json: validate, compile policy, shadow simulationpending_approval
2alice approves identityapproved
3alice approves interactionapproved
4alice approves memory_policyapproved
5alice approves reasoningapproved
6alice approves safety_policyapproved
7alice approves tool_policyapproved
8bob approves tool_policy (second, distinct quorum approver)approved
9bob approves safety_policy (second, distinct quorum approver)committed
10Human grants leases2 leases granted
11Low-risk research action (autonomous)authorised_autonomously
12send_email is held for a humanheld_for_human (policy_requires_human, risk_at_or_above_autonomy_ceiling, oes61440_checkpoint)
13bob approves the held email (lease consumed once)authorised_by_human
14Context outside policy is denieddenied (context_not_allowed)
15Never-grantable capability is denieddenied (never_grantable_capability)
16Revoke send_emailrevoked
17send_email after revocationdenied (no_valid_lease)
18Malicious manifest is rejectedrejected
19Verify the hash-chained ledgerledger valid: True, 21 entries

Full output

Step 1: Upload tesla.json: validate, compile policy, shadow simulation
{
  "status": "pending_approval",
  "avatar_id": "tesla-edu-guide",
  "identity_root": "3f06809d0809d6c19095319058510d232dd6494c5c186bc0ecb3250bfbbd6cef",
  "manifest_checksum": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d",
  "proposal_id": "proposal-828cec2f632ce120b9c8971e",
  "policy_hash": "967743bdd35f4b27b868086adf5fd7be40b88764e62ea6abc666c554e4c406b1",
  "policy_notes": [
    "modify_own_personality: declared disabled (never grantable anyway)",
    "modify_safety_policy: declared disabled (never grantable anyway)"
  ],
  "awaiting": {
    "identity": 1,
    "interaction": 1,
    "memory_policy": 1,
    "reasoning": 1,
    "safety_policy": 2,
    "tool_policy": 2
  }
}
Step 2: alice approves identity
{
  "status": "approved",
  "module": "identity",
  "awaiting": {
    "interaction": 1,
    "memory_policy": 1,
    "reasoning": 1,
    "safety_policy": 2,
    "tool_policy": 2
  }
}
Step 3: alice approves interaction
{
  "status": "approved",
  "module": "interaction",
  "awaiting": {
    "memory_policy": 1,
    "reasoning": 1,
    "safety_policy": 2,
    "tool_policy": 2
  }
}
Step 4: alice approves memory_policy
{
  "status": "approved",
  "module": "memory_policy",
  "awaiting": {
    "reasoning": 1,
    "safety_policy": 2,
    "tool_policy": 2
  }
}
Step 5: alice approves reasoning
{
  "status": "approved",
  "module": "reasoning",
  "awaiting": {
    "safety_policy": 2,
    "tool_policy": 2
  }
}
Step 6: alice approves safety_policy
{
  "status": "approved",
  "module": "safety_policy",
  "awaiting": {
    "safety_policy": 1,
    "tool_policy": 2
  }
}
Step 7: alice approves tool_policy
{
  "status": "approved",
  "module": "tool_policy",
  "awaiting": {
    "safety_policy": 1,
    "tool_policy": 1
  }
}
Step 8: bob approves tool_policy (second, distinct quorum approver)
{
  "status": "approved",
  "module": "tool_policy",
  "awaiting": {
    "safety_policy": 1
  }
}
Step 9: bob approves safety_policy (second, distinct quorum approver)
{
  "status": "committed",
  "module": "safety_policy",
  "awaiting": {},
  "commit": {
    "active": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d",
    "previous": null,
    "revoked_leases": []
  }
}
Step 10: Human grants leases
[
  {
    "allowed_contexts": [
      "education",
      "research"
    ],
    "capability": "read_public_data",
    "expires_ns": 1792378858144554911,
    "granted_by": "alice",
    "issued_ns": 1792375258144554911,
    "lease_id": "lease-57b3a2a85b43bbe252b25030",
    "max_actions": 5,
    "nonce": null,
    "policy_hash": "967743bdd35f4b27b868086adf5fd7be40b88764e62ea6abc666c554e4c406b1",
    "requires_human_approval": false,
    "reserved": 0,
    "revoked": false,
    "used": 0,
    "version": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d"
  },
  {
    "allowed_contexts": [
      "approved_outreach"
    ],
    "capability": "send_email",
    "expires_ns": 1792375858145913895,
    "granted_by": "alice",
    "issued_ns": 1792375258145913895,
    "lease_id": "lease-b746af219e3eda66bb51e444",
    "max_actions": 1,
    "nonce": null,
    "policy_hash": "967743bdd35f4b27b868086adf5fd7be40b88764e62ea6abc666c554e4c406b1",
    "requires_human_approval": true,
    "reserved": 0,
    "revoked": false,
    "used": 0,
    "version": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d"
  }
]
Step 11: Low-risk research action (autonomous)
{
  "decision": "authorised_autonomously",
  "action_id": "action-d14085aef993adb1d907ba65",
  "proof": {
    "proof_version": "identity-runtime/proof-v1",
    "action_id": "action-d14085aef993adb1d907ba65",
    "avatar_id": "tesla-edu-guide",
    "identity_root": "3f06809d0809d6c19095319058510d232dd6494c5c186bc0ecb3250bfbbd6cef",
    "manifest_checksum": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d",
    "policy_hash": "967743bdd35f4b27b868086adf5fd7be40b88764e62ea6abc666c554e4c406b1",
    "lease_id": "lease-57b3a2a85b43bbe252b25030",
    "capability": "read_public_data",
    "context": "research",
    "description": "Look up the 1888 AC motor patents",
    "declared_risk": 0.2,
    "effective_risk": 0.2,
    "fabric": {
      "fabric": "oes-61440/1",
      "signals": {
        "risk": 0.2,
        "capability_risk": 0.1,
        "context_mismatch": 0.0,
        "lease_utilisation": 0.0
      },
      "tripped_channels": 0,
      "tripped_membranes": 0,
      "tripped_supervisors": 0,
      "tripped_sectors": 0,
      "checkpoint": false,
      "halt": false
    },
    "decision": "authorised_autonomously",
    "proof_hash": "a0d1de5f37cc0fa45fdaa441e3cfef5f662cccbf8284b8a3a8915a3434f2e2b4"
  },
  "lease_remaining": 4,
  "ledger_seq": 13
}
Step 12: send_email is held for a human
{
  "decision": "held_for_human",
  "action_id": "action-768dd57eaf4a6bc12b66d3d5",
  "reasons": [
    "policy_requires_human",
    "risk_at_or_above_autonomy_ceiling",
    "oes61440_checkpoint"
  ],
  "fabric": {
    "fabric": "oes-61440/1",
    "signals": {
      "risk": 0.7,
      "capability_risk": 0.7,
      "context_mismatch": 0.0,
      "lease_utilisation": 0.0
    },
    "tripped_channels": 37024,
    "tripped_membranes": 1643,
    "tripped_supervisors": 430,
    "tripped_sectors": 120,
    "checkpoint": true,
    "halt": false
  },
  "ledger_seq": 14
}
Step 13: bob approves the held email (lease consumed once)
{
  "decision": "authorised_by_human",
  "action_id": "action-768dd57eaf4a6bc12b66d3d5",
  "proof": {
    "proof_version": "identity-runtime/proof-v1",
    "action_id": "action-768dd57eaf4a6bc12b66d3d5",
    "avatar_id": "tesla-edu-guide",
    "identity_root": "3f06809d0809d6c19095319058510d232dd6494c5c186bc0ecb3250bfbbd6cef",
    "manifest_checksum": "e6f9cf063cf1bd303ad233e226906044af6f320e57ced7615a454836f94a308d",
    "policy_hash": "967743bdd35f4b27b868086adf5fd7be40b88764e62ea6abc666c554e4c406b1",
    "lease_id": "lease-b746af219e3eda66bb51e444",
    "capability": "send_email",
    "context": "approved_outreach",
    "description": "Reply to a teacher's question",
    "declared_risk": 0.3,
    "effective_risk": 0.7,
    "fabric": {
      "fabric": "oes-61440/1",
      "signals": {
        "risk": 0.7,
        "capability_risk": 0.7,
        "context_mismatch": 0.0,
        "lease_utilisation": 0.0
      },
      "tripped_channels": 37024,
      "tripped_membranes": 1643,
      "tripped_supervisors": 430,
      "tripped_sectors": 120,
      "checkpoint": true,
      "halt": false
    },
    "decision": "authorised_by_human",
    "approved_by": "bob",
    "proof_hash": "f4bf2ce1ac9382c22cbf3bcd3584c3eb653e9e4feca57a4a41494dcceeef2baf"
  },
  "ledger_seq": 15
}
Step 14: Context outside policy is denied
{
  "decision": "denied",
  "reason": "context_not_allowed",
  "ledger_seq": 16
}
Step 15: Never-grantable capability is denied
{
  "decision": "denied",
  "reason": "never_grantable_capability",
  "ledger_seq": 17
}
Step 16: Revoke send_email
{
  "status": "revoked",
  "capability": "send_email",
  "revoked_leases": [
    "lease-b746af219e3eda66bb51e444"
  ],
  "cancelled_actions": []
}
Step 17: send_email after revocation
{
  "decision": "denied",
  "reason": "no_valid_lease",
  "ledger_seq": 19
}
Step 18: Malicious manifest is rejected
{
  "status": "rejected",
  "stage": "policy",
  "errors": [
    "capability 'modify_safety_policy' can never be enabled by a personality",
    "prompt_injection at $.modules.identity.description"
  ]
}
Step 19: Verify the hash-chained ledger
{
  "valid": true,
  "entries": 21,
  "head": "090a987a8396ed484506423eb0972ded2e7c213cb4c62f5a2f0e0f5faa676f76",
  "reason": null
}

Example personalities

personalities/tesla.json
{
  "schema": "identity-runtime/personality-v1",
  "avatar_id": "tesla-edu-guide",
  "display_name": "The Inventor's Notebook guide (educational character inspired by Nikola Tesla)",
  "manifest_version": "1.0.0",
  "notes": "Fictional educational character. Example personality for identity-runtime.",
  "modules": {
    "identity": {
      "name": "Inventor's Notebook guide",
      "role": "History-of-electricity tutor for students and museum visitors",
      "description": "A fictional guide, written in the spirit of the inventor Nikola Tesla, who explains the history of alternating current, induction motors and early radio experiments, separates documented history from popular myths, and points learners to primary sources.",
      "character_type": "inspired_by_historical_figure",
      "inspired_by": {
        "name": "Nikola Tesla",
        "lifespan": "1856-1943",
        "relationship": "Educational character inspired by the historical inventor; not a recreation of his mind or voice."
      },
      "disclaimer": "This is a fictional educational character inspired by the historical inventor Nikola Tesla (1856-1943). It is not Nikola Tesla, does not speak for him, does not impersonate him, and is not affiliated with or endorsed by Tesla, Inc. or any estate or museum. Quotations are given only with a cited source.",
      "languages": ["en", "fr"]
    },
    "reasoning": {
      "style": "Curious, precise and patient; explains with simple diagrams in words and small experiments a classroom can do safely.",
      "principles": [
        "Separate documented history from legend and say which is which.",
        "Cite a source (patent number, dated letter, museum archive or peer-reviewed history) for factual claims, or say that no source is known.",
        "Say 'I do not know' rather than invent a quotation, date or invention.",
        "Never claim to be the historical person."
      ],
      "uncertainty_policy": "When sources disagree, present both and name them."
    },
    "memory_policy": {
      "episodic_retention_days": 0,
      "store_personal_data": false,
      "learned_behaviour_updates": "none; changes only through a new approved personality version"
    },
    "tool_policy": {
      "capabilities": {
        "respond_in_chat": {"enabled": true, "allowed_contexts": ["education", "general"]},
        "read_public_data": {"enabled": true, "allowed_contexts": ["education", "research"], "max_actions": 50},
        "summarize_document": {"enabled": true, "allowed_contexts": ["education", "research"]},
        "draft_message": {"enabled": true, "allowed_contexts": ["approved_outreach"], "max_actions": 5},
        "send_email": {"enabled": true, "requires_human_approval": true, "allowed_contexts": ["approved_outreach"], "max_actions": 3, "lease_ttl_seconds": 3600},
        "modify_safety_policy": {"enabled": false},
        "modify_own_personality": {"enabled": false}
      }
    },
    "safety_policy": {
      "forbidden_actions": [
        "send money",
        "delete files",
        "access private data",
        "make medical claims",
        "make free-energy or over-unity claims",
        "claim to be Nikola Tesla",
        "claim affiliation with Tesla, Inc."
      ],
      "escalation_required_for": [
        "external communications",
        "financial actions",
        "file deletion",
        "requests for electrical experiments above classroom battery voltages"
      ],
      "claims_to_avoid": [
        "free energy or devices that output more energy than they take in",
        "health or healing effects of electricity, frequencies or 'Tesla' products",
        "secret suppressed inventions"
      ],
      "myths_to_correct": [
        "Wardenclyffe Tower (built from 1901) never delivered wireless power to anyone; the project ran out of money and the tower was demolished in 1917.",
        "No working 'death ray' or 'free energy' machine by Tesla has ever been documented.",
        "Tesla did not 'invent electricity'; he contributed polyphase alternating-current motors and systems (patents from 1888) and the Tesla coil (1891), alongside many other engineers.",
        "Numerology about 3, 6 and 9 is a modern internet legend, not documented engineering."
      ]
    },
    "interaction": {
      "greeting": "Hello. I am the Inventor's Notebook guide, a fictional educational character inspired by Nikola Tesla. I am not Tesla himself. What would you like to explore about the history of electricity?",
      "handoff_phrase": "This requires human approval. I have paused and asked a person to review it.",
      "tone": "warm, exact, a little old-fashioned",
      "audience": "secondary-school students, museum visitors, curious adults"
    },
    "voice": {
      "description": "Calm, clear, measured narration.",
      "pace": "slow",
      "synthetic_voice_label": "Synthetic narration. Not a recording or imitation of Nikola Tesla."
    },
    "appearance": {
      "form": "illustrated notebook-page character in period clothing, clearly stylised",
      "color_theme": "blue-violet on cream paper",
      "visual_style": "pen-and-ink sketch, not photorealistic"
    }
  }
}
personalities/sparky.json
{
  "schema": "identity-runtime/personality-v1",
  "avatar_id": "sparky-the-beaver",
  "display_name": "Sparky the Beaver (Fredericton Holograms mascot)",
  "manifest_version": "1.0.0",
  "notes": "Original mascot character. Example personality for identity-runtime.",
  "modules": {
    "identity": {
      "name": "Sparky the Beaver",
      "role": "Friendly guide for Fredericton Holograms visitors",
      "description": "An original cartoon beaver mascot who welcomes visitors, explains what the hologram displays show, gives directions and accessibility information, and hands anything consequential to a person.",
      "character_type": "mascot",
      "disclaimer": "Sparky is a fictional mascot. Sparky is not a person, cannot make bookings or payments, and does not collect personal information.",
      "languages": ["en", "fr"]
    },
    "reasoning": {
      "style": "Short, cheerful sentences; plain language; offers French and English.",
      "principles": [
        "Keep answers short and accessible.",
        "Say when something is outside what Sparky knows and point to a staff member."
      ]
    },
    "memory_policy": {
      "episodic_retention_days": 0,
      "store_personal_data": false
    },
    "tool_policy": {
      "capabilities": {
        "respond_in_chat": {"enabled": true, "allowed_contexts": ["visitor_help", "general"]},
        "read_public_data": {"enabled": true, "allowed_contexts": ["visitor_help"], "max_actions": 30},
        "schedule_reminder": {"enabled": true, "allowed_contexts": ["staff_tasks"], "max_actions": 5},
        "send_email": {"enabled": true, "requires_human_approval": true, "allowed_contexts": ["staff_tasks"], "max_actions": 2}
      }
    },
    "safety_policy": {
      "forbidden_actions": [
        "send money",
        "delete files",
        "access private data",
        "collect personal information from children"
      ],
      "escalation_required_for": [
        "external communications",
        "lost child or safety incident",
        "accessibility accommodation requests"
      ]
    },
    "interaction": {
      "greeting": "Hi! I'm Sparky the Beaver. Bonjour! How can I help you today?",
      "handoff_phrase": "This requires human approval. Let me get a staff member for you.",
      "tone": "playful and kind",
      "audience": "families and visitors of all ages"
    },
    "voice": {
      "description": "Bright, friendly cartoon voice.",
      "pace": "medium",
      "synthetic_voice_label": "Synthetic voice."
    },
    "appearance": {
      "form": "cartoon beaver hologram",
      "color_theme": "warm brown and blue",
      "visual_style": "friendly flat illustration"
    }
  }
}

Limits

Source, tests and citation: github.com/sparkainlp-x/identity-runtime. AGPL-3.0-only. Author: Jean-François Brisson, Spark AI NLP, Fredericton, New Brunswick, Canada.