agent-id (Python)
Idiomatic Python port of
@p-vbordei/agent-id. Self-custody DID + capability Verifiable Credential profile for AI agents. Byte-deterministic-compatible with the TypeScript reference: passes the same C1 / C2 / C3 conformance vectors. 17 tests pass.
What's in the box
generate_key_pair()/did_key_from_public_key()— Ed25519 keys +did:keycodec.issue(opts)— sign a Capability VC with theeddsa-jcs-2022cryptosuite.verify(vc)— JSON-Schema → validity window → signature → DID resolution, accumulating errors.resolve(did)—did:key(offline) anddid:web(HTTP, with timeout + response cap) resolution.
Install
pip install agent-id
# or
uv add agent-id
Quickstart
import asyncio
from agent_id import IssueOptions, did_key_from_public_key, generate_key_pair, issue, verify
async def main() -> None:
principal = generate_key_pair()
agent = generate_key_pair()
vc = await issue(IssueOptions(
principal=principal,
subject={
"id": did_key_from_public_key(agent.public_key),
"type": "Agent",
"principal": did_key_from_public_key(principal.public_key),
"model": {"vendor": "anthropic", "id": "claude-opus-4-7"},
"capability": {"action": "answer", "sla": {"latency_ms_p95": 2000}},
"valid_from": "2026-04-24T00:00:00.000Z",
},
))
result = await verify(vc)
print(f"issued VC for {vc['credentialSubject']['id']}")
print(f"verified = {result.verified}")
asyncio.run(main())
Run it:
python examples/quickstart.py
How it relates
| Language | Repo | Notes |
|---|---|---|
| TypeScript (reference) | agent-id | canonical spec, conformance suite |
| Python | agent-id-py | this repo |
| Rust | agent-id-rs | sibling port |
All three implementations produce byte-identical output for serialization-critical surfaces. See docs/architecture.md for details.
Conformance
uv run pytest -v # runs the same C1 / C2 / C3 vectors as the TS reference
Vectors in vectors/ are copied verbatim from the TS conformance suite. Pass / fail behaviour matches byte-for-byte.
Architecture
See docs/architecture.md for the module layout, dependency choices, and byte-determinism invariants.
Development
git clone https://github.com/p-vbordei/agent-id-py
cd agent-id-py
uv venv -p 3.13
uv pip install -e ".[dev]"
uv run pytest -v
uv run ruff check .
Contributions welcome — see CONTRIBUTING.md.
License
Apache-2.0 — see LICENSE.
Metadata
Release files for kindred-agent-id 0.1.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 | |
|---|---|---|---|---|
| kindred_agent_id-0.1.0.tar.gz | 74.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kindred_agent_id-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.2 kB
Release files / kindred_agent_id-0.1.0.tar.gz
| Download URL | kindred_agent_id-0.1.0.tar.gz |
|---|---|
| Size | 74.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de6abfdca246731cc76818e3979ee9bf4204f623f09830b12b0bf0178ee2224d
|
|
BLAKE2b-256 checksum How to use checksums |
b4eff7dc8fc003bd6c0c745839b2a528019e0a0562d8010b6881574b1617d771
|
| 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 May 21, 2026.
Transparency logRelease files / kindred_agent_id-0.1.0-py3-none-any.whl
| Download URL | kindred_agent_id-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27bb5e0629f086383c4e0a53307dd70508694eac5a54495a288cbe4dbfd06eba
|
|
BLAKE2b-256 checksum How to use checksums |
b5a1553fca5c1b9462629145e2927f76ebd5faa07c290072c4f535af851ad454
|
| 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 May 21, 2026.
Transparency logSecurity for kindred-agent-id 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for kindred_agent_id-0.1.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 May 21, 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.