Creduent Protocol SDK — cryptographic identity for AI agents
Project description
Creduent Python SDK
The official Python SDK for the Creduent Protocol — a federated, open trust-verification layer and cryptographic identity infrastructure for autonomous AI agents.
Installation
Install the self-contained package from PyPI with a single command:
pip install creduent
Quickstart
Below is a complete quickstart demonstrating keypair generation, self-signing, verification, registration, and attestation resolution using the SDK.
from creduent import (
generate_keys,
sign,
verify,
register,
attest,
CreduEntError
)
try:
# 1. Generate a new Ed25519 keypair
private_key_pem, public_key_str = generate_keys()
print(f"Generated Public Key: {public_key_str}\n")
# 2. Sign a draft agent.json document
draft_document = {
"agent_id": "agent://creduent/reconbot",
"owner": "Creduent",
"public_key": public_key_str,
"endpoint": "https://api.idevsec.com/recon",
"capabilities": ["osint", "dns_lookup", "vulnerability_scan"]
}
signed_doc = sign(draft_document, private_key_pem)
print("Signed agent.json:")
print(signed_doc)
print()
# 3. Verify a self-signed agent.json (from dict, URL, domain, or agent:// URI)
# Verification with a document dictionary
result = verify(signed_doc)
print(f"Self-Signed Verification Result (dict): {result.valid}")
# Verification with a live agent URL
live_result = verify("https://api.idevsec.com/.well-known/agent.json")
print(f"Live Verification Result (URL): {live_result.valid}")
print(f"Live Agent ID: {live_result.agent_id}")
print(f"Live Capabilities: {live_result.capabilities}\n")
# 4. Register an agent with the Creduent registry
# Returns RegisterResult with success (bool), attestation (dict|None), error (str|None)
reg_result = register(
agent_id="agent://creduent/reconbot",
domain="api.idevsec.com",
agent_json_url="https://api.idevsec.com/.well-known/agent.json"
)
print(f"Registration Successful: {reg_result.success}")
print(f"Attestation: {reg_result.attestation}\n")
# 5. Fetch and validate an active attestation for an agent
# Returns AttestResult with attested (bool), level (str), issued_at, expires_at, error (str|None)
attest_result = attest("agent://creduent/reconbot")
print(f"Is Attested: {attest_result.attested}")
print(f"Attestation Level: {attest_result.level}")
print(f"Issued At: {attest_result.issued_at}")
print(f"Expires At: {attest_result.expires_at}\n")
except CreduEntError as e:
print(f"Creduent Protocol Error occurred: {e}")
Protocol Specification
For full information on the cryptographic standards, JCS canonicalization, and the federated verification workflows, read the complete Creduent Protocol Specification.
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 creduent-0.1.0.tar.gz.
File metadata
- Download URL: creduent-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efcf02f726169c0e3f4065aa1015ec0671683a2e66c7612812c0f03f2cbfd006
|
|
| MD5 |
bc84af5071acbb01e02f78fc8158123f
|
|
| BLAKE2b-256 |
47122196a7068017fca8b5019bb699c91370492252fced2cf26311425a37b783
|
File details
Details for the file creduent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: creduent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f6b87110bd579dc18d734bceca07cefde40ed0787437335c99968e8108fd4aa
|
|
| MD5 |
fe211fd69876b6e1e169fd6b903ecb06
|
|
| BLAKE2b-256 |
6544185f09865fc6aba19de2f6ab789e8cbb38e0b8f5143b40312329c5139a3d
|