Skip to main content

agentdid

Cryptographic identity for AI agents. Prove a human stands behind the bot.

PyPI version License Tests


The problem

AI agents are proliferating across the web, but there is no standard way to verify who built or controls them. Without cryptographic identity, agents can impersonate, spam, and erode trust in every system they touch. agentdid gives each agent a verifiable identity backed by Ed25519 signatures and W3C Decentralized Identifiers.

How it works

agentdid generates an Ed25519 keypair for your agent, registers it as a did:key identifier with the agentdid registry, and issues a verifiable credential as a compact JWT. Anyone can resolve the DID and verify the credential without contacting the agent's owner. Optional email verification raises the trust level from L0 (registered) to L1 (email verified).

Quick-start

Get a verifiable agent identity in under two minutes.

# Install
pip install agentdid

# Generate a keypair (saved to ~/.agentdid/)
agentdid keygen

# Register your agent
agentdid register --name "my-agent" --email "you@example.com"

# Verify any agent by DID
agentdid verify did:key:z6Mkr...

After registration, ~/.agentdid/ contains your private key and credential JWT.

CLI reference

Command Description
agentdid keygen Generate a new Ed25519 keypair
agentdid register Register your agent (--name, --email)
agentdid verify <did> Verify an agent by DID
agentdid verify-email Send email verification for your agent
agentdid confirm-email Confirm email with verification code
agentdid revoke Revoke your agent's credential
agentdid credential jwt Display your agent's credential JWT
agentdid credential agent-card Generate an agent card with embedded proof

Global options:

  • --config-dir PATH -- Override config directory (default: ~/.agentdid)
  • --api-url URL -- Override API base URL (default: https://agentdid-api.fly.dev/v1)

API reference

Base URL: https://agentdid-api.fly.dev

Method Path Description Auth
POST /v1/agents/register Register a new agent Signed request
GET /v1/agents/{did}/verify Verify an agent Public
GET /v1/agents/{did}/credential Get agent's credential JWT Public
POST /v1/agents/{did}/verify-email Send email verification Signed request
POST /v1/agents/{did}/confirm-email Confirm email code Signed request
POST /v1/agents/{did}/revoke Revoke agent credential Signed request
DELETE /v1/agents/{did} Delete agent registration Signed request
GET /.well-known/did.json Issuer DID document Public

"Signed request" means the request body includes an Ed25519 signature from the agent's private key, verified server-side against the registered DID.

Architecture

  • DID method: did:key (Ed25519) for agents, did:web for the issuer
  • Credentials: JWT format only -- no JSON-LD complexity
  • Signatures: Ed25519 for all cryptographic operations
  • Verification levels: L0 (registered), L1 (email verified)

The issuer's DID document is served at /.well-known/did.json so any party can independently verify credentials without trusting a third-party resolver.

Development

git clone https://github.com/Mr-Perfection/agentproof.git
cd agentproof
pip install -e ".[dev]"
pytest

Contributing

Contributions welcome. Please open an issue first to discuss what you'd like to change.

License

Apache 2.0

Metadata

Release files for agentdid 0.1.0

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

Source distribution (sdist)

Source distribution for agentdid 0.1.0
File Size Uploaded
agentdid-0.1.0.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentdid 0.1.0
File Interpreter ABI Platform
agentdid-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.1 kB

Release files / agentdid-0.1.0.tar.gz

Download URL agentdid-0.1.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7cbea0ce8015306d3c0596d0863ac1d8601526160c2dd02298b8dbdac79642d3
BLAKE2b-256 checksum
How to use checksums
7736cfa168c058183d50e1ae3f1361f6df50501c53678b35006b69c30d5d2b84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.12.13 HTTPX/0.28.1

Release files / agentdid-0.1.0-py3-none-any.whl

Download URL agentdid-0.1.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a50aa903c4f3590664a5063a9aeb2118f5ba3cb750a970d0f1e54934f99e5098
BLAKE2b-256 checksum
How to use checksums
ecd59a453a1055b632e090b22a8fb868af47417911afcac39a61409c8beb27e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.12.13 HTTPX/0.28.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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