Skip to main content

hdp-physical

HDP-P — Embodied Delegation Tokens and pre-execution safety for physical AI agents.

Part of the HDP (Human Delegation Provenance) protocol suite.

PyPI version

What it does

HDP-P wraps physical robot action commands with cryptographic authorization. Before any motor command reaches an actuator, the PreExecutionGuard checks:

  1. Is the command signed with a valid Embodied Delegation Token (EDT)?
  2. Does the action's irreversibility class exceed the EDT's ceiling?
  3. Is a Class 3 (harmful/irreversible) action prohibited by the EDT?
  4. Is the target zone excluded?
  5. Does force/velocity exceed EDT limits?

An unsigned command from a prompt-injected LLM is caught at step 1 and never reaches the robot.

Install

pip install hdp-physical

Optional extras:

pip install "hdp-physical[lerobot]"   # LeRobot adapter
pip install "hdp-physical[gemma]"     # Gemma interceptor

Quick start

import asyncio
from hdp_physical import (
    EdtBuilder, sign_edt, PreExecutionGuard, IrreversibilityClass
)
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey

async def main():
    private_key = Ed25519PrivateKey.generate()
    public_key = private_key.public_key()

    edt = (
        EdtBuilder()
        .set_embodiment(agent_type="robot_arm", platform_id="aloha_v2", workspace_scope="zone_A")
        .set_action_scope(permitted_actions=["pick", "place", "move"], excluded_zones=[], max_force_n=45, max_velocity_ms=0.5)
        .set_irreversibility(max_class=IrreversibilityClass.REVERSIBLE_WITH_EFFORT, class2_requires_confirmation=True, class3_prohibited=True)
        .set_policy_attestation(policy_hash="sha256-of-weights", training_run_id="run-1", sim_validated=True)
        .set_delegation_scope(allow_fleet_delegation=False, max_delegation_depth=1, sub_agent_whitelist=[])
        .build()
    )

    signed_edt = await sign_edt(edt, private_key, "my-key")
    guard = PreExecutionGuard()

    decision = await guard.authorize(
        {"description": "pick box from left", "force_n": 5, "velocity_ms": 0.2},
        signed_edt,
        public_key,
    )

    if decision.approved:
        print("✅ Action approved — safe to send to actuator")
    else:
        print(f"🛑 Blocked at: {decision.blocked_at} — {decision.reason}")

asyncio.run(main())

Irreversibility Classes

Class Name Example
0 REVERSIBLE Sensor query, state read
1 REVERSIBLE_WITH_EFFORT Normal pick-and-place
2 IRREVERSIBLE_NORMALLY Press-fit, adhesive bond
3 IRREVERSIBLE_AND_HARMFUL Crush, override safety limits

Live demo

🤖 HDP-P Physical Safety — Powered by Gemma 4 on HuggingFace

License

Apache-2.0 — Helixar AI

Metadata

Release files for hdp-physical 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hdp-physical 0.1.1
File Size Uploaded Provenance Actions
hdp_physical-0.1.1.tar.gz 18.7 kB With provenance Details for hdp_physical-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hdp-physical 0.1.1
File Interpreter ABI Platform Actions
hdp_physical-0.1.1-py3-none-any.whl Python 3 none any Details for hdp_physical-0.1.1-py3-none-any.whl

Total release size: 35.0 kB

Release files / hdp_physical-0.1.1.tar.gz

Download URL hdp_physical-0.1.1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
045fd387cecae3d5f1e36e9e2ee8d63171e13982ca043c23d3e91b92bf6307d3
BLAKE2b-256 checksum
How to use checksums
232c6def65fb735f95130683475d9ff9f3dd0ead89e3aaed9380f59bdbd2d029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

Release files / hdp_physical-0.1.1-py3-none-any.whl

Download URL hdp_physical-0.1.1-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cd36fa775b7d61f6fa08b6c83beafa34dda69fe293734ab8a0cb6b935f2860b
BLAKE2b-256 checksum
How to use checksums
054c9da46cc00a9a890e8d5fb66f32e7cf4ba58ad3d96ad66bf1b98b240bb637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

Security for hdp-physical 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hdp_physical-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page