helixid-sdk-py
Python SDK for HelixID -- decentralized agent identity via DID/VC standards (did:hedera, did:key, did:web), delegation, and Verifiable Presentation verification.
This is the Python counterpart to
helix-sdk-js, following the same
SDK-API-only architecture: every
SDK, in every language, depends only on the HelixID API -- never on a shared
"core" package -- except for private-key operations that must stay local:
keygen, sign, canonical-hash and VPBuilder.sign(), which issuers and Service
Providers still use to sign with their own keys. Verification, delegation-VC
construction, DID resolution, and status checks are all API calls made through
HelixClient.
Agents hold no keys. Agent self-custody has been retired: the server
generates an agent's keypair during onboarding and holds the private key, so
onboarding, presenting and delegating are all API calls
(onboard_agent(), sign_vp(), delegate_authority()).
Documentation
Full documentation is at docs.helixid.dev — concepts, guides, and reference. This README covers only what is specific to this repository.
| Start here | Introduction |
| Concepts | The Trust Stack · Two-Issuer Model · Delegation · Revocation |
| Get started | Quick Start · Installation & Modes |
| Contributing | How to Contribute · CONTRIBUTING.md |
| Security | Reporting a Vulnerability · SECURITY.md |
Status: v0.1.1, early
This is the first release. Core local-signing primitives and the full
HelixClient API surface are implemented and tested; a few areas are
still gaps -- see Known gaps below.
Install
pip install helixid-sdk-py
Or from source:
pip install -e .
Cross-language parity
The local-signing primitives (keys.py, vp_crypto.py, proof.py,
vp_builder.py) are verified byte-for-byte against the same
fixtures/golden-vectors/*.json fixtures that helix-sdk-js and
helix-core assert against -- same private key, same payload, same
signature, same base58btc-encoded proof value, in every language. See
tests/test_golden_vectors.py and fixtures/golden-vectors/README.md.
If you regenerate the vectors in helix-server (pnpm generate:golden-vectors),
re-copy the three JSON files here too, the same way helix-sdk-js does.
Packages in this repo
helix_sdk-- core SDK (see Quick example below).helix_mcp_middleware-- Model Context Protocol integration: server-side VP verification middleware and client-side VP attachment (the VP rides in the request'sparams._meta["x-helix-vp"], or theX-Helix-VPheader over HTTP, never in tool arguments). Install with themcp-middlewareextra:pip install helixid-sdk-py[mcp-middleware].helix_langchain-- LangChain integration: a tool wrapper that signs a fresh VP for every tool call and exposes it to the tool viacurrent_helix_vp_headers()(anX-Helix-VPheader for the tool's outbound request; tool input is untouched), plus scope-based tool filtering. Install withpip install helixid-sdk-py[langchain].helix_crewai-- CrewAI integration, following the same pattern ashelix_langchain. There is no CrewAI counterpart inhelix-sdk-js-- this is Python-only. Install withpip install helixid-sdk-py[crewai].
Install everything at once with pip install helixid-sdk-py[all].
Quick example
from helix_sdk import HelixClient
client = HelixClient(
"https://your-helix-api.example.com",
admin_api_key="...", # signing is admin-gated in OSS
)
# Signing is an API call: the caller never has the agent's private key.
vp = client.sign_vp(agent_did, "https://api.example.com/v1/tools/orders")
result = client.verify_vp(vp)
print(result["valid"], result["effectiveScopes"])
See examples/verify_vp_demo.py for this flow end to end, including scope
checks and a revoked-credential rejection.
Examples
See examples/:
verify_vp_demo.py-- onboards an agent withonboard_agent(), signs a VP throughsign_vp(), verifies it, exercisescheck_scope()/require_scope(), then revokes the VC and shows the next verification attempt fail withVC_REVOKED.agent_delegation_demo.py-- onboards a delegator and a sub-agent, delegates a scope subset withdelegate_authority(), has the sub-agent present the delegated credential, and shows a further delegation being refused because the sub-agent has no delegation authority of its own.
Both require a running helix-api instance:
HELIX_API_URL=http://127.0.0.1:3579 \
HELIX_ADMIN_API_KEY=your-admin-key \
python examples/agent_delegation_demo.py
The TypeScript side has since been migrated too: helixid's
examples/delegation-demo.ts and its live integration test
(tests/live/agent-delegation.live.integration.test.ts) both use
delegateAuthority() -- the server signs on the delegator's behalf, since no
caller holds an agent's key any more. delegate_authority() here is the
Python equivalent.
CLI
There is no Python CLI. Platform-operator workflows (DID/wallet/status-list/
VC lifecycle) are covered by helix-sdk-js's cli package -- the
CLI has a single canonical implementation rather than one per SDK language.
Testing
pip install -e ".[dev,all]"
pytest
pytest always runs with coverage ([tool.pytest.ini_options] in
pyproject.toml) and fails under 60% -- the measured baseline as of
2026-09-03, not a target. helix-sdk-js/helix-api enforce 90%
lines/statements, 85% branches, 90% functions; closing this gap (some
modules, like did.py, currently have no direct unit tests at all) is
real follow-up work, not something this tooling change did on its own.
tests/test_golden_vectors.py-- cross-language crypto parity (no network).tests/test_wallet.py--AgentWalletencrypted persistence, credential storage/queries, andVPBuilderlocal-signing round trip. (delegate()and its mocked-HTTP tests were removed along with the rest of agent self-custody.)tests/test_framework_adapters.py-- exerciseshelix_mcp_middleware,helix_langchain, andhelix_crewaiagainst the real installedlangchain-coreandcrewaipackages (not mocks of them), so a real interface drift in either framework would fail these tests. Skips gracefully on Python < 3.10, since both frameworks require it.
There is currently no automated live integration test against a real
helix-api instance in this repo's CI (see Known gaps) -- if you have a
running instance, you can exercise the real network path with the two
example scripts above.
Known gaps
- No live network integration test yet. The mocked tests above verify
the SDK's logic faithfully, but nothing here has been run against a real,
live
helix-apiprocess end-to-end. (The sandbox used to build this SDK could not start one --helix-api'sserver.tsimports the generated Prisma client unconditionally, even in SQLite storage mode, andprisma generateneeds network access tobinaries.prisma.sh, which was outside that environment's egress allowlist. This is a sandbox-only limitation, not a code issue, and shouldn't block real CI or local development where Prisma can actually run.) Running the two example scripts against a real instance is the recommended way to close this gap. HttpAdapteris synchronous (built onrequests), unlikehelix-sdk-js's asyncfetch-based adapter. This was a deliberate v0 choice -- most Python agent/automation call sites are synchronous -- not an oversight; an async variant can be added later without breaking this one.- No
did:hederapackage yet. DID resolution generally is always an API call in this architecture, so this is really about offline Hedera anchoring specifically, whichhelix-sdk-js'sclipackage supports via a separatedid-hederapackage this repo hasn't ported. Since the CLI itself is JS-only, this gap only matters if this SDK's own local-signing primitives grow adid:hederacreation path. - No
widgetpackage (helix-sdk-js's browser-embeddable consent widget has no obvious Python equivalent and hasn't been attempted). HelixIDCallbackHandlerinhelix_langchainis a no-op. LangChain Python'son_tool_startcallback is a notification hook, not an interceptor, and VPs no longer travel in tool input anyway. VP signing happens inhelix_id_tool_wrapper(), which hands the VP to the tool throughcurrent_helix_vp_headers(); the callback handler is kept only for observability use. (The JS SDK has dropped its callback form,HelixIDMiddleware, entirely.)- Version numbering does not yet track
helix-sdk-js's version. This SDK's version should track the JS SDK's; that mapping strategy hasn't been decided yet, so this starts at0.1.0independently.
The HelixID ecosystem
| Repository | What it is |
|---|---|
| helixid | HelixID API — the issuer and verifier service |
| helix-core | @helixid/core — crypto, schemas, resolver, verification primitives |
| helix-sdk-js | JS/TS SDK, CLI, LangChain + MCP middleware, consent widget |
| helix-sdk-py — you are here | helixid-sdk-py — the Python SDK |
| helix-console | Operator Console SPA |
| helix-wiki | Source for docs.helixid.dev |
License
Apache-2.0
Metadata
Release files for helixid-sdk-py 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| helixid_sdk_py-2.0.0.tar.gz | 52.4 kB | With provenance | Details for helixid_sdk_py-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| helixid_sdk_py-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for helixid_sdk_py-2.0.0-py3-none-any.whl |
Total release size: 108.3 kB
Release files / helixid_sdk_py-2.0.0.tar.gz
| Download URL | helixid_sdk_py-2.0.0.tar.gz |
|---|---|
| Size | 52.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93f1aeb10ddeb7fa927decc585cf88273d1aa29e2b3d98a9d15c0807d589bdbd
|
|
BLAKE2b-256 checksum How to use checksums |
66046f2f39e924bc67633ae21283194e4eb55e89087b1b058041047c41bb4fe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 27, 2026.
Transparency logRelease files / helixid_sdk_py-2.0.0-py3-none-any.whl
| Download URL | helixid_sdk_py-2.0.0-py3-none-any.whl |
|---|---|
| Size | 55.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ac149c2b9c2059fb355daeb8dcdf215f103c6a276129c2e75d891846cb2f5e1
|
|
BLAKE2b-256 checksum How to use checksums |
f3b9a324cd4f79e7b8f97333895d0abdedef9be923e703c7a62764661b57dd29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 27, 2026.
Transparency logSecurity for helixid-sdk-py 2.0.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for helixid_sdk_py-2.0.0.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 Oct 27, 2026.
Transparency logA 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.