HDP-P — Embodied Delegation Tokens and pre-execution safety for physical AI agents
Project description
hdp-physical
HDP-P — Embodied Delegation Tokens and pre-execution safety for physical AI agents.
Part of the HDP (Human Delegation Provenance) protocol suite.
What it does
HDP-P wraps physical robot action commands with cryptographic authorization. Before any motor command reaches an actuator, the PreExecutionGuard checks:
- Is the command signed with a valid Embodied Delegation Token (EDT)?
- Does the action's irreversibility class exceed the EDT's ceiling?
- Is a Class 3 (harmful/irreversible) action prohibited by the EDT?
- Is the target zone excluded?
- 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
CC-BY-4.0 — Helixar AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hdp_physical-0.1.0.tar.gz.
File metadata
- Download URL: hdp_physical-0.1.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34068bd92a2dbf3811daace030a2e546be8dbb8026b93ba2a4cbb169c8f2c76d
|
|
| MD5 |
cc409e05d4eb24f2f6f9138f20fe8680
|
|
| BLAKE2b-256 |
8d5a062e5aeeb1cc26efb579903ac5c2eb1485e606a39370441b765ba75277c1
|
Provenance
The following attestation bundles were made for hdp_physical-0.1.0.tar.gz:
Publisher:
release.yml on Helixar-AI/HDP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdp_physical-0.1.0.tar.gz -
Subject digest:
34068bd92a2dbf3811daace030a2e546be8dbb8026b93ba2a4cbb169c8f2c76d - Sigstore transparency entry: 1229825136
- Sigstore integration time:
-
Permalink:
Helixar-AI/HDP@8cc8633d482c57135441c0b5620c0fd89f039631 -
Branch / Tag:
refs/tags/python/hdp-physical/v0.1.0 - Owner: https://github.com/Helixar-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8cc8633d482c57135441c0b5620c0fd89f039631 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hdp_physical-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hdp_physical-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6770fc1a96590c62252227efafe1f2a5ba7e7ed3ba6a238427334f90c3424058
|
|
| MD5 |
07967e0b855ab3e07be45150bb084f42
|
|
| BLAKE2b-256 |
066b3a291271477936a0fbeb27d509a890008cdac8b56311857caeca84c6a0df
|
Provenance
The following attestation bundles were made for hdp_physical-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Helixar-AI/HDP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hdp_physical-0.1.0-py3-none-any.whl -
Subject digest:
6770fc1a96590c62252227efafe1f2a5ba7e7ed3ba6a238427334f90c3424058 - Sigstore transparency entry: 1229825218
- Sigstore integration time:
-
Permalink:
Helixar-AI/HDP@8cc8633d482c57135441c0b5620c0fd89f039631 -
Branch / Tag:
refs/tags/python/hdp-physical/v0.1.0 - Owner: https://github.com/Helixar-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8cc8633d482c57135441c0b5620c0fd89f039631 -
Trigger Event:
push
-
Statement type: