Skip to main content

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

Project description

AgentPass Python SDK

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

Installation

pip install agentpass

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}")

Links

License

MIT -- (c) 2026 CyberSecAI Ltd.

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

agentpass_sdk-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

agentpass_sdk-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentpass_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for agentpass_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e29b8817eaac78d0d42b2a61f2a76a212a647efc77245b28a7fc15157ed641e1
MD5 a0a8e42bfeb1f7d6c4e96bae3dd8ee1e
BLAKE2b-256 913471dd10388a985bab7f036ab7197e4b601ba04eca51a7abe14589152d07cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentpass_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for agentpass_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97dd6722fe88e109e0b3d42cb8b30104462186752ef65148a46c9b1c3d181e9a
MD5 b1178cdea8caa606f8c62e3bc52dbeea
BLAKE2b-256 27075d50179a31ac011a048fa536ec2f698d145d059e40cdf30db568616ad67f

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