Skip to main content

Cryptographic proof that a human stands behind an AI agent.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentdid-0.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentdid-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file agentdid-0.1.0.tar.gz.

File metadata

  • Download URL: agentdid-0.1.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.13 HTTPX/0.28.1

File hashes

Hashes for agentdid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7cbea0ce8015306d3c0596d0863ac1d8601526160c2dd02298b8dbdac79642d3
MD5 35620b281562e8a44303f67d90e76690
BLAKE2b-256 7736cfa168c058183d50e1ae3f1361f6df50501c53678b35006b69c30d5d2b84

See more details on using hashes here.

File details

Details for the file agentdid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentdid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.13 HTTPX/0.28.1

File hashes

Hashes for agentdid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a50aa903c4f3590664a5063a9aeb2118f5ba3cb750a970d0f1e54934f99e5098
MD5 2f06e09218bcd7c5c472adb80d73edf0
BLAKE2b-256 ecd59a453a1055b632e090b22a8fb868af47417911afcac39a61409c8beb27e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page