Agent Passport SDK
5-minute EU AI Act Art.50 compliance for AI Agents on Base.
Agent Passport is a compliance proof system that helps platforms ensure every AI agent they interact with carries verifiable proof of regulatory compliance — starting with Art.50 disclosure obligations.
Install
pip install agent-passport-agl
Quick Start
from agent_passport import AgentPassportClient, passport_guard, set_default_client
# Initialize (read-only)
client = AgentPassportClient(rpc_url="https://mainnet.base.org")
set_default_client(client)
# Protect your agent handler with one decorator
@passport_guard(required_scope=1) # attribute_type=1 for Art.50
def handle(agent_id, query):
return f"Compliant response to: {query}"
Register an Agent
client = AgentPassportClient(
rpc_url="https://mainnet.base.org",
private_key="0xYOUR_KEY"
)
agent_id = client.register_agent(
name="MyAgent",
operator="0xYourAddress",
metadata_uri="https://example.com/metadata.json"
)
print(f"Registered agent with ID: {agent_id}") # uint256, starts at 1
Art.50 Disclosure
from agent_passport import Art50ComplianceChecker
checker = Art50ComplianceChecker(client)
header = checker.generate_disclosure_header(agent_id, interaction_type="chat")
# => X-AI-Disclosure: agent=1; compliant=true; compliance_level=2; type=chat
Deployed Contracts (Base Mainnet)
| Contract | Address |
|---|---|
| AgentRegistry | 0xbeeFd54855e133055c6C5be8fD6549c3Fd92e0D9 |
| AgentPassport | 0x5eBD4fCE45754c34557a237dd59cecec7A410c87 |
| AccessGateway | 0xC46C3538Ea1Ea3dc41b762A2b298DD3C4cc65594 |
| CompliancePassport | 0x1A086e034C7020CFE12d1ff8082Fc6aeD5787680 |
Features
@passport_guard— Decorator to enforce compliance checks on any handlerArt50ComplianceChecker— Check compliance status and generate disclosure headersDelegationManager— Create and verify agent delegation proofs via EIP-712- Read-only mode — No private key needed for verification and queries
- V2 Contracts — All ABIs matched to actual on-chain deployments on Base Mainnet
API Overview
AgentPassportClient
| Method | Description |
|---|---|
register_agent(name, operator, metadata_uri) |
Register a new agent, returns int agentId |
get_agent(agent_id) |
Get agent info → AgentInfo(owner, agent_wallet, agent_uri, registered_at, active) |
issue_attestation(agent_id, attribute_type, attribute_value, schema_uri, valid_until) |
Issue attestation (requires VERIFIER_ROLE) |
get_attestation(attestation_id) |
Get attestation details → AttestationInfo |
get_agent_attestation_ids(agent_id) |
List attestation IDs for an agent |
verify_agent(agent_wallet, message, signature) |
Verify proof of agent → (is_valid, agent_id) |
get_certificate(cert_id) |
Get compliance certificate → CertificateInfo |
get_agent_certificate_ids(agent_id) |
List certificate IDs for an agent |
get_compliance_status(agent_id) |
Get all certificates for an agent |
issue_certificate(...) |
Issue certificate (requires SCORER_ROLE) |
record_risk_score(...) |
Record risk score (requires SCORER_ROLE) |
Links
License
MIT
Metadata
Release files for agent-passport-agl 0.4.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 | |
|---|---|---|---|---|
| agent_passport_agl-0.4.0.tar.gz | 19.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_passport_agl-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.0 kB
Release files / agent_passport_agl-0.4.0.tar.gz
| Download URL | agent_passport_agl-0.4.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b78193820a905dca7718b8e56186bcd32188cecfeb7750848c75428ee7980e8
|
|
BLAKE2b-256 checksum How to use checksums |
c5ca4007c51e2aa4d2613b38d0648df2d393dd7aafcd500edeee073e56a5c391
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / agent_passport_agl-0.4.0-py3-none-any.whl
| Download URL | agent_passport_agl-0.4.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
727cca0f56ecf6507feba47fc86ae04b66d4005bb58144c6405d2a4f8d1fba35
|
|
BLAKE2b-256 checksum How to use checksums |
e01df5d8c061823c47184f854917112946e8a84f21367ef4261af7527494cc8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for agent-passport-agl 0.4.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.