Skip to main content

AgentPass Python SDK

The credit check for AI agents -- trust scoring, signed payments, AML sanctions screening.

Installation

pip install agentpass-sdk

Quick Start

from agentpass import AgentPassClient, register

# Register a new account
result = register("dev@example.com", "Your Name", "password", company="Acme Inc")
api_key = result["apiKey"]

# Create a client
client = AgentPassClient(api_key=api_key)

# Create an agent
agent = client.create_agent("payment-bot", scope=["payments"])
agent_id = agent["id"]

# Check trust score
trust = client.get_trust(agent_id)
print(f"Trust score: {trust['score']}")

# Make a payment
tx = client.pay(agent_id, to="store.example.com", amount=1000, currency="usd")
print(f"Transaction: {tx['transactionId']}")

# Screen against sanctions lists
check = client.screen_sanctions("ACME Corp", country="GB")
print(f"Sanctioned: {check['matched']}")

# Check balance
bal = client.balance()
print(f"Balance: {bal['balance']} cents")

Async Usage

import asyncio
from agentpass import AsyncAgentPassClient

async def main():
    async with AsyncAgentPassClient(api_key="apt_live_xxx") as client:
        agents = await client.list_agents()
        trust = await client.get_trust("agt_123")
        tx = await client.pay("agt_123", "store.example.com", 500)

asyncio.run(main())

Identity Verification (Challenge-Response)

Prove an agent's identity using ECDSA P-256 challenge-response:

# Requires: pip install cryptography
result = client.prove_identity(agent_id, private_key_pem)
print(f"Verified: {result['verified']}")

Or step-by-step:

challenge = client.get_challenge(agent_id)
signature = client.sign_challenge(challenge["challenge"], private_key_pem)
result = client.verify_identity(agent_id, challenge["challenge"], signature)

Agent-to-Agent Payments

tx = client.agent_pay(
    from_agent_id="agt_sender",
    to_agent_id="agt_receiver",
    amount=500,
    currency="usd",
    description="Service fee"
)

All Methods

Method Description
register() Register a new developer account (standalone function)
create_agent(name, scope) Create a new agent
list_agents() List all agents
get_agent(agent_id) Get agent details
revoke_agent(agent_id) Revoke an agent
get_passport(agent_id) Get agent passport
balance() Get wallet balance
topup(amount) Top up wallet (cents)
pay(agent_id, to, amount, ...) Make a payment
agent_pay(from_id, to_id, amount, ...) Agent-to-agent payment
list_transactions() List transactions
get_transaction(tx_id) Get transaction by ID
get_trust(agent_id) Get trust score
trust_report(agent_id) Get full trust report
trust_events(agent_id) Trust event history
get_challenge(agent_id) Get identity challenge
verify_identity(agent_id, challenge, sig) Verify signed challenge
sign_challenge(challenge, pem) Sign challenge locally
prove_identity(agent_id, pem) Full identity flow
screen_sanctions(name, country) AML sanctions screening
sanctions_stats() Sanctions DB stats
account() Get account info
change_password(current, new) Change password
regenerate_key() Regenerate API key
simulate_webhook(event_type, tx_id) Simulate Stripe webhook
demo_purchase(agent_id, product) Demo store purchase

Error Handling

from agentpass import (
    AgentPassError,
    AuthenticationError,
    InsufficientFundsError,
    TrustLimitError,
    NotFoundError,
    ReplayError,
)

try:
    client.pay(agent_id, "store", 5000)
except InsufficientFundsError:
    print("Top up your wallet first")
except TrustLimitError:
    print("Agent trust score too low")
except AuthenticationError:
    print("Invalid API key")
except AgentPassError as e:
    print(f"Error {e.status}: {e}")

License

MIT -- (c) 2026 CyberSecAI Ltd.

Release files for agentpass-sdk 0.1.1

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

Source distribution (sdist)

Source distribution for agentpass-sdk 0.1.1
File Size Uploaded
agentpass_sdk-0.1.1.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentpass-sdk 0.1.1
File Interpreter ABI Platform
agentpass_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / agentpass_sdk-0.1.1.tar.gz

Download URL agentpass_sdk-0.1.1.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ef4ae5e60442d57cbcf3a5f3c8e70a2383759dccd6ffd7186575f01166ac0aad
BLAKE2b-256 checksum
How to use checksums
08103e85cb4ad9f900b1ee374e5032640639b14bedce59c27d6ef9d0944a29ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / agentpass_sdk-0.1.1-py3-none-any.whl

Download URL agentpass_sdk-0.1.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fda24a57eae9d9e47c904fd5a452df3a2f9886b8ac0241c08959aa6f44f5e5bd
BLAKE2b-256 checksum
How to use checksums
1efd34910f7ee93d26977f7f1fec61fe0b595bb828afb57a64da04b04a282e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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